[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: |
Arash Esbati |
Subject: |
bug#30999: 12.1.1; Forward search view command needs quotes around source file name |
Date: |
Tue, 03 Apr 2018 21:55:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 |
Ikumi Keita <address@hidden> writes:
>>>>>> Arash Esbati <address@hidden> writes:
>>
>> 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.
Hi Keita,
thanks for your response. Actually, my preference is not to touch
`TeX-expand-list-builtin' and just fix this issue in
`TeX-view-program-list-builtin' like this:
diff --git a/tex.el b/tex.el
index 42759c56..8ec9e642 100644
--- a/tex.el
+++ b/tex.el
@@ -1365,7 +1365,7 @@ viewer."
"%d" (mode-io-correlate " \"# %n '%b'\"")) "dviout")
("SumatraPDF"
("SumatraPDF -reuse-instance"
- (mode-io-correlate " -forward-search %b %n") " %o")
+ (mode-io-correlate " -forward-search \"%b\" %n") " %o")
"SumatraPDF")
("dvips and start" "dvips %d -o && start \"\" %f" "dvips")
("start" "start \"\" %o")))
WDYT?
Best, Arash