bug-auctex
[Top][All Lists]
Advanced

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

bug#30999: 12.1.1; Forward search view command needs quotes around sourc


From: Ikumi Keita
Subject: bug#30999: 12.1.1; Forward search view command needs quotes around source file name
Date: Tue, 03 Apr 2018 19:00:31 +0900

Hi Arash,

>>>>> Arash Esbati <address@hidden> writes:
> address@hidden writes:
>> I think that maybe the %b placeholder, which expands to a file name
>> relative to the master file's directory, should always be surrounded in
>> quotes. (I'm not sure that's actually the best fix for this.) So, as a
>> workaround, I've added this to my configuration:
>> 
>> (setq TeX-expand-list
>> '(("%b" (lambda () (format "\"%s\"" 
>> (TeX-current-file-name-master-relative))))))

> Hi Omar,

> thanks for this report.  I can reproduce this on Windows.  Before
> patching `TeX-expand-list-builtin', I would like to know if people can
> reproduce this on other OSes than windows.

1. In the current `TeX-view-program-list-builtin', there is an entry
      ("xdvi" ("%(o?)xdvi"
               (mode-io-correlate " -sourceposition \"%n %b\" -editor \"%cS\"")
               ...
for unix-like OSes.  Since %b is surrounded already in double quotes
here, adding double quotes in the result of %b expansion fails for this
case.

Even on windows, the entry for dviout is
      ("dviout" ("dviout -1 "
      ...
                 "%d" (mode-io-correlate " \"# %n '%b'\"")) "dviout")
and %b is surrounded already in single quotes.

So if %b expansion is modified so that it gets quoted, the default
entries in `TeX-view-program-list-builtin' must also be reviewed and
adapted.

2. If %b expansion is to be modified, it would be better to use
`shell-quote-argument' rather than simply adding double quotes around
it.

Best regards,
Ikumi Keita





reply via email to

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