[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] How to modify TeX-view-program-selection
From: |
Greg Bognar |
Subject: |
Re: [AUCTeX] How to modify TeX-view-program-selection |
Date: |
Thu, 13 Sep 2018 23:54:32 +0200 |
Thanks for the suggestions. Replacing "zathura" with "Zathura" helps, but also
removing the extra pair of parentheses around "((output-pdf "Zathura")):
(add-hook 'LaTeX-mode-hook
'(lambda ()
;some other stuff
(add-to-list 'TeX-view-program-selection '(output-pdf "Zathura"))
))
> There's no need to do this in LaTeX-mode-hook, it should be enough to have
> (add-to-list 'TeX-view-program-selection '((output-pdf "Zathura")))
(with-eval-after-load 'tex
(add-to-list 'TeX-view-program-selection '((output-pdf "Zathura"))))
for reasons David mentioned.
> in your init file. Doing it in LaTeX-mode-hook means it's executed each
> time you open a LaTeX file, which is harmless but unnecessary.
>
> Note, though, that Zathura is defined in TeX-view-program-list-builtin as
> "Zathura" (note the capital Z), so that's what you need to put in
> TeX-view-program-selection. (I suspect that is the cause of your troubles.)
Yes. Thanks for pointing it out.
> As for the entry for Evince in TeX-view-program-selection, I have no idea if
> that conflicts, but if you need to get rid of that, you could do:
>
> (setcdr (assq 'output-pdf TeX-view-program-selection) "Zathura")
This leads to an error:
Wrong type argument: listp, "Zathura"
The value of TeX-view-program-selection:
(((output-dvi has-no-display-manager)
"dvi2tty")
((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-pdf . "Zathura")
(output-html "xdg-open"))
I guess the problem is the extra period.
> instead of the add-to-list invocation above. But I suspect that AUCTeX will
> simply use the first matching entry in TeX-view-program-selection, so the
> entry for Evince shouldn't cause problems.
OK, but now each time I C-c C-c, I get a prompt:
View command: zathura file.pdf
Is it possible to get rid of the prompt? Or should I just use C-c C-v instead?
Re: [AUCTeX] How to modify TeX-view-program-selection,
Greg Bognar <=