From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#41531: 27.0.91; Better handle asynchronous eldoc backends Date: Tue, 26 May 2020 11:56:12 -0400 Message-ID: References: <875zckuet9.fsf@gmail.com> <4987863b-d390-5f87-eb1c-2cca4f4b7262@yandex.ru> <87blmbrlda.fsf@gmail.com> <87pnaqrae9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="84925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41531@debbugs.gnu.org, andreyk.mad@gmail.com, Dmitry Gutov To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 26 17:57:10 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 1jdbx0-000LyP-4U for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 May 2020 17:57:10 +0200 Original-Received: from localhost ([::1]:52284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdbwz-000752-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 May 2020 11:57:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdbws-000742-Mh for bug-gnu-emacs@gnu.org; Tue, 26 May 2020 11:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdbws-0003Xd-DL for bug-gnu-emacs@gnu.org; Tue, 26 May 2020 11:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jdbws-0006Ag-DT for bug-gnu-emacs@gnu.org; Tue, 26 May 2020 11:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 May 2020 15:57:02 +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.159050858823674 (code B ref 41531); Tue, 26 May 2020 15:57:02 +0000 Original-Received: (at 41531) by debbugs.gnu.org; 26 May 2020 15:56:28 +0000 Original-Received: from localhost ([127.0.0.1]:46237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdbwJ-00069m-Le for submit@debbugs.gnu.org; Tue, 26 May 2020 11:56:28 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdbwI-00069Q-Az for 41531@debbugs.gnu.org; Tue, 26 May 2020 11:56:26 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D459344095C; Tue, 26 May 2020 11:56:19 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F2A6D440947; Tue, 26 May 2020 11:56:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1590508573; bh=tjT3VvlwmGlj8Sh6s0htvR9NsecfKOfIJZoasKN3nVo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CeLv/2WgzyOp8ABYIzkROZgf1RRwBNINnHv5HP27lgbtMKozOtRsZ7JwYqZBWytAJ 1ad8TmFuUEqGxZ83SHtVbOtPjixwRqSNcO0dTm913qY/M2ny7K6xd6go0POOXB3s0W 0lPrqk/Nux28RmYyCHB5FC6PM4Gk47z9l2Y6/wKm0PQQ0ht3gecSNK/+8dqopbFFfX qOdYMoT+0telLfpMVXUbAtzVhLREANn7VA/NEo+H1EbfwvA4MO7OIXkrob3SIurSKe fZfsMeBlra8p70v4WSCBny3WybteNZa/44tb5ZD1cL41HxUt0f5dewvj0i8T3ouA/V u8EG3I1jahqVQ== Original-Received: from milanesa (unknown [216.154.27.250]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6D7ED120388; Tue, 26 May 2020 11:56:13 -0400 (EDT) In-Reply-To: <87pnaqrae9.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Tue, 26 May 2020 16:19:58 +0100") 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:181046 Archived-At: > It's not complete, is it? Don't know. I have the impression that it's complete enough to give you the same "power" as the callback argument. I.e. instead of (funcall BACKEND CALLBACK) you (eldoc-future-set-callback (funcall BACKEND) CALLBACK) and instead of (funcall CALLBACK VALUE) you (eldoc-future-set-value FUT VALUE). > And how to I use it to solve the > eldoc-documentation-compose problem? AFAIK this is orthogonal to the technique we use for the backend to run eldoc's callback code. > I suppose it's possible, anything > is. But do we really want to hand-roll futures in eldoc.el when we got > this nice https://github.com/skeeto/emacs-aio/commits/master that we > could be looking into? I'm not familiar with that package, so I can't judge. It might be an even better option, indeed. > Also the latest patch I attach solves the eldoc-documentation-compose > problem decently (should actually be less LOC than previous versions). > I suggest we go with this tried-and-tested well-understood solution and > then adjust as more sophisticated solutions come along and we evaluate > their merits. The use of futures has been discussed forever in the context of several packages. That's why at this stage, I think either we decide to drop the idea or to start using it. I'm OK with either option. Stefan