From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Calling eldoc-message directly Date: Wed, 9 May 2018 22:43:04 -0400 Message-ID: <758bc5a6-bfa6-ec16-599c-eadf16e91c21@gmail.com> References: <2aba18fe-4424-6b08-b5e0-e590c039a4de@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1525920101 11218 195.159.176.226 (10 May 2018 02:41:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 May 2018 02:41:41 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 10 04:41:36 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGbWS-0002q2-KW for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 04:41:36 +0200 Original-Received: from localhost ([::1]:59893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGbYZ-0005Fv-Er for ged-emacs-devel@m.gmane.org; Wed, 09 May 2018 22:43:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGbXv-0005Fq-H0 for emacs-devel@gnu.org; Wed, 09 May 2018 22:43:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGbXu-00004s-Lj for emacs-devel@gnu.org; Wed, 09 May 2018 22:43:07 -0400 Original-Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:43317) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGbXu-0008WM-H8 for emacs-devel@gnu.org; Wed, 09 May 2018 22:43:06 -0400 Original-Received: by mail-qk0-x236.google.com with SMTP id h19-v6so473063qkj.10 for ; Wed, 09 May 2018 19:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=a9xCdosM5GAXuwkKtAT5MB0bfVoEgvwee9F6SN3Lvcw=; b=OC1yWV7134PuQ4oWdZ0h/t79EYl2mTjjt5U9uEh7H6NxnMJN2kAZGX8UUlngPQfK6O AkjjH6u+jHV8yv5ioFDTiarBn+3seUEWsBuui/8ZOS5/Lg2SitQPl0cYnDGcgsdHenLs 5bTp1U3bDc/HdSvy3r6xjzvZujzSvmv2kOnssw+DZT0PsUNp+AIm2f6pZ+MLwprlVmMf QNXVDhVRxjx8Uhoq+eJj1Gc8RmzSrH2/8rZ6V07xjgo4veF3g2iMhgrTxV0ZT0lkA3Ay j5276OnvlL6BLKpI/UI4Q7+0B7KBxlCxx6zp/4Bj3tAoQLi9HL+JqKsUFw2G+AqoXmQg t4Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=a9xCdosM5GAXuwkKtAT5MB0bfVoEgvwee9F6SN3Lvcw=; b=jg17RwyO9YCPOmnt5PiFeOtY3FL95W/GLJtCa8LNqYXFg2jI92gSd38HB7dcf7e+En P/LQgmiG56cgR6fDRHyoLKoAZxv/M5I1xA9UlyL4JzrQKF4jpEIrZLkNRqVi34J5IA8N oEeknWcMILgI2AfZuSR4Tt2c7wfOgD9izBo9ycFHkqiO00b4121lKIptpZ2JadSpiBmJ PKtIfI2Kd3tdzo4Opx7wtbhDTTfBkkYJALSJjZGrzIicGmEepuBHRc0C/fMfxURv8oz0 kP8xH/pPItPPYW86evqta+0C9S9TK4h15lKf3tk/sEKINcsRXe1NB1aOhO5Lhav9diEG d2ZA== X-Gm-Message-State: ALKqPwdychC70aeEJ2Yjq2b4yDRXMJGQfcLAvFKsXuWaVZLX1/e3Yiy8 wl6q5/d9Jy+fvtUIzxIKAenBKZRl X-Google-Smtp-Source: AB8JxZrin1eYRD+Oe3/HRqCN29ldvrFZxaq+6/mFOQqlVYyuvlGdpV6noxuP/rCX0sVSSZHgJ+3pBQ== X-Received: by 10.55.185.134 with SMTP id j128mr19570494qkf.79.1525920185771; Wed, 09 May 2018 19:43:05 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:7d29:3104:b05c:df65? ([2601:184:4180:66e7:7d29:3104:b05c:df65]) by smtp.gmail.com with ESMTPSA id n59-v6sm4127659qtd.3.2018.05.09.19.43.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 19:43:05 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225184 Archived-At: On 2018-05-09 22:01, Stefan Monnier wrote: >> In that package, I use a server process to get information about the current >> buffer. I can use it to asynchronously retrieve documentation about >> identifiers, among other things. This pattern seems pretty common (I think >> that's how tide, elpy, cider, and multiple other modes work). > > Indeed async use is currently not supported. > > Not sure how to best add support for sync-processing. > Ideally, we'd pass a "continuation" to the eldoc-documentation-function, > but that would break existing functions which wouldn't expect that extra arg. > > We could pass that extra arg via a dynamically-scoped variable like > `eldoc-continuation-function`. > > An alternative would be to allow eldoc-documentation-function to return > a function, which is then called with the continuation. That would be nice. This model works pretty well in company-mode.