unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
@ 2023-11-28 11:50 Mekeor Melire
  2023-11-28 16:40 ` Dr. Arne Babenhauserheide
  2023-11-29 14:48 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Mekeor Melire @ 2023-11-28 11:50 UTC (permalink / raw)
  To: emacs-devel

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

In Info-mode, "G" is bound to Info-goto-node-web which opens the 
current manual-node in the browser. It uses `Info-url-for-node' to 
determine the URL, which only supports "elisp" and "emacs" 
manuals.

Are you interested in a patch that adds support for more manuals? We could extend supported docs to include one of these nested sets of software packages:

(1.) All manuals that Emacs contains. I.e. these?: auth autotype 
bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt eieio 
elisp emacs-gnutls emacs emacs-mime epa erc ert eshell eudc eww 
flymake forms gawk gnus htmlfontify idlwave ido info mairix-el 
message mh-e newsticker nxml-mode octave-mode org pcl-cvs pgg 
rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar 
srecode todo-mode tramp url vhdl-mode viper vip widget wisent 
woman.

(2.) Some more or all manuals on gnu.org.

(3.) Some more or all manuals of the GNU project, including those with external websites (or subdomains of gnu.org), e.g. gcc.gnu.org, guix.gnu.org, magit.vc, octave.org.

(4.) Some more manuals of free software with docs generated with "makeinfo".

Yesterday, I wrote a solution for (3.) in my personal Emacs configuration, using an advice for Info-url-for-node. It's attached inline:


[-- Attachment #2: info-extension.el --]
[-- Type: application/emacs-lisp, Size: 4235 bytes --]

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

* Re: Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
  2023-11-28 11:50 Should Info-url-for-node support more than just "elisp" and "emacs" manuals? Mekeor Melire
@ 2023-11-28 16:40 ` Dr. Arne Babenhauserheide
  2023-11-29 14:48 ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-11-28 16:40 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: emacs-devel

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


Mekeor Melire <mekeor@posteo.de> writes:

> In Info-mode, "G" is bound to Info-goto-node-web which opens the
> current manual-node in the browser. It uses `Info-url-for-node' to
> determine the URL, which only supports "elisp" and "emacs" manuals.
>
> Are you interested in a patch that adds support for more manuals?

Definitely interested, yes

> We could extend supported docs to include one of these nested sets of software packages:
> (3.) Some more or all manuals of the GNU project, including those with external websites (or subdomains of gnu.org), e.g. gcc.gnu.org, guix.gnu.org, magit.vc, octave.org.
>
> (4.) Some more manuals of free software with docs generated with "makeinfo".

I would love that, but 3 is already great!

> Yesterday, I wrote a solution for (3.) in my personal Emacs configuration, using an advice for Info-url-for-node. It's attached inline:

Thank you!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

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

* Re: Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
  2023-11-28 11:50 Should Info-url-for-node support more than just "elisp" and "emacs" manuals? Mekeor Melire
  2023-11-28 16:40 ` Dr. Arne Babenhauserheide
@ 2023-11-29 14:48 ` Eli Zaretskii
  2023-11-29 16:02   ` Mekeor Melire
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2023-11-29 14:48 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: emacs-devel

> From: Mekeor Melire <mekeor@posteo.de>
> Date: Tue, 28 Nov 2023 11:50:22 +0000
> 
> In Info-mode, "G" is bound to Info-goto-node-web which opens the 
> current manual-node in the browser. It uses `Info-url-for-node' to 
> determine the URL, which only supports "elisp" and "emacs" 
> manuals.
> 
> Are you interested in a patch that adds support for more manuals? We could extend supported docs to include one of these nested sets of software packages:
> 
> (1.) All manuals that Emacs contains. I.e. these?: auth autotype 
> bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt eieio 
> elisp emacs-gnutls emacs emacs-mime epa erc ert eshell eudc eww 
> flymake forms gawk gnus htmlfontify idlwave ido info mairix-el 
> message mh-e newsticker nxml-mode octave-mode org pcl-cvs pgg 
> rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar 
> srecode todo-mode tramp url vhdl-mode viper vip widget wisent 
> woman.
> 
> (2.) Some more or all manuals on gnu.org.

I think we should support the manuals on gnu.org, but the problem is
it's hard to do that without an explicit list of all of them, and that
list will then have to be continuously maintained to keep it
up-to-date.

So maybe just support all of the manuals that come with Emacs, and
provide a defcustom for users to extend the list by specifying
associations of the form (MANUAL-NAME . URL) ?

> (defcustom /info-urls

We don't begin our symbols with a slash.

>   (if-let*
>     (
>       (_ (string-match "\\`(\\(.+\\))\\(.+\\)\\'" query))

This is not our style of nesting parentheses.

>       ;; Encode a bunch of characters the way that makeinfo does.

I think if we need to follow Texinfo, we should have here a more
specific pointer to where this encoding by Texinfo is documented.

Thanks.



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

* Re: Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
  2023-11-29 14:48 ` Eli Zaretskii
@ 2023-11-29 16:02   ` Mekeor Melire
  2023-11-29 16:34     ` Eli Zaretskii
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mekeor Melire @ 2023-11-29 16:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

2023-11-29 16:48 eliz@gnu.org:

> I think we should support the manuals on gnu.org, but the 
> problem is
> it's hard to do that without an explicit list of all of them, 
> and that
> list will then have to be continuously maintained to keep it
> up-to-date.
>
>
> So maybe just support all of the manuals that come with Emacs, 
> and
> provide a defcustom for users to extend the list by specifying
> associations of the form (MANUAL-NAME . URL) ?

I agree on the scope and will implement it.

Regarding the form of the associations, it seems your suggestion would lead to many of duplications of URLs. I'd prefer to use the form from the shared code snippet, or something similar.


> We don't begin our symbols with a slash.
[...]
> This is not our style of nesting parentheses.

Sorry if I wasn't clear: The attached code was not meant as a patch to Emacs; I was just sharing my personal configuration, in order to ask if you're interested in a patch to Emacs.


> >       ;; Encode a bunch of characters the way that makeinfo 
> >       does.
>
> I think if we need to follow Texinfo, we should have here a more
> specific pointer to where this encoding by Texinfo is 
> documented.

This comment actually is from Emacs' info.el. But I will follow your request and investigate the Texinfo docs.

	https://git.sv.gnu.org/cgit/emacs.git/tree/lisp/info.el?h=7a5c91a2831602c3cd961158cf0b6a876852d7ac#n1806


> Thanks.

Thank you for sharing your thoughts!


I will revisit this thread, when a patch is ready. I'll also do the FSF-copyright-assignment-stuff in the meantime, as the patch might be big enough to require it.



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

* Re: Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
  2023-11-29 16:02   ` Mekeor Melire
@ 2023-11-29 16:34     ` Eli Zaretskii
  2023-11-29 19:03     ` [External] : " Drew Adams
  2023-11-30  4:43     ` T.V Raman
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2023-11-29 16:34 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: emacs-devel

> From: Mekeor Melire <mekeor@posteo.de>
> Cc: emacs-devel@gnu.org
> Date: Wed, 29 Nov 2023 16:02:16 +0000
> 
> Regarding the form of the associations, it seems your suggestion would lead to many of duplications of URLs. I'd prefer to use the form from the shared code snippet, or something similar.

It could be (MANUALs... . URL) of course, for manuals that share the
same URL.  And URL could be a function that accepts the MANUAL, in
which case a single function could server many MANUALs that share the
same base URL.

> I will revisit this thread, when a patch is ready. I'll also do the FSF-copyright-assignment-stuff in the meantime, as the patch might be big enough to require it.

Thanks.



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

* RE: [External] : Re: Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
  2023-11-29 16:02   ` Mekeor Melire
  2023-11-29 16:34     ` Eli Zaretskii
@ 2023-11-29 19:03     ` Drew Adams
  2023-11-30  4:43     ` T.V Raman
  2 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2023-11-29 19:03 UTC (permalink / raw)
  To: Mekeor Melire, Eli Zaretskii; +Cc: emacs-devel@gnu.org

> https://urldefense.com/v3/__https://git.sv.gnu.org/cgit/emacs.git/tre
> e/lisp/info.el?h=7a5c91a2831602c3cd961158cf0b6a876852d7ac*n1806__;Iw!!ACWV
> 5N9M2RV99hQ!IoNpj_y2U6WUgX5Uy6rfbeaQohk_4vKgPazP62lX_hYvzNzdQwOWtpzOudmiSC
> ecJTj4iZZIsZZbFFWo$

Is this what you're looking for?

https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Node-Name-Expansion.html

I'm the one who provided `Info-goto-node-web' to Emacs.
In my info+.el code I have this comment:

;; See https://www.gnu.org/software/texinfo/manual/texinfo/html_node/
;;             HTML-Xref-Node-Name-Expansion.html
;;
;; 1. The standard ASCII letters (a-z and A-Z) are not modified. All
;;    other characters may be changed as specified below.
;;
;; 2. The standard ASCII numbers (0-9) are not modified except when a
;;    number is the first character of the node name. In that case, see
;;    below.
;;
;; 3. Multiple consecutive space, tab and newline characters are
;;    transformed into just one space. (It's not possible to have
;;    newlines in node names with the current implementation, but we
;;    specify it anyway, just in case.)
;;
;; 4. Leading and trailing spaces are removed.
;;
;; 5. After the above has been applied, each remaining space character is
;;    converted into a '-' character.
;;
;; 6. Other ASCII 7-bit characters are transformed into '_00xx', where xx
;;    is the ASCII character code in (lowercase) hexadecimal. This includes
;;    '_', which is mapped to '_005f'.
;;
;; 7. If the node name does not begin with a letter, the literal string
;;    'g_t' is prefixed to the result. (Due to the rules above, that
;;    string can never occur otherwise; it is an arbitrary choice,
;;    standing for "GNU Texinfo".) This is necessary because XHTML
;;    requires that identifiers begin with a letter.

I agree that allowing for more manuals would be
good.  Users should be able to use (MANUAL)NODE
to specify a MANUAL other than emacs and elisp. 

We should also have a defcustom for the list of
manuals they want to be able to choose from.  Its
default value should include all manuals currently
installed.
___

BTW, I just submitted bug #67531 for vanilla
Emacs `Info-goto-web'.  If you try to enter, say,
`(emacs)Glossary' or `(elisp)Records' you get an
error saying that only manuals Emacs and Elisp
are supported.  You apparently can't get to nodes
on the web that way - and the error message is no
good.  Apparently you're required to enter a bare
node name, not the usual (MANUAL)NODE alternative
accepted by `Info-goto-node' (bound to `g').



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

* Re: Should Info-url-for-node support more than just "elisp" and "emacs" manuals?
  2023-11-29 16:02   ` Mekeor Melire
  2023-11-29 16:34     ` Eli Zaretskii
  2023-11-29 19:03     ` [External] : " Drew Adams
@ 2023-11-30  4:43     ` T.V Raman
  2 siblings, 0 replies; 7+ messages in thread
From: T.V Raman @ 2023-11-30  4:43 UTC (permalink / raw)
  To: Mekeor Melire; +Cc: Eli Zaretskii, emacs-devel

Mekeor Melire <mekeor@posteo.de> writes:

also perhaps search for the info manuals under .emacs.d/elpa?

> 2023-11-29 16:48 eliz@gnu.org:
>
>> I think we should support the manuals on gnu.org, but the problem is
>> it's hard to do that without an explicit list of all of them, and
>> that
>> list will then have to be continuously maintained to keep it
>> up-to-date.
>>
>>
>> So maybe just support all of the manuals that come with Emacs, and
>> provide a defcustom for users to extend the list by specifying
>> associations of the form (MANUAL-NAME . URL) ?
>
> I agree on the scope and will implement it.
>
> Regarding the form of the associations, it seems your suggestion would
> lead to many of duplications of URLs. I'd prefer to use the form from
> the shared code snippet, or something similar.
>
>
>> We don't begin our symbols with a slash.
> [...]
>> This is not our style of nesting parentheses.
>
> Sorry if I wasn't clear: The attached code was not meant as a patch to
> Emacs; I was just sharing my personal configuration, in order to ask
> if you're interested in a patch to Emacs.
>
>
>> >       ;; Encode a bunch of characters the way that makeinfo  >
>> does.
>>
>> I think if we need to follow Texinfo, we should have here a more
>> specific pointer to where this encoding by Texinfo is documented.
>
> This comment actually is from Emacs' info.el. But I will follow your request and investigate the Texinfo docs.
>
> 	https://git.sv.gnu.org/cgit/emacs.git/tree/lisp/info.el?h=7a5c91a2831602c3cd961158cf0b6a876852d7ac#n1806
>
>
>> Thanks.
>
> Thank you for sharing your thoughts!
>
>
> I will revisit this thread, when a patch is ready. I'll also do the
> FSF-copyright-assignment-stuff in the meantime, as the patch might be
> big enough to require it.
>

-- 



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

end of thread, other threads:[~2023-11-30  4:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 11:50 Should Info-url-for-node support more than just "elisp" and "emacs" manuals? Mekeor Melire
2023-11-28 16:40 ` Dr. Arne Babenhauserheide
2023-11-29 14:48 ` Eli Zaretskii
2023-11-29 16:02   ` Mekeor Melire
2023-11-29 16:34     ` Eli Zaretskii
2023-11-29 19:03     ` [External] : " Drew Adams
2023-11-30  4:43     ` T.V Raman

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).