From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#62029: 29.0.60; Allow users to customize eldoc buffer separator Date: Sat, 25 Mar 2023 08:10:46 +0000 Message-ID: References: <0C40D168-54D5-47E9-8BD8-77CFCD70B895@gmail.com> <87355vdufe.fsf@gmail.com> <87h6uacadx.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="blaine.gmane.org:116.202.254.214"; logging-data="12610"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62029@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 25 13:14:42 2023 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 1pg2nC-00035U-F3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Mar 2023 13:14:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg2mb-0004E8-OU; Sat, 25 Mar 2023 08:14:05 -0400 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 1pg2ma-0004D8-Fd for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 08:14:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pg2ma-00029M-6x for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 08:14:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pg2bt-0004E1-Sj for bug-gnu-emacs@gnu.org; Sat, 25 Mar 2023 08:03: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: Sat, 25 Mar 2023 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62029 X-GNU-PR-Package: emacs Original-Received: via spool by 62029-submit@debbugs.gnu.org id=B62029.167974576216208 (code B ref 62029); Sat, 25 Mar 2023 12:03:01 +0000 Original-Received: (at 62029) by debbugs.gnu.org; 25 Mar 2023 12:02:42 +0000 Original-Received: from localhost ([127.0.0.1]:41928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg2bZ-0004DL-LV for submit@debbugs.gnu.org; Sat, 25 Mar 2023 08:02:41 -0400 Original-Received: from mail-qt1-f180.google.com ([209.85.160.180]:40754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pg2bX-0004D5-PD for 62029@debbugs.gnu.org; Sat, 25 Mar 2023 08:02:40 -0400 Original-Received: by mail-qt1-f180.google.com with SMTP id x1so3963342qtr.7 for <62029@debbugs.gnu.org>; Sat, 25 Mar 2023 05:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679745754; 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=ke133J6nMm+X6eBeehidc6EBCbDDN9HUERxRl8wy5sw=; b=HnnkNx/cW6fXnsB7mwDcMqMkizjaMF/DGmZ6yNRzYKga6UU6aNEb7aTnmFDjF1Tn3A SXVfJ13JCPmvTP8eggYBHtIAUSCpAZzj+imXyAra8JH23IzU8+sKsn22GnsQOHTc/mt9 0I3NaszjAX6uXYKrIFBls+qKjya40JMmMxbWbJdtYkMfu3hdouuJ+ae+0KfHs2hr6c6E M/dgW7PFWXqKr51ItDfvqyEh4dEy4xIK6DQI6N6pjISYmVDQv+ds12ffDETtqHuw9P5K fuOZ9MsMAU88piUoAyuWiNa/bFyp3H3ZWhCkrlg9DYckrJ8d3F3A+xWhoL8rc+0uKqIT J6qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679745754; 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=ke133J6nMm+X6eBeehidc6EBCbDDN9HUERxRl8wy5sw=; b=KzDEZ1wkc+VFX5BQ8d6axrQVYGseypmH9qGEXpHJAQ14Eci7/s5skU1KX0ESVHDFpJ Sg7KreaedFLA1n0RXXGc3QwCSbfICYbI08Y1siBh1zXJne8UiKiMYbjUR+itmODiK61L bwRkjIMH2v65BsFWh7SLvizMOfMjR+l1LWsrXLfI9Rk9uu5cucYDYwyJBy0tw6l3Uufl OzvW82TfDBhuSsN6TGbGvvgH5OnUMLnmO4LRBoqnwTgMwxbTKeP1QwsKLu51qQmwnbFP fTGSVt/sfdm7iycSVFCvMg12MhC26op2kILKoIJAZiZsdlY4B3gs+T0FaUw9eXedKOfe 7EkQ== X-Gm-Message-State: AO0yUKXNjbAuYcFXepJzMT0wPTUnOLH6dcRwxfHRk+MRXUtD+PIc7CzS sPZ9x7NuQP+quQCCpofXJ0zum8gcmfc0p+h18G4tobgGpq0= X-Google-Smtp-Source: AK7set9Kl+aT35vhuuqQftTHXneAMa4o+i3risNoURWdHtVURWdGTjpVZ4FgfW6Y/xWZOSxzLo/p1s3xaLN+pF74LGo= X-Received: by 2002:a9d:7ac4:0:b0:697:bd4c:1574 with SMTP id m4-20020a9d7ac4000000b00697bd4c1574mr1930490otn.4.1679731735511; Sat, 25 Mar 2023 01:08:55 -0700 (PDT) In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258543 Archived-At: On Sat, Mar 25, 2023 at 3:05=E2=80=AFAM Yuan Fu wrote: > > > > > On Mar 24, 2023, at 10:44 AM, Jo=C3=A3o T=C3=A1vora wrote: > > > > Yuan Fu writes: > > > >> For separator, maybe something like > >> > >> (insert =E2=80=9CTitle" (propertize "-" 'display > >> '(space :align-to right) > >> 'font-lock-face '(:strike-through t) > >> 'face '(:strike-through t))) > >> > >> for GUI, and use underline for terminal. > > > > I've now pushed a commit to master introducing the user variable > > eldoc-doc-buffer-separator. It's not a defcustom yet, as I'm not too > > familiar with those, but feel free to change it. > > > > (defvar eldoc-doc-buffer-separator > > "String used to separate items in Eldoc documentation buffer." > > (concat "\n" (propertize "\n" 'face '(:inherit separator-line :exten= d t)) "\n")) > > > > There is a difference between a separator and a title. I've stopped > > short of adding titles, as I fear it would be confusing unless the > > content allows it. To be investigated later for > > eldoc-display-in-echo-area or maybe you can try it in eldoc-box. > > > > Also, I've been testing with these unpushed changes to elisp-mode.el, > > which render more of the docstring in emacs-lisp-mode. > > > > The use case here is navigating around in an .el file while having a > > window open with the *eldoc* buffer. > > > > Jo=C3=A3o > > Looks good to me (except for the =E2=80=9Cdocumentatiok=E2=80=9D ;-) eldo= c-box can also benefit from this (right now if you use it in emacs-lisp-mod= e, it just shows a thin strip of text, not very exciting). > > I=E2=80=99ll experiment with the title thing in eldoc-box. Does eglot and= flymake already pass a :source cookie? Those two displaying stuff together= is the most possible case I can think of. > it just shows a thin strip of text, not very exciting). Indeed. I'll present my patch soon in emacs-devel. There's one thing I don't like about it which is that is re-does a lot of complicated parsing for both *Help* and *eldoc* forms. Could be slow, or could be meaningless. Another aspect is that function documentation looks great because there is this nifty describe-function-1 helper, but variable documentation looks poor because there is no such thing. > Does eglot and flymake already pass a :source cookie? You mean ':origin', not ':source'. Though the latter name is acceptable and there's plently of time to change to it if you think it's better or more consistent with other parts of Emacs. Yes they do. This cookie is automatic. Maybe I should state that in the documentatiok. > Those two displaying stuff together is the most possible case > I can think of. In Eglot it's very usual to have three sources, and in Emacs Lisp you can also have three (function, variable and flymake). You do need to set eldoc-documentation-strategy to eldoc-documentation-compose though (this should really be the default). Jo=C3=A3o