Hi Arash,

>>>>> Arash Esbati <[email protected]> writes:
> [email protected] 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



_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex

Reply via email to