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: Sun, 28 Mar 2021 19:45:47 +0100 Message-ID: <87wntrdsmc.fsf@gmail.com> 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> <87zgynbjy4.fsf@gmail.com> <874kgvfi2p.fsf@gmail.com> <87v99buuud.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7901"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , Stefan Monnier , 47388-done@debbugs.gnu.org To: Alex Branham Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 28 20:46:44 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 1lQaQs-0001uw-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 20:46:42 +0200 Original-Received: from localhost ([::1]:51910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQaQr-0002kQ-LS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 14:46:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQaQF-0002KU-2E for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 14:46:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQaQE-0001BD-CH for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 14:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQaQE-0006QE-9u for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 14:46: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: Sun, 28 Mar 2021 18:46: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-done@debbugs.gnu.org id=D47388.161695715924675 (code D ref 47388); Sun, 28 Mar 2021 18:46:02 +0000 Original-Received: (at 47388-done) by debbugs.gnu.org; 28 Mar 2021 18:45:59 +0000 Original-Received: from localhost ([127.0.0.1]:47045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQaQA-0006Pv-Jy for submit@debbugs.gnu.org; Sun, 28 Mar 2021 14:45:58 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:45702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQaQ8-0006Ph-KI for 47388-done@debbugs.gnu.org; Sun, 28 Mar 2021 14:45:57 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id j9so8912466wrx.12 for <47388-done@debbugs.gnu.org>; Sun, 28 Mar 2021 11:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=EFqdD9k2lUI+uYCSxyJgdPQltLmwBEhfsnpQoOwUaoU=; b=AoE/c/5sBl7ZWByEMd/TXFmKwjCuvJm0FuL7spD7oIKmzd1yzmkfGsPaAdQXJfQUQ0 JMlJmgU1mx3HUyyRkIB/VrG2RhqlnFlp1+Kp9dqXl+sFr8j//U8SaXbyJWurNSx3vGtY ZTWKy5bbakaI+teqZLOIOUA4bWyq5CB/A3ptdN3Lqgb7AU1OfipOrNWdEz1n8OyzP4oe SONzDvcIROn1+ZESk02VBMJ3LJG0BBr43CBEpga1WByZNhtZBvIcB9453GyHdyyrVd2e nvLExTvJnmlwvfwqRxE5dryW307HivZYareQYBeNtzV6yd0GgNZh2NxP34kfhfGFZieG U9+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=EFqdD9k2lUI+uYCSxyJgdPQltLmwBEhfsnpQoOwUaoU=; b=EgdkUXnSPDImuxqDbG9NF8UWjC/iduvYy86+XUfj2v0ubut3qNUHd6usnIpBTCXe7v WMaGUR3kZumHPVfmce/DVFbwEkZbLz5IyKrYRTR3LeVr0yhcI4dnnksm+oOm1Kmx7JfO 2xNSo7JsfYY4M8zIz3IN7kt34UbJNJU8Uf/W6Q59tHO8QhA0g8npAs7wHlWO28sMFOuD fiQ9vB9bZhGyK3YLjbHSl2+3QtLaTTjXdRnOnAn4pR0+BMSezC3VfgxLRCe2NOS+OMJ9 bvHs57Lve2mMv3P+Id73PnH1wYHUOxQZOwp8zty5PjURUnfRxfR58rqAULV3jY/sTbr5 exkg== X-Gm-Message-State: AOAM53346XD/v7n5gX5Ii5bNSdQWet+FiurOUjtw5JE1SNuefuKe1/Ql bBp04ilIAYWYb0tQ0OpC6dDQZk3I5CA= X-Google-Smtp-Source: ABdhPJyHLdRkW502htPek5iEq5NmkhyxYMlM7DmhM0MukUW243OwqzevjtUlop248aD405TOfsrw5g== X-Received: by 2002:adf:c64a:: with SMTP id u10mr24845675wrg.412.1616957150446; Sun, 28 Mar 2021 11:45:50 -0700 (PDT) Original-Received: from krug (a94-133-179-151.cpe.netcabo.pt. [94.133.179.151]) by smtp.gmail.com with ESMTPSA id w131sm21868312wmb.8.2021.03.28.11.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 11:45:49 -0700 (PDT) In-Reply-To: <87v99buuud.fsf@gmail.com> (Alex Branham's message of "Sun, 28 Mar 2021 12:05:46 -0400") 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:203202 Archived-At: Alex Branham writes: >>> 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. No idea what the "above" is, let me just summarize the cases: (1) You have Emacs <=3D 27.1 and no new eldoc.el package (2) You have Emacs <=3D 27.1 and a new eldoc.el package (3) You have Emacs >=3D 28 The typical (fboundp 'eldoc-documentation-functions) check works great for cases 1 and 3: you support the new and the old way. Now, sometime in 2020 I introduced the possibility of delivering new Eldoc features to released versions, via the Eldoc ELPA "core" package. That gave rise to case 2: it's offering a new possiblity to support new Eldoc features early, it doesn't remove any possibilities. So: a) If you want to support the new Eldoc features in cases 2 and 3, you have to use the more complex snippet (with or without the byte-compiler warning, you decide if it bothers you) b) If, on the other hand, you just want to support 1 and 3, just use a check on emacs-major-version, instead of the fboundp check. c) If you're confident that your users won't be missing the new eldoc.el features in rss-mode specifically (there's a good chance they won't since it's presumably what they're used to in rss-mode), just use the simple :before-until snippet. And if these users do install something like Eglot, it will take care to do the right thing. d) If you want to only support 2 and 3, and join the wave of the future, you can: Just make the eldoc.el ELPA package a dependency of the rss-mode, much like Eglot. So I think you have lots of options here. Jo=C3=A3o