[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.86; View problems
From: |
Tassilo Horn |
Subject: |
Re: [Bug-AUCTeX] 11.86; View problems |
Date: |
Fri, 14 Jun 2013 09:37:00 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
>> (add-hook 'TeX-mode-hook 'TeX-PDF-mode)
>
> That's probably about the worst thing you can do. It will switch off
> PDF mode for everything which PDF mode would otherwise be chosen for and
> vice versa.
Ups, I'm using this for years, and never had any problems. Or at least
I didn't notice them. :-)
And isn't it true that (add-hook 'foo-hook 'bar-mode) will always turn
on the minor mode `bar-mode', i.e., not toggle? Ah, no, that's emacs
24.1+ only...
,----
| * Incompatible Lisp Changes in Emacs 24.1
|
| ** Passing a nil argument to a minor mode function call now ENABLES
| the minor mode unconditionally. This is so that you can write e.g.
|
| (add-hook 'text-mode-hook 'foo-mode)
|
| to enable foo-mode in Text mode buffers, removing the need for
| `turn-on-foo-mode' style functions. This affects all mode commands
| defined by `define-minor-mode'. If called interactively, the mode
| command still toggles the minor mode.
`----
> So it will do what you want only when AUCTeX is without a clue, and do
> the wrong thing whenever AUCTeX would know better.
In what cases would AUCTeX automatically determine that it should
compile to PDF instead of DVI and vice versa?
> It would make much more sense to do
>
> M-x customize-variable TeX-PDF-mode RET
>
> and set and save PDF mode as default. That's what the documentation
> also states:
>
> -- Command: TeX-PDF-mode
> (`C-c C-t C-p') This command toggles the PDF mode of AUCTeX, a
> buffer-local minor mode. You can customize `TeX-PDF-mode' to give
> it a different default. The default is used when AUCTeX does not
> have additional clue about what a document might want. This
> option usually results in calling either PDFTeX or ordinary TeX.
If I didn't want to use `customize', could I also go with either
(setq-default TeX-PDF-mode t)
or
(TeX-global-PDF-mode 1)
Thanks,
Tassilo
Re: [Bug-AUCTeX] 11.86; View problems, David Kastrup, 2013/06/14