Le 22/01/21 à 12h48, David Kastrup a écrit :

> Denis Bitouzé <denis.bito...@univ-littoral.fr> writes:
>
>> while it used to work nicely,
>
> Also known as: why this utter disregard of the documentation did not
> trigger a fatal error before as far as I remember.

No: I used to edit and compile my `.dtx` files this way.

>> I'm now facing an issue when I open my `.dtx` files, loaded with some
>> specific local variables.
>>
>> 2. Add the following local variables to the bottom of this file:
>>
>> %%% Local Variables:
>> %%% mode: tex
>> %%% eval: (doctex-mode)
>> %%% TeX-command-default: "TeX"
>> %%% TeX-master: t
>> %%% End:
>
> doctex-mode is a major mode.  To trigger it _after_ first loading
> another mode as a major mode is a mistake.

OK. Because I don't understand all the mysteries of Emacs/AUCTeX,
I hadn't the impression to load two major modes since I hadn't:

  ┌────
  │ %%% mode: tex
  │ %%% mode: doctex
  └────

> It probably now causes the local variable block to be reloaded, with
> obvious results.

Indeed, replacing:

  ┌────
  │ %%% mode: tex
  │ %%% eval: (doctex-mode)
  └────

by :

  ┌────
  │ %%% mode: doctex
  └────

did the trick.

I remember spending a lot of time researching how to both, and without
error, edit with `doctex` mode and compile with `pdftex`; but I can't
remember why the only solution that worked at the time of my research
was this one, which was obviously flawed.

Thanks!
-- 
Denis

Reply via email to