From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#41531: 27.0.91; Better handle asynchronous eldoc backends Date: Fri, 05 Jun 2020 12:26:37 +0100 Message-ID: <878sh1lpn6.fsf@gmail.com> References: <875zckuet9.fsf@gmail.com> <4987863b-d390-5f87-eb1c-2cca4f4b7262@yandex.ru> <87blmbrlda.fsf@gmail.com> <87pnaqrae9.fsf@gmail.com> <877dwyr7b9.fsf@gmail.com> <871rn6r0pr.fsf@gmail.com> <875zc8nhue.fsf@gmail.com> <877dwnnaxx.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="ciao.gmane.io:159.69.161.202"; logging-data="44462"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Christopher Wellons , Dmitry Gutov , andreyk.mad@gmail.com, 41531@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 05 13:27:25 2020 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 1jhAVQ-000BQU-Ca for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 13:27:24 +0200 Original-Received: from localhost ([::1]:55192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhAVP-0002A2-EM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jun 2020 07:27:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhAV4-0001sW-6B for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 07:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhAV3-0002r8-T5 for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 07:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhAV3-00070F-OO for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2020 07:27:01 -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: Fri, 05 Jun 2020 11:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41531 X-GNU-PR-Package: emacs Original-Received: via spool by 41531-submit@debbugs.gnu.org id=B41531.159135640926897 (code B ref 41531); Fri, 05 Jun 2020 11:27:01 +0000 Original-Received: (at 41531) by debbugs.gnu.org; 5 Jun 2020 11:26:49 +0000 Original-Received: from localhost ([127.0.0.1]:48410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhAUr-0006zl-BZ for submit@debbugs.gnu.org; Fri, 05 Jun 2020 07:26:49 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:37543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhAUq-0006zZ-77 for 41531@debbugs.gnu.org; Fri, 05 Jun 2020 07:26:48 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id y20so1021393wmi.2 for <41531@debbugs.gnu.org>; Fri, 05 Jun 2020 04:26:48 -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=xxOYCOM/ZtKjqtBwBmFlfl3dHatjIzR/tty1FP0Lqns=; b=rFXJ6RcA5J5E2DDR0990Bxab2sYYxZa50ykwOdkXoBBP0fd1gEQCUp/3OcaQFyxdlt UZKBAlN6owK/360/fxwn3WW7hS+a3pdc9BWAfN6Z2+Vlg2crLLIzZo5uFNOP3MwIPNvf nEnXSAjBeitXkR6fuOwYjfYlcks1wkYCZQcUX46vqqqRSOfSYWziCj9q8hhDB5qL8y+x YpPuIDOOVwJ6CQ5JFogpzpAWBhJh+nTSD0ZuG3CU4pMUELC96Thp9EM+1yUgKsnNs3tA NeUEGuhY9o77apByP2P7WAWnS/NGCko1GZzbvIFGAPtkLSEG3zsex2cyHf2PFP/HwUJW 9r+g== 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=xxOYCOM/ZtKjqtBwBmFlfl3dHatjIzR/tty1FP0Lqns=; b=HsX1b1y5/KVeYaxc90E6ddY8/aa4HjIv6mIu/xUn7fuuiVwmmJ0F6tbdWj/I30428c Qy5sxsBWFWIGbTJ0fwDKPnzA1xVqhAYhS/90fqdMC30vfm76EB6dL4DzBBSNRKxhsg0r umowwvl/pwYHZhT8hOc8ywb+9iDblJJ7dZ+LYzTywzP6Ov/Eo+/XVzi+5l1bGQcO3UbI IdlSyfQnBqWP/I6YbiqhziN4pQjTz3QHgEa7q0lYS/0lrafruZLk0QkNKig1JC83en3c mWjjjBORG0aVy4xnFGcZjvt/Wsk3u86hhn4Z6EYYMomQlSBx5QDvPafwZFUwD7rBnBd4 KRFQ== X-Gm-Message-State: AOAM531vF/rM7o6NV/U9V+cbVaSiveKgmFYj1OVE4ie3EfXBh3zIWHrA 5JV1XLwcyIsjkYDl/qL/EfU= X-Google-Smtp-Source: ABdhPJyniLwZjerjcKrfb4szY3j8bwRIg6L139GRXC9Lv962JLpFdIrSTAZcp7m6RkgUAr8V03txgw== X-Received: by 2002:a1c:6244:: with SMTP id w65mr2249800wmb.82.1591356402127; Fri, 05 Jun 2020 04:26:42 -0700 (PDT) Original-Received: from krug ([89.180.149.24]) by smtp.gmail.com with ESMTPSA id r2sm12565802wrg.68.2020.06.05.04.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 04:26:39 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 03 Jun 2020 17:21:53 -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:181548 Archived-At: Stefan Monnier writes: >>> You mean a single call could return first a function signature and >>> a while later a docstring? >> No, that's not what I mean. Those should be two different members of >> eldoc-documentation-functions (plural). > Great. Indeed, I can see 3 eldoc sources for emacs-lisp mode, in this order: - function signature - docstring - special variable value If emacs-lisp-mode one uses the default display strategy (eldoc-documentation-default or some rename of that) and sets eldoc-echo-area-use-multiline-p to 1, it should be fully backward compatible to the current behaviour. Alternatively, we can have emacs-lisp-mode keep out of eldoc-echo-area-use-multiline-p and use 4 sources: - function signature - one-line docstring - special variable value - remaining paragraphs of docstring ( At some point, if we compose all of these bits of information in the volatile *eldoc* buffer, it will start looking a lot like *Help* for C-h o, There's some integration work to do there, but I'd rather not open that can of worms just now. ) >>>> The callback strategy makes it easy because there are lambda lists of >>>> all shapes and sizes. >>> It's trivial to use a list to bring the number back down to 1, so it's >>> not much of a difference. >> Yes, I agree, but it's IMO easier to read (funcall cb :foo 42 :baz 23) >> than (set-value fut (list :foo 42 :baz 23)). > > I find the difference largely irrelevant. Much more important is > what kinds of :foo and bar are allowed and what they do. I agree. Content is more important than style. Of course style matters, too. Occasionally, it matters overwhelmingly. But not here. I'd say. The promises-vs-callbacks discussion is a matter of style. >> In fact, a much better name for eldoc-documentation-function (singular) >> is eldoc-documentation-strategy, not least because it relieves us from >> this silly singular/plural confusion. > > Sounds very good. Changing its name will make it possible to fix the > current backward-incompatibility (which we'd fix by re-introducing a(n > obsolete) eldoc-documentation-function). Yes, that's the plan. Jo=C3=A3o