From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc Date: Sat, 27 Mar 2021 12:53:13 +0000 Message-ID: References: <871rc35nwr.fsf@gmail.com> <87o8f53h3q.fsf@tcd.ie> <87im5dg36l.fsf@gmail.com> <87czvlraus.fsf@gmail.com> <87a6qpg02v.fsf@gmail.com> <87y2e894x6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005eb28905be8422f0" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20366"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , 47388@debbugs.gnu.org To: Alex Branham , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 27 13:54:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQ8SA-0005Ch-GV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 13:54:10 +0100 Original-Received: from localhost ([::1]:58454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQ8S9-0006ii-F3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 08:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ8S2-0006iV-Nd for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 08:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQ8S2-0008WA-Ga for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 08:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQ8S2-0001QR-EP for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 08:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Mar 2021 12:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47388 X-GNU-PR-Package: emacs Original-Received: via spool by 47388-submit@debbugs.gnu.org id=B47388.16168496145443 (code B ref 47388); Sat, 27 Mar 2021 12:54:02 +0000 Original-Received: (at 47388) by debbugs.gnu.org; 27 Mar 2021 12:53:34 +0000 Original-Received: from localhost ([127.0.0.1]:43536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ8Ra-0001Pi-DE for submit@debbugs.gnu.org; Sat, 27 Mar 2021 08:53:34 -0400 Original-Received: from mail-io1-f53.google.com ([209.85.166.53]:34531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ8RX-0001PO-1H for 47388@debbugs.gnu.org; Sat, 27 Mar 2021 08:53:33 -0400 Original-Received: by mail-io1-f53.google.com with SMTP id x16so8180794iob.1 for <47388@debbugs.gnu.org>; Sat, 27 Mar 2021 05:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yZpTCa8V8VwFCM1UaraoH9YRi5uh1j5VBrICuFEwc+k=; b=aJAy44IrBDw2Ez8SQZWF+rJLFh1IZFoLfSIjZ1SiCSvShPlMrO6q5CCnYmQA0BZhkb 7tG2hHk1VH4K/mAEWcNMiXiieExbmnZAMLlL6i8lqGRZCi0hQ4AJVFkb+P7SqyrfL4EI 2KP9/F4W8rY+PUn2U61kbcTVhalwhTvkvOYyI4njPdC0Yt8IzLfZQVP2Gvg/5seTsyWo 8hekSDRYUOTX6B79UMzFZMrAyIsnf5RRfJ2ze5cs6L2HpthZK+F6gbgkZLET97DEriIw PTDncV9SPTsDFaRQ9f6AOQbXuiaI7S2/og7er+opLm5X5KbckO1xXyZtlU62fVcTcAWO 2ofQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yZpTCa8V8VwFCM1UaraoH9YRi5uh1j5VBrICuFEwc+k=; b=loZsYQJp4ThPNMH+jwUrhNUP6rEiA6XWjgLRCkcRcDsSLg9+nQ8BT/rpltKA1/5EpG SVcnpB9BALxi+1jKsv8/AHam+TYre7nHt+LwUXY26/SvG6rD8nb2kmyBWJnIdC08r0Jf lhwaBrVXrx/GgQQ2WYJr64YsIXP0WWX9kxsiEnSKQt/uO3kRmjq3skCR6+nq1bjKeGtC XHEyU1cpXIoJ1AF26JSpDSvxdfsyBJiF9eoPduVVS+08gqDhOr55e/iAQjDJjrCr7kWd 6P6oNdulQ7Ioe5n+N8RyEko4peUtkKdRGlp/zzDuJswx1n//ZqRu2Z5LXic1mt6kZ6H5 8jvw== X-Gm-Message-State: AOAM532o8scosDqSZxEUKkWnDPLjnmRj+O/WwZwi8kr8UvDS4OnTb0AR ZeBcTYChNX+xd0xTh0jOEQvQscZ2kR8NScGyPk8= X-Google-Smtp-Source: ABdhPJymuTr0IcEEt+Mp6Lk2otUIG6PONlGr97A6A8eZOZReN3mAP6Y0kWcDhDD8uWqT9YkG/+e3DqCI7qr5izQF6I0= X-Received: by 2002:a5e:8610:: with SMTP id z16mr13494079ioj.57.1616849605144; Sat, 27 Mar 2021 05:53:25 -0700 (PDT) In-Reply-To: <87y2e894x6.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203122 Archived-At: --0000000000005eb28905be8422f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Mar 27, 2021 at 12:06 PM Alex Branham wrote: > On Fri 26 Mar 2021 at 20:34, Jo=C3=A3o T=C3=A1vora = wrote: > > > Ah, I get it, so ess-mode does something different. > > I'm not sure I understand - different from what? > It does different things depending on the situation it thinks it finds itself in. (if (function-equal #'ignore eldoc-documentation-function) > (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t= ) > (add-function :before-until (local 'eldoc-documentation-function) > #'ess-r-eldoc-function)) > I'm not sure you're improving much here. My idea is that, if you find eldoc-documentation-functions (plural) to be bound you may need to check that eldoc-documentation-strategy (or eldoc-documentation-function (singular)) ISN'T #ignore and buffer-locally adjust it accordingly to something of your preference or your users' preference. Alternatively, you can just keep using the old technique which is a lot of parts of Emacs do (like elisp-mode in Emacs 27.1, for example), i.e. use the else branch in your if, and only that. You don't seem to be using = a ny of the new ElDoc features like multiple documentation functions anyway. That should also work for your Eglot-less rss-mode. When using Eglot-ified rss-mode Eglot will do the right thing regardless of the approach you take above. All this said, I think this issue should be kept open nonetheless. If indee= d the new package's defcustom could clobber the global value of eldoc-documentation-function if it finds it to be #'ignore I think it should be fine. CC-ing Stefan Monnier for an opinion on this last part. Jo=C3=A3o T=C3=A1vora --0000000000005eb28905be8422f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Mar 27, 2021 at 12:06 PM Alex Bra= nham <alex.b= ranham@gmail.com> wrote:
On Fri 26 Mar 2021 at 20:34, Jo=C3=A3o T= =C3=A1vora <jo= aotavora@gmail.com> wrote:

> Ah, I get it, so ess-mode does something different.

I'm not sure I understand - different from what?
<= br>
It does different things depending on the situation it thinks=
it finds itself in.

(if (function-equal #'ignore eldoc-documentation-function)
=C2=A0 =C2=A0 (add-hook 'eldoc-documentation-functions #'ess-r-eldo= c-function nil t)
=C2=A0 (add-function :before-until (local 'eldoc-documentation-function= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #'ess-r-eldoc-f= unction))

I'm not sure you're i= mproving much here.=C2=A0 My idea is that,
if you find eldoc-docu= mentation-functions (plural) to be bound you
may need to check th= at eldoc-documentation-strategy (or
eldoc-documentation-func= tion (singular)) ISN'T #ignore and
buffer-locally adjust it = accordingly to something of your preference
or your users' pr= eference.

Alternatively, you can just keep usi= ng the old technique which is a lot
of parts of Emacs do (like el= isp-mode in Emacs 27.1, for example), i.e.
use the else branch i= n your if, and only that.=C2=A0 You don't seem to be using a
= ny of the new ElDoc features like multiple documentation functions anyway.<= /div>
That should also work for your Eglot-less rss-mode.
When using Eglot-ified rss-mode Eglot will do the right thing = regardless
of the approach you take above.

All this said, I think this issue should be kept open nonetheless. If in= deed
the new package's defcustom could clobber the global val= ue of
eldoc-documentation-function if it finds it to be #= 9;ignore I think it should
be fine.

CC-ing Stefan Monnier for an opinion on this last part.

=
Jo=C3=A3o T=C3=A1vora
--0000000000005eb28905be8422f0--