GNU bug report logs - #68970
30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index"

Previous Next

Package: emacs;

Reported by: Mekeor Melire <mekeor <at> posteo.de>

Date: Wed, 7 Feb 2024 13:55:01 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 68970 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mekeor Melire <mekeor <at> posteo.de>
Cc: 68970 <at> debbugs.gnu.org
Subject: Re: bug#68970: [PATCH] In Info-url-alist, add .html extension to %e
 format-sequence
Date: Sat, 10 Feb 2024 09:46:37 +0200
> From: Mekeor Melire <mekeor <at> posteo.de>
> Cc: Eli Zaretskii <eliz <at> gnu.org>
> Date: Fri, 09 Feb 2024 22:00:47 +0000
> 
> > I'm asking why cannot we make %e behave like your proposed %E?
> 
> We can do so. I was just trying to keep URLs a little shorter, by saving
> five characters (".html"). But I think, you are right, it's more
> important to cover as many cases as possible with as few
> format-sequences as possible. Find attached a patch that implements
> this. Note that in the mean time, the fill-column has been changed for
> the Emacs repository via directory-local variables. For this patch, I
> did not use the "new" fill-column value so that the changes to the
> docstring can be seen well in the diff. Please let me know if you'd like
> the docstrings to be refilled according to the new fill-column.

From where I stand, the fill-column for commit log messages is just a
guideline, not a hard requirement.  It is more important to have the
doc strings filled so they are easily readable.  The hard requirements
are spelled out in CONTRIBUTE.

> --- a/lisp/info.el
> +++ b/lisp/info.el
> @@ -231,8 +231,9 @@ Info-url-alist
>  MANUALs represents the name of one or more manuals.  It can
>  either be a string or a list of strings.  URL-SPEC can be a
>  string in which the substring \"%m\" will be expanded to the
> -manual-name, \"%n\" to the node-name, and \"%e\" to the
> -URL-encoded node-name (without a `.html' suffix).  (The
> +manual-name and \"%n\" to the node-name. \"%e\" will expand to
                                          ^^
Two spaces between sentences, please.

> --- a/test/lisp/info-tests.el
> +++ b/test/lisp/info-tests.el
> @@ -29,17 +29,17 @@
>  
>  (ert-deftest test-info-urls ()
>    (should (equal (Info-url-for-node "(emacs)Minibuffer")
> -                 "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer"))
> +                 "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer.html"))
>    (should (equal (Info-url-for-node "(emacs)Minibuffer File")
> -                 "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-File"))
> +                 "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-File.html"))
>    (should (equal (Info-url-for-node "(elisp)Backups and Auto-Saving")
> -                 "https://www.gnu.org/software/emacs/manual/html_node/elisp/Backups-and-Auto_002dSaving"))
> +                 "https://www.gnu.org/software/emacs/manual/html_node/elisp/Backups-and-Auto_002dSaving.html"))
>    (should (equal (Info-url-for-node "(eintr)car & cdr")
> -                 "https://www.gnu.org/software/emacs/manual/html_node/eintr/car-_0026-cdr"))
> +                 "https://www.gnu.org/software/emacs/manual/html_node/eintr/car-_0026-cdr.html"))
>    (should (equal (Info-url-for-node "(emacs-mime)\tIndex")
> -                 "https://www.gnu.org/software/emacs/manual/html_node/emacs-mime/Index"))
> +                 "https://www.gnu.org/software/emacs/manual/html_node/emacs-mime/Index.html"))
>    (should (equal (Info-url-for-node  "(gnus) Don't Panic")
> -                 "https://www.gnu.org/software/emacs/manual/html_node/gnus/Don_0027t-Panic"))
> +                 "https://www.gnu.org/software/emacs/manual/html_node/gnus/Don_0027t-Panic.html"))
>    (should-error (Info-url-for-node "(nonexistent)Example")))

Should we add here tests for the Top node?

Thanks.




This bug report was last modified 1 year and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.