From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Documentation by function beyond elisp Date: Fri, 10 Mar 2023 15:33:59 +0000 Message-ID: References: <4Rj4EZNhsddTjHzoYuycFzMpjNTJjjwmdDcAgyuMcSFsBePmPBTtlxUENKjf4W1xOVcdDeZIFfHJxD9uRInDURGMdmiIPJ_BB1BvgQ8ylJI=@protonmail.com> <87lek5ynm6.fsf@localhost> 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="9530"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuri Khan , Ihor Radchenko , goncholden , "emacs-devel@gnu.org" To: Eshel Yaron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 10 16:35:02 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 1paelp-00029m-Sc for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Mar 2023 16:35:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pael4-0000qk-PT; Fri, 10 Mar 2023 10:34:14 -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 1pael3-0000oJ-JY for emacs-devel@gnu.org; Fri, 10 Mar 2023 10:34:13 -0500 Original-Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pael1-0005oL-Uc for emacs-devel@gnu.org; Fri, 10 Mar 2023 10:34:13 -0500 Original-Received: by mail-ot1-x336.google.com with SMTP id p13-20020a9d744d000000b0069438f0db7eso3135961otk.3 for ; Fri, 10 Mar 2023 07:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678462450; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nez0IrRbG+H1fUutg12h8NN5itV0dfXZlohrDABx1J0=; b=YWT49qTJpMPM/lHhV3+D7S1m1x5DFSEQ3MIdmPn4EeECZoigiR3Rmcbj2y0Brs2vmx RMWa5vTt7iGSNqYkl6LUb2g2y0CR4K6KyLfVxCy/ZRfVoCm0YfocHS5ym//ykeCDewpE kjfGF2hs6+im2QpLxiMKQ6tG+WvQOr1D0iXbvkMRlBeg6aVDcQoHIOduFF7A/xTPTPva +VJUr5hXOPIBpxoMDz1IG+EbTsGhEpdEzHVHkIlH7wnXRLDf7ZN9rENQoLav+Wg6acNh 19RWyUTq2zN5smw6IJk6JUxyeMDXf5j17XvAItDq/BC2tT/OmIwSyHBZuiA5HcrocM1o AhXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678462450; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nez0IrRbG+H1fUutg12h8NN5itV0dfXZlohrDABx1J0=; b=7pq7MD8sJFVkaIaKjWp/aR4lRpk4M2IWlcF6KLiRoedSKROHeMM96UsqfbRB/NmOYi rIB9EA2Uw1W3r2oj78PxHfC39eUGCJ/ffkFo8vhc/aSrwY/FBHCH+jEpJmjZH+Yws/Xq 9BlnCbLo/VfYruvhg+7pYPb5Gr6oOIrYwNyXw7mQLIEJmuwGc5rsvlGb0nBd7o6pSl69 K3KXa2HSDMv+80IqaAIDMoxxD3qJlCtK6h5Iim97C03mrQX0R9AGzjXgyVyfapqYoOgE lkl3dv7+clqdNwh6PEtrCITY4UigrQKz3S2eVJBdWu6DiOqeo9iJPHt8pcWgMNgkncFL 1m1w== X-Gm-Message-State: AO0yUKWRXbWM15+BcfxbIBM13zGVeo759jXtB/3KLd2MqZbVJDlwSMFf z0PZcvThqIaKAjRvrQxQ3xUl+vUO/HDPBrMFkxA= X-Google-Smtp-Source: AK7set+gqyEywCbkW+7TdaKFEVYWYr8UNrFghagJQ720XsQMCYizfB03oi0oMzDCj8ceLZ+ZQYiPzb9tYcELnS4BzLc= X-Received: by 2002:a9d:7105:0:b0:690:c81f:d459 with SMTP id n5-20020a9d7105000000b00690c81fd459mr8341701otj.3.1678462450363; Fri, 10 Mar 2023 07:34:10 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::336; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x336.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:304250 Archived-At: On Fri, Mar 10, 2023 at 2:51=E2=80=AFPM Eshel Yaron wro= te: > > Yuri Khan writes: > > > On Fri, 10 Mar 2023 at 16:12, Ihor Radchenko wrot= e: > >> > >> 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. They are different in implementation, but there is definitely overlap, and not in small amount. I'm not saying this is ideal, but that's what it is. Both features show documentation for language elements. One difference is that it is just much easier to hook up ElDoc to multiple asynchronous and synchronous documentation providing features, such as Eglot's LSP interface, but also SLY, SLIME, CIDER as examples. Also, using help-mode, the major mode must do all the window management and documentation rendering. It's not immediately clear if it can be used to exert generic control over how documentation is displayed, like eldoc.el can. It's also not immediately clear how to use it with asynchronous documentation sources. Eldoc.el lives in lisp/emacs-lisp, but it was effectively already being used for other languages and modes long before I reworked some of its interfaces. The manual is very underdeveloped, but IMHO a much more promising feature. I myself have never used *Help* for anything but Emacs lisp, where I do appreciate it immensely. > Eglot integrates with ElDoc but not with Help AFAIU, > but language-specific packages can (and should!) integrate > with both of these facilities. I'm not saying the contrary, but I'd say that for a new mode for language-x it's easier to setup Eldoc with an external documentation-producing program, an inferior process (like SLY/CIDER) leave it to LSP via Eglot. Fully fleshing out a *Help* renderer like you did in sweeprolog.el seems a lot more work. Jo=C3=A3o