GNU bug report logs - #47388
27.1; eldoc-documentation-function is ignore in updated eldoc

Previous Next

Package: emacs;

Reported by: Alex Branham <alex.branham <at> gmail.com>

Date: Thu, 25 Mar 2021 14:06:01 UTC

Severity: normal

Found in version 27.1

Done: Alex Branham <alex.branham <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Alex Branham <alex.branham <at> gmail.com>
Subject: bug#47388: closed (Re: bug#47388: 27.1; eldoc-documentation-function
 is ignore in updated eldoc)
Date: Sun, 28 Mar 2021 16:06:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 47388 <at> debbugs.gnu.org.

-- 
47388: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47388
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alex Branham <alex.branham <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 47388-done <at> debbugs.gnu.org
Subject: Re: bug#47388: 27.1; eldoc-documentation-function is ignore in
 updated eldoc
Date: Sun, 28 Mar 2021 12:05:46 -0400
On Sun 28 Mar 2021 at 15:50, João Távora <joaotavora <at> gmail.com> wrote:

> Alex Branham <alex.branham <at> gmail.com> writes:
>
>> On Sat 27 Mar 2021 at 12:53, João Távora <joaotavora <at> gmail.com> wrote:
>>
>> Thanks! It sounds like the below is what you're suggesting modes do in
>> order to support all the possible eldoc+Emacs versions, let me know if
>> I've misunderstood.
>>
>> (if (not (boundp 'eldoc-documentation-functions))
>>     ;; old eldoc
>>     (add-function :before-until (local 'eldoc-documentation-function)
>>                   #'ess-r-eldoc-function)
>>   ;; new eldoc
>>   (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t)
>>   ;; new eldoc + Emacs 27.1
>>   (when (and (fboundp 'eldoc-documentation-default) 
>>              (function-equal #'ignore eldoc-documentation-function))
>>     (setq-local eldoc-documentation-function
>> #'eldoc-documentation-default)))
>
> You don't need to be as complex as this:
>
> (if (not (boundp 'eldoc-documentation-strategy))
>     (add-function :before-until (local 'eldoc-documentation-function)
>                    #'ess-r-eldoc-function)
>   (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t)
>   (when (function-equal #'ignore eldoc-documentation-function)
>         (setq-local eldoc-documentation-function #'eldoc-documentation-default|compose|whatever))))

The fboundp check will avoid a byte compiler warning on Emacs<28.

>> If that's right, it seems like a step backwards, ease-of-setup-wise at
>> least, from the simple
>>
>> (add-function :before-until (local 'eldoc-documentation-function)
>> #'ess-r-eldoc-function)
>
> You can still just that and call it a day.  Just that, because the new
> eldoc in the yet-unreleased Emacs 28 is backward compatible.  I've tried
> to explain this three times already in this exchange.

Thanks. I'd like to support the new way (so users can customize
eldoc-documentation-function) and the old way, which I thought I had
said previously. It seems like the above is the officially blessed way
to do both so I suppose that's what we'll go with.

Thanks again, closing this bug report.

[Message part 3 (message/rfc822, inline)]
From: Alex Branham <alex.branham <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; eldoc-documentation-function is ignore in updated eldoc
Date: Thu, 25 Mar 2021 10:05:40 -0400
Hello -

Emacs 27.1 ships with eldoc that defines eldoc-documentation-function as
#'ignore. If users install eglot from ELPA, this pulls in an updated
eldoc that attempts to redefine eldoc-documentation-function. However,
the value does not change (since eldoc-documentation-function is already
bound, defcustom does not update it when called in
eldoc--documentation-strategy-defcustom) so the value is still ignore,
meaning users get:

    There is no ElDoc support in this buffer

since eldoc-documentation-function is #'ignore, regardless of the value
of eldoc-documentation-functions.

Here's the bug report we received with the original issue:
https://github.com/emacs-ess/ESS/issues/1130

Thanks!



This bug report was last modified 4 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.