auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] [Bug] No install target for latex-flymake


From: Vladimir Lomov
Subject: Re: [AUCTeX] [Bug] No install target for latex-flymake
Date: Wed, 28 Feb 2018 17:10:21 +0800
User-agent: Mutt/1.9.3 (2018-01-21)

Hello,
** Alex Branham [2018-02-26 09:22:29 -0600]:

> 
> On Sun 25 Feb 2018 at 21:57, Vladimir Lomov <address@hidden> wrote:
> 
>> Hello,
>> ** Alex Branham [2018-02-25 11:03:14 -0600]:
>>
>>>
>>> On Sun 25 Feb 2018 at 06:52, Vladimir Lomov <address@hidden> wrote:
>>>
> [...]
>>> Flymake requires a backend function (or functions) so it can find
>>> warnings/errors. That's all LaTeX-setup-flymake-backend does, it doesn't
>>> actually turn on flymake-mode.
>>
>> I tried to explain not that: commentary in 'latex-flymake.el' tells that
>> the way to _enable_ this feature is to add 'LaTeX-setup-flymake-backend'
>> to the 'LaTeX-mode-hook' (may be either to '.emacs' or using
>> 'Customize') but the point is that this hook is _already_ there,
>> regardless of the user wish, that's why I asked question about
>> documentation.
> 
> I'm not sure where you're seeing that. For me, the commentary reads:
> 
> ;;; Commentary:
> 
> ;; This file provides flymake integration for latex documents using
> ;; "chktex" as a backend.  You must be running Emacs 26 or newer.
> ;; Enable it by adding the following to your init file:
> 
> ;;   (add-hook 'LaTeX-mode-hook #'flymake-mode)
> 
> Which is correct. It doesn't mention LaTeX-setup-flymake-backend at all.

I'm sorry, I was blinded of 'add-hook' and 'LaTeX-mode-hook'.

[...]

>>> I guess this is caused by latex-flymake.el getting required early on
>>> in the process. If you replace
>>>
>>>    (when (< 25 emacs-major-version)
>>>      (add-hook 'LaTeX-mode-hook #'LaTeX-setup-flymake-backend))
>>>
>>> With:
>>>
>>> (when (< 25 emacs-major-version)
>>>   (with-eval-after-load "latex"
>>>     (add-hook 'LaTeX-mode-hook #'LaTeX-setup-flymake-backend)))
>>>
>>> Does that solve your problem?
> 
>> Yes, now my other hooks are loaded too, but the problem with
>> 'LaTeX-setup-flymake-backend' still exists: it is loaded regardless of
>> the user wish (that's how I interprete its appearence in the
>> 'LaTeX-mode-hook' list). For me it is unexpected behaviour and must be
>> documented or somehow changed (for example, if 'flymake-mode' is On, as
>> you mentioned in some of your mails).
> 
> We could set it up in LaTeX-mode instead, adding the hook directly to
> flymake-diagnostic-functions. That would leave LaTeX-mode-hook
> unchanged. I'll try this and see if it works for me. If so, I'll submit
> a patch.

I'll test it on weekend or earlier.

[...]

---
WBR, Vladimir Lomov

-- 
The duck hunter trained his retriever to walk on water.  Eager to show off
this amazing accomplishment, he asked a friend to go along on his next
hunting trip.  Saying nothing, he fired his first shot and, as the duck fell,
the dog walked on the surface of the water, retrieved the duck and returned
it to his master.
        "Notice anything?" the owner asked eagerly.
        "Yes," said his friend, "I see that fool dog of yours can't swim."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]