auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] Fix about usage of kpsewhich


From: Ikumi Keita
Subject: Re: [AUCTeX-devel] Fix about usage of kpsewhich
Date: Sun, 03 Dec 2017 03:32:18 +0900

Hi Mosè and all,

>>>>> Mosè Giordano <address@hidden> writes:
> sorry for the late reply, these days I'm getting all @gnu.org emails
> with huge delay.

It seems that the delivery system of GNU mail list suffers severe
trouble these days.  No mails since Nov 30 are listed on
https://lists.gnu.org/archive/html/auctex/
https://lists.gnu.org/archive/html/auctex-devel/
https://lists.gnu.org/archive/html/bug-auctex/
at the time of writing this message.

> 2017-12-01 23:34 GMT+01:00 David Kastrup <address@hidden>:
>>> Braces + comma should be fine.
>> 
>> Unless there are directories containing comma itself in the PATH.  Is
>> that an allowed character in Windows file systems?

> It's allowed in NTFS, according to Wikipedia[1]:

>     In Win32 namespace: any UTF-16 code unit (case-insensitive) except
>     /\:*"?<>| as well as NUL

Actually, the code in question is used regardless of the platform, so
the file systems involved are not limited to NTFS.

I just thought of another approach using brace expansion.  We can obtain
the right path delimiter by just taking the second character of the
output of "kpsewhich --expand-path {.,..}".  It would be robust since it
would work on any platform and not be interfered with directory names
with literal comma.

I implemented this idea in the attached patch.  Please try it instead of
the one I previously proposed.

I confirmed that it pass the "make check" in "tests/" directory on
FreeBSD 11.1 and the outputs of kpsewhich command are as expected for
both w32 TeXLive 2017 and MiKTeX 2.9:
--------w32 TeXLive 2017----------------------------------------------
C:\Users\keita>kpsewhich --expand-path "{.,..}"
.;..

C:\Users\keita>kpsewhich --version
kpathsea version 6.2.3
Copyright 2017 Karl Berry & Olaf Weber.
License LGPLv2.1+: GNU Lesser GPL version 2.1 or later 
<http://gnu.org/licenses/lgpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
--------MiKTeX 2.9----------------------------------------------------
address@hidden ~
$ kpsewhich --expand-path "{.,..}"
.;c:\Users\keita\..

address@hidden ~
$ kpsewhich --version
MiKTeX 2.9.6350 64-bit
Copyright 2010 Karl Berry & Olaf Weber.
License LGPLv2.1+: GNU Lesser GPL version 2.1 or later 
<http://gnu.org/licenses/lgpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
----------------------------------------------------------------------

Regards,
Ikumi Keita

Attachment: another-possible-fix
Description: another idea


reply via email to

[Prev in Thread] Current Thread [Next in Thread]