From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: Documentation by function beyond elisp Date: Fri, 10 Mar 2023 16:50:29 +0200 Message-ID: References: <4Rj4EZNhsddTjHzoYuycFzMpjNTJjjwmdDcAgyuMcSFsBePmPBTtlxUENKjf4W1xOVcdDeZIFfHJxD9uRInDURGMdmiIPJ_BB1BvgQ8ylJI=@protonmail.com> <87lek5ynm6.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36562"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ihor Radchenko , goncholden , "emacs-devel@gnu.org" To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 10 15:51:20 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pae5X-0009E5-Ob for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Mar 2023 15:51:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pae4w-0005BR-S3; Fri, 10 Mar 2023 09:50:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pae4s-0005At-SU for emacs-devel@gnu.org; Fri, 10 Mar 2023 09:50:38 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pae4p-0004N4-R8 for emacs-devel@gnu.org; Fri, 10 Mar 2023 09:50:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1678459833; bh=XvOAuAwWQbj6vgS1OYEtuhP5/m/u8Stk3idsDhlhC4M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=R25ZJ5t7Htkb1ph8K+KXPCeym73T4eU11Km3WQa9DkzxoyT35D4/NnHSsaYvbsqH2 EFS+WEHJhdOrW2pbCE4hy1OdkCvrl8n8mE58BZi6wxjczsDruzOM5fon6ZIp3gcR8E 8TONT7ASG5VwhlBlLnU6gqT8z0tBlPUeKOvRCVMX7njLQX2gLmI+YIMXMs9zkpOEeH 8e0S8WsJVyXAVN8id46gABBTUnnZQmH1CQaGphBmeiZpZ7wT/wkOtcmdCByVExPYC5 1phOiEW0CVouwQ2hpD5Kwww9DDZi2jJ2Fs9ZrPwx5/0g2L4eAwMEQa3Bl32Erk7+/c pNqn97J+3XKGw== In-Reply-To: (Yuri Khan's message of "Fri, 10 Mar 2023 17:23:41 +0700") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304247 Archived-At: Yuri Khan writes: > On Fri, 10 Mar 2023 at 16:12, Ihor Radchenko wrote: >> >> Yuri Khan writes: >> >> > For languages other than Elisp, this is handled by the language >> > server. Eglot arranges for language-server-provided function help to >> > be displayed by ElDoc. >> >> What about an equivalent of the *Help* buffer? > > Well, what about it? You move the point to an identifier. Its > signature and a few lines of documentation are shown in the echo area. > You invoke (eldoc-doc-buffer) and see the whole documentation. > > It may be a bit inconvenient that the content of that buffer changes > as you move point to a different identifier. But that can be worked > around with (clone-buffer). IMO ElDoc and Help and two pretty different features, each with its own use and purpose. Eglot integrates with ElDoc but not with Help AFAIU, but language-specific packages can (and should!) integrate with both of these facilities. Emacs lets package authors reuse the Help UI pretty easily. For example, my package sweeprolog.el (for working with SWI-Prolog code) provides both ElDoc integration and a command sweeprolog-describe-predicate that works much like describe-predicate, it uses the help.el interface to show a proper *Help* buffer with the documentation of a given Prolog predicate. References to other predicates become links to their corresponding *Help* buffers, just like we have for Elisp. It even works for user-defined predicates. Cheers, Eshel