unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
@ 2022-10-30  9:05 Felician Nemeth
  2022-10-30 10:18 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Felician Nemeth @ 2022-10-30  9:05 UTC (permalink / raw)
  To: 58892

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

Eglot now has a beautiful documentation in info format.  This patch
let the user open it from Eglot's menu.

BTW, the menu is the mode-line and I think it cannot be accessed using
only the keyboard.  Would it make sense to put this menu in the "Tools"
part of the menu-bar as well?

Thanks.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-eglot-manual-Open-the-local-info-documentation.patch --]
[-- Type: text/x-diff, Size: 1072 bytes --]

From 2877c7ef6832b7f1bc3f3cfd46d8701dafa0af43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felici=C3=A1n=20N=C3=A9meth?= <felician.nemeth@gmail.com>
Date: Sun, 30 Oct 2022 09:51:46 +0100
Subject: [PATCH] eglot-manual: Open the local info documentation

* lisp/progmodes/eglot.el (eglot-manual): Open the local info
documentation instead of the on-line version.
---
 lisp/progmodes/eglot.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index c587061837..1d67f37e34 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1823,8 +1823,8 @@ eglot--mouse-call
                                            (call-interactively what)
                                            (force-mode-line-update t))))))
 
-(defun eglot-manual () "Open on-line documentation."
-  (interactive) (browse-url "https://github.com/joaotavora/eglot#readme"))
+(defun eglot-manual () "Open documentation."
+  (interactive) (info "(eglot)"))
 
 (easy-menu-define eglot-menu nil "Eglot"
   `("Eglot"
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-30  9:05 bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation Felician Nemeth
@ 2022-10-30 10:18 ` Eli Zaretskii
  2022-10-30 12:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-30 13:32   ` Felician Nemeth
  0 siblings, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2022-10-30 10:18 UTC (permalink / raw)
  To: Felician Nemeth, Lars Ingebrigtsen, Stefan Monnier; +Cc: 58892

> From: Felician Nemeth <felician.nemeth@gmail.com>
> Date: Sun, 30 Oct 2022 10:05:25 +0100
> 
> Eglot now has a beautiful documentation in info format.  This patch
> let the user open it from Eglot's menu.
> 
> BTW, the menu is the mode-line and I think it cannot be accessed using
> only the keyboard.  Would it make sense to put this menu in the "Tools"
> part of the menu-bar as well?

I'm unsure about any of this.  We don't do anything like that for any
other mode, AFAIR.  And Eglot's main features are already mentioned in
short in the Emacs user manual.

What do others think?  Lars, Stefan?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-30 10:18 ` Eli Zaretskii
@ 2022-10-30 12:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-10-30 12:53     ` Eli Zaretskii
  2022-10-30 13:32   ` Felician Nemeth
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-30 12:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, Felician Nemeth, 58892

>> Eglot now has a beautiful documentation in info format.  This patch
>> let the user open it from Eglot's menu.
>> 
>> BTW, the menu is the mode-line and I think it cannot be accessed using
>> only the keyboard.  Would it make sense to put this menu in the "Tools"
>> part of the menu-bar as well?
>
> I'm unsure about any of this.  We don't do anything like that for any
> other mode, AFAIR.  And Eglot's main features are already mentioned in
> short in the Emacs user manual.
>
> What do others think?  Lars, Stefan?

I don't think it makes much sense to add this specifically for
Eglot, indeed.  It might make sense OTOH to add to the Help menu an
entry that lets you jump directly to the docs relevant to the current
modes.

It could be a submenu generated by considering the list of all currently
active minor modes (buffer-local and global) plus the current major mode
(and its parents, maybe?) and for each one of them try and find out
where they might be documented (e.g. relying on a symbol property
to map a mode to its Info node?).


        Stefan






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-30 12:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-30 12:53     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2022-10-30 12:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: larsi, felician.nemeth, 58892

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Felician Nemeth <felician.nemeth@gmail.com>,  Lars Ingebrigtsen
>  <larsi@gnus.org>,  58892@debbugs.gnu.org
> Date: Sun, 30 Oct 2022 08:42:32 -0400
> 
> I don't think it makes much sense to add this specifically for
> Eglot, indeed.  It might make sense OTOH to add to the Help menu an
> entry that lets you jump directly to the docs relevant to the current
> modes.

Sure, I'm okay with providing a general feature like that.  Sounds
useful.  It could also be a variant of "C-h m", perhaps when that is
invoked with a prefix argument (so that the feature could be reachable
without a mouse).





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-30 10:18 ` Eli Zaretskii
  2022-10-30 12:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-30 13:32   ` Felician Nemeth
  2022-10-30 14:02     ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Felician Nemeth @ 2022-10-30 13:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, Stefan Monnier, 58892

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Felician Nemeth <felician.nemeth@gmail.com>
>> Date: Sun, 30 Oct 2022 10:05:25 +0100
>> 
>> Eglot now has a beautiful documentation in info format.  This patch
>> let the user open it from Eglot's menu.
>> 
>> BTW, the menu is the mode-line and I think it cannot be accessed using
>> only the keyboard.  Would it make sense to put this menu in the "Tools"
>> part of the menu-bar as well?
>
> I'm unsure about any of this.  We don't do anything like that for any
> other mode, AFAIR.  And Eglot's main features are already mentioned in
> short in the Emacs user manual.

Currently, Eglot has a menu item that opens
https://github.com/joaotavora/eglot#readme.  I think opening that URL
doesn't make sense anymore since eglot.texi is the primary source of the
documentation.   Is it OK then to remove this menu item?

It seems I couldn't clearly articulate my other suggestion.  When I
write this reply I can click on the mode-line to open message-mode-menu,
but this menu is also available from the menu bar.  I'd tried to suggest
something similar to Eglot.

(The last item in message-mode-menu is "Message manual", so there is
prior art to what the patch of this bug report tries to achieve.)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-30 13:32   ` Felician Nemeth
@ 2022-10-30 14:02     ` Eli Zaretskii
  2022-10-31 13:22       ` João Távora
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-10-30 14:02 UTC (permalink / raw)
  To: Felician Nemeth, João Távora; +Cc: larsi, monnier, 58892

> From: Felician Nemeth <felician.nemeth@gmail.com>
> Cc: 58892@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>, Stefan
>  Monnier <monnier@iro.umontreal.ca>
> Date: Sun, 30 Oct 2022 14:32:39 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Felician Nemeth <felician.nemeth@gmail.com>
> >> Date: Sun, 30 Oct 2022 10:05:25 +0100
> >> 
> >> Eglot now has a beautiful documentation in info format.  This patch
> >> let the user open it from Eglot's menu.
> >> 
> >> BTW, the menu is the mode-line and I think it cannot be accessed using
> >> only the keyboard.  Would it make sense to put this menu in the "Tools"
> >> part of the menu-bar as well?
> >
> > I'm unsure about any of this.  We don't do anything like that for any
> > other mode, AFAIR.  And Eglot's main features are already mentioned in
> > short in the Emacs user manual.
> 
> Currently, Eglot has a menu item that opens
> https://github.com/joaotavora/eglot#readme.  I think opening that URL
> doesn't make sense anymore since eglot.texi is the primary source of the
> documentation.   Is it OK then to remove this menu item?

Fine by me, but please wait for João to chime in.

> It seems I couldn't clearly articulate my other suggestion.  When I
> write this reply I can click on the mode-line to open message-mode-menu,
> but this menu is also available from the menu bar.  I'd tried to suggest
> something similar to Eglot.

It's okay to display a "Minor mode menu" from the mode-line's mode
lighter, yes.  We do that for other minor modes.  But we should be
careful not to make that menu too long.

> (The last item in message-mode-menu is "Message manual", so there is
> prior art to what the patch of this bug report tries to achieve.)

I think that's an exception rather than a rule.  Mode-specific menus
rarely have an item for their manuals.  And Eglot should need that
less than others, since most of its features just provide backends for
existing Emacs features.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-30 14:02     ` Eli Zaretskii
@ 2022-10-31 13:22       ` João Távora
  2022-10-31 13:36         ` Eli Zaretskii
  2022-11-11 13:05         ` Stefan Kangas
  0 siblings, 2 replies; 9+ messages in thread
From: João Távora @ 2022-10-31 13:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, Felician Nemeth, monnier, 58892

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

On Sun, Oct 30, 2022 at 2:02 PM Eli Zaretskii <eliz@gnu.org> wrote:

>
> > Currently, Eglot has a menu item that opens
> > https://github.com/joaotavora/eglot#readme.  I think opening that URL
> > doesn't make sense anymore since eglot.texi is the primary source of the
> > documentation.   Is it OK then to remove this menu item?
>
> Fine by me, but please wait for João to chime in.
>

Yes, it's fine. Show a patch and or push directly if you have permissions.


> > (The last item in message-mode-menu is "Message manual", so there is
> > prior art to what the patch of this bug report tries to achieve.)
>
> I think that's an exception rather than a rule.  Mode-specific menus
> rarely have an item for their manuals.  And Eglot should need that
> less than others, since most of its features just provide backends for
> existing Emacs features.
>

Yes, that's true. But users are not really familiar with all of them: they
don't
have the visibility that Eglot has.  So Felicián's idea makes sense to me,
judging from these years of watching the Eglot bug tracker (where Felicián
is a long-time regular, which would explain why he thinks this feature is
useful).

If there was a keybinding C-xyz so that C-xyz RET eglot RET would land
one in the Eglot manual within Emacs, I think that would come some
way.  Maybe there is this binding?

João

[-- Attachment #2: Type: text/html, Size: 2164 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-31 13:22       ` João Távora
@ 2022-10-31 13:36         ` Eli Zaretskii
  2022-11-11 13:05         ` Stefan Kangas
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2022-10-31 13:36 UTC (permalink / raw)
  To: João Távora; +Cc: larsi, felician.nemeth, monnier, 58892

> From: João Távora <joaotavora@gmail.com>
> Date: Mon, 31 Oct 2022 13:22:56 +0000
> Cc: Felician Nemeth <felician.nemeth@gmail.com>, 58892@debbugs.gnu.org, larsi@gnus.org, 
> 	monnier@iro.umontreal.ca
> 
> If there was a keybinding C-xyz so that C-xyz RET eglot RET would land 
> one in the Eglot manual within Emacs, I think that would come some 
> way.  Maybe there is this binding?

Yes, it's "C-h R".





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation
  2022-10-31 13:22       ` João Távora
  2022-10-31 13:36         ` Eli Zaretskii
@ 2022-11-11 13:05         ` Stefan Kangas
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2022-11-11 13:05 UTC (permalink / raw)
  To: João Távora
  Cc: 58892-done, Eli Zaretskii, Felician Nemeth, larsi, monnier

João Távora <joaotavora@gmail.com> writes:

> On Sun, Oct 30, 2022 at 2:02 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
>  > Currently, Eglot has a menu item that opens
>  > https://github.com/joaotavora/eglot#readme.  I think opening that URL
>  > doesn't make sense anymore since eglot.texi is the primary source of the
>  > documentation.   Is it OK then to remove this menu item?
>
>  Fine by me, but please wait for João to chime in.
>
> Yes, it's fine. Show a patch and or push directly if you have permissions.

Now done, see commit c64d94c849.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-11-11 13:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-30  9:05 bug#58892: 29.0.50; [PATCH] eglot-manual: Open the local info documentation Felician Nemeth
2022-10-30 10:18 ` Eli Zaretskii
2022-10-30 12:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-30 12:53     ` Eli Zaretskii
2022-10-30 13:32   ` Felician Nemeth
2022-10-30 14:02     ` Eli Zaretskii
2022-10-31 13:22       ` João Távora
2022-10-31 13:36         ` Eli Zaretskii
2022-11-11 13:05         ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).