From unknown Fri Jul 18 10:58:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68970 <68970@debbugs.gnu.org> To: bug#68970 <68970@debbugs.gnu.org> Subject: Status: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" Reply-To: bug#68970 <68970@debbugs.gnu.org> Date: Fri, 18 Jul 2025 17:58:18 +0000 retitle 68970 30.0.50; Info.el: Info-url-alist should support format-sequen= ce that encodes "Top" node as "index" reassign 68970 emacs submitter 68970 Mekeor Melire severity 68970 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 08:54:10 2024 Received: (at submit) by debbugs.gnu.org; 7 Feb 2024 13:54:10 +0000 Received: from localhost ([127.0.0.1]:55904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXiNN-0003eM-RO for submit@debbugs.gnu.org; Wed, 07 Feb 2024 08:54:10 -0500 Received: from lists.gnu.org ([2001:470:142::17]:49184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXiNL-0003e7-WD for submit@debbugs.gnu.org; Wed, 07 Feb 2024 08:54:08 -0500 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 1rXiN2-0005jp-Hj for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 08:53:48 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXiMy-0004cv-LS for bug-gnu-emacs@gnu.org; Wed, 07 Feb 2024 08:53:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B1D02240028 for ; Wed, 7 Feb 2024 14:53:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707314019; bh=8mWZRBFGF8z/JyGR1OhrNA+IlDhJPy7Tlovhr/YdT28=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=Ek8N/XRM7TKiLu0nyVzfkMUDhyS1uvsIchESgclvWjJjUaYvisAIpCiyDw+89wFU8 0PIshFqwg5ZtsEkE9ctw86gRrqKyhnOnWSBY5iLDf4HtPd5FLq6XQ3NDoFkdJstp2a w8QiWaSFaoa99B0FT1VSlE2TQvAKDR/2MeXzCZTRMDAQwWiTtwDqGtzVKYVAzGfP31 FNP7uQFQaTc9v3ugA/A7t2NI8IJBekGRrkdPFIsCaO7rbIql+DlL8PgAwrfre1Z5qy bErmvT8ROy76rXHPmiljnzHgIe4u0cDyeMSUzgfIqccScaUz/U8va5JTGNVST0Blox HMCTL7EFocjsQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TVM5t5tzGz9rxS; Wed, 7 Feb 2024 14:53:38 +0100 (CET) From: Mekeor Melire To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" Date: Wed, 07 Feb 2024 13:27:35 +0000 Message-ID: <87fry44bz6.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain After a discussion on emacs-devel[1] and a discussion on a bug-report[2], this was commited on the master-branch: 756daa93b3ef7ce33e741ab30000fa397fcd9783 Author: Mekeor Melire AuthorDate: Mon Dec 4 16:37:37 2023 +0100 Commit: Eli Zaretskii CommitDate: Sat Jan 27 12:18:17 2024 +0200 Add option Info-url-alist The new option Info-url-alist allow users to add custom mappings from manual-names to URLs. When the URL-SPEC is provided as string, users may use the %e format-sequence. But in the most common case, namely when URLs need to use a .html-suffix, this is not usable: In the case of the special "Top" node, the %e format-sequence resolves to "", i.e. the empty string. It is thus not possible to use a URL-SPEC like "https://example.com/%e.html" because "https://example.com/.html" is invalid. The user rather wants "https://example.com/index.html" in this case. Currently, the user needs to choose to use a function as URL-SPEC in this case. This works but is tedious, especially since this is the most common case. Thus, I suggest to provide another format-sequence to the URL-SPEC-string: %i. It will resolve the "Top" node as "index", thus allowing for "https://example.com/%i.html" to be used as URL-SPEC. Find attached a patch that does so, and also refills the doc-string. [1] https://lists.gnu.org/archive/html/emacs-devel/2023-11/msg01286.html [2] https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-12/msg00156.html --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Provide-format-sequence-i-in-Info-url-for-node.patch >From 03752ac8f3b2c86dd81da21db4fb5981461af3e5 Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Wed, 7 Feb 2024 14:47:07 +0100 Subject: [PATCH] Provide format-sequence %i in Info-url-for-node * lisp/info.el (Info-url-for-node): Provide format-sequence %i which resolves "Top" node as "index". (Info-url-alist): Explain it in refilled docstring. --- lisp/info.el | 76 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index e91cc7b8e54..7c58879e545 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -227,28 +227,35 @@ Info-url-alist "https://www.gnu.org/software/emacs/manual/html_node/%m/%e")) "Alist telling `Info-mode' where manuals are accessible online. -Each element of this list has the form (MANUALs . URL-SPEC). -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 -URL-encoding of the node-name mimics GNU Texinfo, as documented -at Info node `(texinfo)HTML Xref Node Name Expansion'.) -Alternatively, URL-SPEC can be a function which is given -manual-name, node-name and URL-encoded node-name as arguments, -and is expected to return the corresponding URL as a string. +Each element of this list has the form (MANUALs . URL-SPEC). 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 format +sequences explained below can be used. Alternatively, it can be a +function which is given arguments corresponding to the format sequences +below and is expected to return the corresponding URL as a string. + +`%m' represents the manual-name. + +`%n' represents the (raw) node-name. + +`%e' represents a URL-encoded node-name. (The encoding mimics GNU + Texinfo, as documented at Info node `(texinfo)HTML Xref Node Name + Expansion'.) It does not include any suffix like `.html'. In case + of the `Top' node, it is the empty string. + +`%i' represents a URL-encoded node-name, which in case of the `Top' + node, is the string \"index\". This variable particularly affects the command `Info-goto-node-web', which see. The default value of this variable refers to the official, HTTPS-accessible HTML-representations of all manuals that Emacs -includes. These URLs refer to the most recently released version -of Emacs, disregarding the version of the running Emacs. In -other words, the content of your local Info node and the -associated online node may differ. The resource represented by -the generated URL may even be not found by the gnu.org server." +includes. These URLs refer to the most recently released version of +Emacs, disregarding the version of the running Emacs. In other words, +the content of your local Info node and the associated online node may +differ. The resource represented by the generated URL may even be not +found by the gnu.org server." :version "30.1" :type '(alist :tag "Mapping from manual-name(s) to URL-specification" @@ -1922,26 +1929,31 @@ Info-url-for-node (encoded-node ;; Reproduce GNU Texinfo's way of URL-encoding. ;; (info "(texinfo) HTML Xref Node Name Expansion") - (if (equal node "Top") - "" - (url-hexify-string - (string-replace " " "-" - (mapconcat - (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- - (<= 33 ch 47) ; !"#$%&'()*+,-./ - (<= 58 ch 64) ; :;<=>?@ - (<= 91 ch 96) ; [\]_` - (<= 123 ch 127)) ; {|}~ DEL - (format "_00%x" ch) - (char-to-string ch))) - node "")))))) + (url-hexify-string + (string-replace " " "-" + (mapconcat + (lambda (ch) + (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (<= 33 ch 47) ; !"#$%&'()*+,-./ + (<= 58 ch 64) ; :;<=>?@ + (<= 91 ch 96) ; [\]_` + (<= 123 ch 127)) ; {|}~ DEL + (format "_00%x" ch) + (char-to-string ch))) + node "")))) + (top-as-empty-node + (if (string= node "Top") "" encoded-node)) + (top-as-index-node + (if (string= node "Top") "index" encoded-node))) (cond ((stringp url-spec) (format-spec url-spec - `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + `((?m . ,manual) (?n . ,node) + (?e . ,top-as-empty-node) + (?i . ,top-as-index-node)))) ((functionp url-spec) - (funcall url-spec manual node encoded-node)) + (funcall url-spec manual node + top-as-empty-node top-as-index-node)) (t (error "URL-specification neither string nor function"))) (error "No URL-specification associated with manual-name `%s'" manual))) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 09:52:27 2024 Received: (at 68970) by debbugs.gnu.org; 7 Feb 2024 14:52:27 +0000 Received: from localhost ([127.0.0.1]:55987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXjHn-0005CI-8Y for submit@debbugs.gnu.org; Wed, 07 Feb 2024 09:52:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXjHk-0005Bz-D3 for 68970@debbugs.gnu.org; Wed, 07 Feb 2024 09:52:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXjHN-0001gA-FO; Wed, 07 Feb 2024 09:52:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DMPJiqpZh68V747Ho9sXGf9N3CJD1zD+dDaxIaJwYo4=; b=IZBE4Lh/sZte 1oe9RoTTuJboff4A/9lx5/84MmIpvceeqXNXAXeGN4DzRx+LH3y9XjWKPGvDlszmyuDUWsI+jzTrZ IctUCcWYfedNqOf2PoHGTZ635ADUCvv5aoKQWx9dMippxBAl+DOPRVcEIakRYdcqh8XCQKf64cuUS Z46Os635DqriYyKc1M/wujQv6O675N1R7v+4XzdHT97FVLh0ZHQqiB8uDbJosZrc8BIKpvmpzwbPX Y4X37MucNgjSKlfhS5Ir1yKQn6QzonyrSdfVOXgxLKIoi6v2OTlg9kuYafk55cnniC92TmZXU1zbU rbar1lj5jR0NYTXHo4ozsQ==; Date: Wed, 07 Feb 2024 16:51:57 +0200 Message-Id: <867cjgz5rm.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87fry44bz6.fsf@posteo.de> (message from Mekeor Melire on Wed, 07 Feb 2024 13:27:35 +0000) Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" References: <87fry44bz6.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Date: Wed, 07 Feb 2024 13:27:35 +0000 > > The new option Info-url-alist allow users to add custom mappings from > manual-names to URLs. When the URL-SPEC is provided as string, users may > use the %e format-sequence. But in the most common case, namely when > URLs need to use a .html-suffix, this is not usable: > > In the case of the special "Top" node, the %e format-sequence resolves > to "", i.e. the empty string. It is thus not possible to use a URL-SPEC > like "https://example.com/%e.html" because "https://example.com/.html" > is invalid. The user rather wants "https://example.com/index.html" in > this case. Sorry, I don't think I understand: "https://example.com/" stands for "https://example.com/index.html", AFAIK. This is why %e produces an empty string for the Top node. So why would users want to specify "https://example.com/%e.html" instead of just "https://example.com/%e"? IOW, I don't see why users will need to use the .html extension in the alist, it works without the extension. What am I missing? From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 15:05:13 2024 Received: (at 68970) by debbugs.gnu.org; 7 Feb 2024 20:05:13 +0000 Received: from localhost ([127.0.0.1]:57971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXoAT-0008Vf-8e for submit@debbugs.gnu.org; Wed, 07 Feb 2024 15:05:13 -0500 Received: from mout01.posteo.de ([185.67.36.65]:38267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXoAR-0008VK-AD for 68970@debbugs.gnu.org; Wed, 07 Feb 2024 15:05:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3E622240027 for <68970@debbugs.gnu.org>; Wed, 7 Feb 2024 21:04:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707336291; bh=emaj7N+wVqSD/6PhmNHFGJUwxLLP/eaIDp17U1O6Y9Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=JXBNQDMWaR2sFZDZhf+ZrsGEvUWOdHXMHLpovlRuF4EUg/X1LGt9fTKU2pSgA21Nk 3f3zKM4PdKPrH/+HUKxP/6dEtMbX8zROaTP5L3P2CL79szcvFxZCbc3HQrifHHlq2N W8VETTHfBIjeA2hqx1rqqOW6y3s2PlWbZIQheZZWaKJ0PecGL0NEYOj+AChh6Mtjx/ Mg6T1xghHaVGcV8AGNhfPPlNUAm75XZ0Vvqxxzp/xSeTbtOgJ3yw8v7t7LDRHAxxHm PdkRRFIPg2l+1meWC3KXypZ8rHVT30nEfNnHeGQ7kVpDntlkdksjqkIeQkEizkBWrn sIDrmeIEZD/ug== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TVWLB0NnTz6tsf; Wed, 7 Feb 2024 21:04:50 +0100 (CET) From: Mekeor Melire To: Eli Zaretskii Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" Date: Wed, 07 Feb 2024 19:52:15 +0000 References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> In-reply-to: <867cjgz5rm.fsf@gnu.org> Message-ID: <87bk8s3usi.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2024-02-07 16:51 eliz@gnu.org: > Sorry, I don't think I understand: "https://example.com/" stands for > "https://example.com/index.html", AFAIK. This is why %e produces an > empty string for the Top node. So why would users want to specify > "https://example.com/%e.html" instead of just "https://example.com/%e"? > > IOW, I don't see why users will need to use the .html extension in the > alist, it works without the extension. > > What am I missing? Let's assume we have a manual with "Top" node as well as a node called "Foo". Let's further assume the webserver is configured so that example.com/Foo does not resolve to example.com/Foo.html but rather results in "not found". This is why the user must choose to use example.com/%e.html as URL-specification currently. But then they have the problem that the "Top" node is translated to example.com/.html. I suggested to add another format-sequence, %i, that translates the "Top" node as "index". Thus, example.com/%i.html would translate to example.com/index.html in case of "Top". We could also instead provide a format-sequence, %s, that includes the ".html" suffix -- except in case of the "Top" node which would be translated to the empty string. Thus, the user would use example.com/%s. "Foo" would be translated to example.com/Foo.html; and "Top" would be translated to "example.com/". From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 15:18:38 2024 Received: (at 68970) by debbugs.gnu.org; 7 Feb 2024 20:18:38 +0000 Received: from localhost ([127.0.0.1]:57977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXoNR-0000Nj-Oh for submit@debbugs.gnu.org; Wed, 07 Feb 2024 15:18:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXoNQ-0000NX-0u for 68970@debbugs.gnu.org; Wed, 07 Feb 2024 15:18:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXoN5-0006l0-HN; Wed, 07 Feb 2024 15:18:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=abFapRq9ORTEre4K1rs0Cphteen7Pi9mCOyNKIKLAAI=; b=jVotSHJm8Pp7 VKzBdMzy4auUpoq7AkqSpPBADBOv/+0MAswajk+i26I7m1nQIpq3ywcZAX1HaYwTpK4OmAUBkZfuw BjYxVJl7I83q/lrSdCBT4e2MTHBaCcClsPSyDgtz+YidnoPu3Ixfv88wdZ53xQ/D7x6N2AyoGX2sI ZEIxSq3u3g00X7JFTXWDQ9kMCsT4jxUEUhDhXBUqeUoCF1U1MponwYy9WCVIB9xERgP4+iCRHfJN5 zPnz4UOfQT3Ufv5x1ET5Li/g/wmapaCDv7VQYt5Elf9E6KbUNJVJWRn9MxjVMjEHjT3HyB77lgqSI IfzRyg8qyI5fyhJlIeJDxQ==; Date: Wed, 07 Feb 2024 22:18:13 +0200 Message-Id: <86le7wxc3e.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87bk8s3usi.fsf@posteo.de> (message from Mekeor Melire on Wed, 07 Feb 2024 19:52:15 +0000) Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: 68970@debbugs.gnu.org > Date: Wed, 07 Feb 2024 19:52:15 +0000 > > 2024-02-07 16:51 eliz@gnu.org: > > > Sorry, I don't think I understand: "https://example.com/" stands for > > "https://example.com/index.html", AFAIK. This is why %e produces an > > empty string for the Top node. So why would users want to specify > > "https://example.com/%e.html" instead of just "https://example.com/%e"? > > > > IOW, I don't see why users will need to use the .html extension in the > > alist, it works without the extension. > > > > What am I missing? > > Let's assume we have a manual with "Top" node as well as a node called > "Foo". Let's further assume the webserver is configured so that > example.com/Foo does not resolve to example.com/Foo.html but rather > results in "not found". Why would we assume a strange configuration like that? That's not what happens on gnu.org, for example. Which documentation sites that offer Texinfo-derived manuals have such configurations? > This is why the user must choose to use example.com/%e.html as > URL-specification currently. But then they have the problem that the > "Top" node is translated to example.com/.html. > > I suggested to add another format-sequence, %i, that translates the > "Top" node as "index". Thus, example.com/%i.html would translate to > example.com/index.html in case of "Top". I understand, but the overlap in functionality between %e and %i is got to cause some confusion, so if there's a way to avoid that, I'd prefer it. The code intentionally produces an empty string for "Top", and there's a good reason for it doing so. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 07 17:27:33 2024 Received: (at 68970) by debbugs.gnu.org; 7 Feb 2024 22:27:33 +0000 Received: from localhost ([127.0.0.1]:58135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXqOC-0003fC-T2 for submit@debbugs.gnu.org; Wed, 07 Feb 2024 17:27:33 -0500 Received: from mout01.posteo.de ([185.67.36.65]:55409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXqOA-0003ey-Ml for 68970@debbugs.gnu.org; Wed, 07 Feb 2024 17:27:31 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F0448240028 for <68970@debbugs.gnu.org>; Wed, 7 Feb 2024 23:27:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707344831; bh=SjRohwt9SMsyK7pB+qMhzqVB7SPkw6blpFxpDql/hYg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=ffWU/1s/nnFKED//l5tMxnoS1wludoxVHz9IEZNUxX0Ofl2hkARrIqqXuxeWn1pUN szZCa6zHh6Wgd8yTbZnyjPysxJmUrgGlzv/9s+0Sn0apViBoFBspo3O4orBQ3xd5vI SW42sGWY5RNyoAezisRwqT4GV1IrGASTst3EvLcwL6JkFybLW8ZuE8gZXQMrDw5v/r vpD8VKsBmMDTQASnitDtEr7qs4n7lSKtLjMaimSl75rQ9vnlKxDcX0FhI3g5kAzXQh VVNvplDhd/A65hL0khFpgEaIJzig71dEPkES4lcAP8RSEqolO/iiFQg98w/xQG47QF zlCXvA2CuCCdQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TVZVQ19y7z6tvc; Wed, 7 Feb 2024 23:27:10 +0100 (CET) From: Mekeor Melire To: 68970@debbugs.gnu.org Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" Date: Wed, 07 Feb 2024 22:10:25 +0000 References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> In-reply-to: <86le7wxc3e.fsf@gnu.org> Message-ID: <8734u352rm.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 68970 Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) 2024-02-07 22:18 eliz@gnu.org: > > Let's assume we have a manual with "Top" node as well as a node called > > "Foo". Let's further assume the webserver is configured so that > > example.com/Foo does not resolve to example.com/Foo.html but rather > > results in "not found". > > Why would we assume a strange configuration like that? That's not > what happens on gnu.org, for example. Which documentation sites that > offer Texinfo-derived manuals have such configurations? Yes, gnu.org does allow to omit the .html suffix. I am working on an Emacs package that will provide more entries to Info-url-alist. That's why I have a tentative list, as you requested, at hand, indeed. Here's a list of entries that require a .html suffix: (("annotate" "bfd" "ctf-spec" "gdb" "stabs") "https://sourceware.org/gdb/current/onlinedocs/gdb/%i.html") (("as" "bfd" "binutils" "ld" "gprof") "https://sourceware.org/binutils/docs/%m/%i.html") (("cc-mode") "https://cc-mode.sourceforge.net/html-manual/%i.html") (("cgdb") "https://cgdb.github.io/docs/%i.html") (("chickadee") "https://files.dthompson.us/docs/chickadee/latest/%i.html") (("cuirass" "guix") "https://guix.gnu.org/%m/manual/html_node/%i.html") (("forge" "magit" "ghub" "transient" "magit-section" "with-editor") "https://magit.vc/manual/%m/%i.html") (("gnutls" "gnutls-client-server-use-case" "gnutls-crypto-layers" "gnutls-handshake-sequence" "gnutls-handshake-state" "gnutls-internals" "gnutls-layers" "gnutls-logo" "gnutls-modauth" "gnutls-x509" "pkcs11-vision") "https://gnutls.org/manual/html_node/%i.html") (("guile-algorithms") "https://guile-algorithms.lajszczak.dev/%i.html") (("guile-email") "https://guile-email.systemreboot.net/manual/dev/en/%i.html") (("gwl") "https://guixwl.org/manual/html_node/%i.html") (("haskell-mode") "https://haskell.github.io/%m/manual/latest/%i.html") (("haunt") "https://files.dthompson.us/docs/%m/latest/%i.html") (("libc") "https://sourceware.org/%m/manual/html_node/%i.html") (("mailutils") "https://mailutils.org/manual/html_node/%i.html") (("mercury" "mercury_faq" "mercury_library" "mercury_ref" "mercury_trans_guide" "mercury_user_guide") "https://mercurylang.org/information/doc-release/%m/%i.html") (("org") "https://orgmode.org/manual/%i.html") (("orgguide") "https://orgmode.org/guide/%i.html") (("zsh") "https://zsh.sourceforge.io/Doc/Release/%i.html") (Note that some domains are duplicated here.) Here's a tentative list of non-gnu.org online manual URLs that work without .html suffix: (("7400-1" "7400-1-hidden" "analysis" "ckt" "clocks" "coordinate-space" "lepton-manual" "lepton-scheme" "net-attribute" "path-example" "rf_cascade" "text-layout") "https://lepton-eda.github.io/%m.html/%e") (("emacs-shroud") "https://www.nongnu.org/emacs-shroud/manual/html_node/%e") (("emacsy") "https://www.nongnu.org/emacsy/manual/html_node/%e") (("geiser") "https://www.nongnu.org/geiser/%e") (("gnutls-guile") "https://gnutls.gitlab.io/guile/manual/html_node/%e") (("guile-proba") "https://luis-felipe.gitlab.io/%m/manual/%e") (("guile-shapefile") "https://hugonikanor.github.io/guile-shapefile/%e") (("octave") "https://docs.octave.org/latest/%e") (("optionmatrix") "https://anthonybradford.github.io/optionmatrix/%e") (("polipo") "https://www.irif.fr/~jch/software/%m/manual/%e") (("sawfish") "https://sawfish.tuxfamily.org/%m.html/%e") (("scm" "Xlibscm" "hobbit" "slib" "r5rs") "https://people.csail.mit.edu/jaffer/%m/%e") (("slime") "https://slime.common-lisp.dev/doc/html/%e") As you can see the .html-requiring-case is very common. It would be nice if users can conveniently use a string in this case, rather than going for a function. > > This is why the user must choose to use example.com/%e.html as > > URL-specification currently. But then they have the problem that the > > "Top" node is translated to example.com/.html. > > > > I suggested to add another format-sequence, %i, that translates the > > "Top" node as "index". Thus, example.com/%i.html would translate to > > example.com/index.html in case of "Top". > > I understand, but the overlap in functionality between %e and %i is > got to cause some confusion, so if there's a way to avoid that, I'd > prefer it. The code intentionally produces an empty string for "Top", > and there's a good reason for it doing so. The "good reason" is only to keep URLs a little shorter, if possible, for ease on eyes. :) Another idea would be to let users specify two URL-SPECs: One for the Top-node; another for non-Top nodes. Another idea would be to only provide one format-sequence, for sake of simplicity, namely one that works with .html-suffix-requiring-URLs. And use that format-sequence in the default value of Info-url-alist. The default URLs would be a little longer then. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 01:26:46 2024 Received: (at 68970) by debbugs.gnu.org; 8 Feb 2024 06:26:46 +0000 Received: from localhost ([127.0.0.1]:58845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXxrx-0000ia-Nd for submit@debbugs.gnu.org; Thu, 08 Feb 2024 01:26:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXxrv-0000iO-Lm for 68970@debbugs.gnu.org; Thu, 08 Feb 2024 01:26:44 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXxrc-0003Aa-4x; Thu, 08 Feb 2024 01:26:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Cf5Kjh2wO5cmtZChI5SfYMzKcfYMETMXJJ8x/b03Wpg=; b=j1cbhm2DcA3s I0VNhJPm4dfVCxGvXC4as5bQx6R7oQ2Zffxv87N5j+cbGVbZAfwjAMIziEAN7uAnkz2lE4zXe1MT1 Y/H2Mut7eAobKxIP4SAgb02k/xiGmMXRm0fSfAdy07UDpxdNytRUEdcL3hkxmG+RwF67VE8FvX6P1 UXSS0bHO0LBZ/O4nKnv3ejvVJFoMEQJrFggktwu4XhDM+uEXEGZppfAWNMMXj8UxBHRMrvAp/dYKJ DLm42RejmduQhXtKV4WB4+/UMkST+K6vpJF1F1StpTev27w+6bIOTsW4M6zc5x12tqW5SKlyu9yS+ cyquwsZfn35sOusJ/rpcYw==; Date: Thu, 08 Feb 2024 08:26:21 +0200 Message-Id: <86bk8rxyia.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <8734u352rm.fsf@posteo.de> (message from Mekeor Melire on Wed, 07 Feb 2024 22:10:25 +0000) Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: Eli Zaretskii > Date: Wed, 07 Feb 2024 22:10:25 +0000 > > 2024-02-07 22:18 eliz@gnu.org: > > > > Let's assume we have a manual with "Top" node as well as a node called > > > "Foo". Let's further assume the webserver is configured so that > > > example.com/Foo does not resolve to example.com/Foo.html but rather > > > results in "not found". > > > > Why would we assume a strange configuration like that? That's not > > what happens on gnu.org, for example. Which documentation sites that > > offer Texinfo-derived manuals have such configurations? > > Yes, gnu.org does allow to omit the .html suffix. > > I am working on an Emacs package that will provide more entries to > Info-url-alist. That's why I have a tentative list, as you requested, at > hand, indeed. Here's a list of entries that require a .html suffix: I tried several of those, and they all work without index.html. For example, these work for me: https://sourceware.org/gdb/current/onlinedocs/gdb https://sourceware.org/gdb/current/onlinedocs/annotate https://sourceware.org/gdb/current/onlinedocs/stabs https://cc-mode.sourceforge.net/html-manual https://orgmode.org/manual Some of them also work with a trailing slash, some don't. So I still don't see why we would need %i. > > I understand, but the overlap in functionality between %e and %i is > > got to cause some confusion, so if there's a way to avoid that, I'd > > prefer it. The code intentionally produces an empty string for "Top", > > and there's a good reason for it doing so. > > The "good reason" is only to keep URLs a little shorter, if possible, > for ease on eyes. :) > > Another idea would be to let users specify two URL-SPECs: One for the > Top-node; another for non-Top nodes. I'd prefer this latter alternative. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 16:30:17 2024 Received: (at 68970) by debbugs.gnu.org; 8 Feb 2024 21:30:17 +0000 Received: from localhost ([127.0.0.1]:33725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYByK-00057W-EH for submit@debbugs.gnu.org; Thu, 08 Feb 2024 16:30:16 -0500 Received: from mout02.posteo.de ([185.67.36.66]:54333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYByH-00057C-S6 for 68970@debbugs.gnu.org; Thu, 08 Feb 2024 16:30:15 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6314F240104 for <68970@debbugs.gnu.org>; Thu, 8 Feb 2024 22:29:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707427793; bh=p9/tCVFE4uDQi6WgxRRxc6TTEdUXNnKw3AEL2Hotffo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=n0sXZgubobFmk6fQJN+A0SWydyz4kVjBRCSFGYCKXTDjlLsnj+8+Ik5cV+nxFT4/u WKs2AfxT9lAiUxmf3RNdcsrXkRy/4QkhJpSn2OLPMG+WaOkU0RIZMWgjLDsJo1oEzb 85pel03Q5YvFKDB/p3/GbXDYNkeQcLsUxX5KvuTNuFNLJCocfGgFLrGoMfkXTDrUYA r4iAITUb19nPE54b6HoPDifYKICm7jHJQEPaLsFfl5naLIP7PKI89DC7+DXf15dqNM 9L3lv9siUo8x2Rn4qTwZ3pQKU/kYZXToZFH7YM4EbAqs6kzzWw+0rloIntqD0H1CYl gngMH1Y2GrwfQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TW99r4mJwz9rxF; Thu, 8 Feb 2024 22:29:52 +0100 (CET) From: Mekeor Melire To: Eli Zaretskii Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" Date: Thu, 08 Feb 2024 20:20:18 +0000 References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> In-reply-to: <86bk8rxyia.fsf@gnu.org> Message-ID: <87ttmi3ar3.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2024-02-08 08:26 eliz@gnu.org: > I tried several of those, and they all work without index.html. For > example, these work for me: > > https://sourceware.org/gdb/current/onlinedocs/gdb > https://sourceware.org/gdb/current/onlinedocs/annotate > https://sourceware.org/gdb/current/onlinedocs/stabs > https://cc-mode.sourceforge.net/html-manual > https://orgmode.org/manual > > Some of them also work with a trailing slash, some don't. Thank you for taking time to try it out. Sorry that I was not precise in my statement. You are right, "index.html" can be omitted.[1] But let me try to explain what I really meant. Let's look at a node named "Summary". Texinfo will generate a "Summary.html" file for it. For this file, some webservers do not allow to omit the .html suffix when requesting it via HTTP. For example: https://sourceware.org/gdb/current/onlinedocs/gdb/Summary -> error 404, not found https://sourceware.org/gdb/current/onlinedocs/gdb/Summary.html -> works fine Thus, for the GDB manual, the user would consider to use https://sourceware.org/gdb/current/onlinedocs/gdb/%e.html because %e does not contain the .html-suffix and because the webserver requires to keep the .html-suffix for non-index-HTMLs. But that URL-specification would not work in case of the "Top"-node because %e will be substituted with the empty string "" in that case, thus yielding: https://sourceware.org/gdb/current/onlinedocs/gdb/.html -> error 404, not found The user would now understand that, with the restrictions of the current implementation of the feature, they must define a custom function and use it as URL-specification for the GDB-manual. > > Another idea would be to let users specify two URL-SPECs: One for the > > Top-node; another for non-Top nodes. > > I'd prefer this latter alternative. Having thought about this idea again, it seems unnecessary because we know that the "Top" node is always translated as "index.html". Here's a quote from (info "(texinfo) HTML Xref Node Name Expansion"): A special exception: the Top node (*note The Top Node) is always mapped to the file 'index.html', to match web server software. As a result, I'd like to propose yet another approach. Currently, the implementation on the master branch offers %m (manual-name), %n (raw node-name) and %e (URL-encoded node-name without .html-suffix). Let's add the format-sequence %E that does include the .html-suffix. In case of the Top-node, it'll be the empty-string "", i.e. it'll behave just like %e in that case. | node | %e | %E | |-------+-------+------------| | "Top" | "" | "" | | "Foo" | "Foo" | "Foo.html" | The gnu.org webserver is configured to allow omission of the .html-suffix. We can thus use the %e format-sequence: | URL-specification | https://gnu.org/s/emacs/manual/html_node/emacs/%e | |----------------------+------------------------------------------------------| | URL for "Top" node | https://gnu.org/s/emacs/manual/html_node/emacs/ | | URL for "Intro" node | https://gnu.org/s/emacs/manual/html_node/emacs/Intro | The sourceware.org does not allow to omit the .html-suffix. But it allows to omit "index.html". We can thus use %E: | URL-specification | https://sourceware.org/gdb/current/onlinedocs/gdb/%E | |------------------------+----------------------------------------------------------------| | URL for "Top" node | https://sourceware.org/gdb/current/onlinedocs/gdb/ | | URL for "Summary" node | https://sourceware.org/gdb/current/onlinedocs/gdb/Summary.html | I think with these format-sequences we'd cover a lot of cases. We would not cover the case when the webserver does not allow to omit "index.html" but this is a very uncommon case. Thus, it'd be fine when users need to use a custom function as URL-specification. [1] Of course, webservers can be configured to not serve index.html when a directory is requested. But the default is to do so. When using the common Apache webserver, one can disable this "defaulting to index.html" with the "DirectoryIndex disabled" directive, as documented here: https://httpd.apache.org/docs/trunk/mod/mod_dir.html#directoryindex From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 09 02:03:15 2024 Received: (at 68970) by debbugs.gnu.org; 9 Feb 2024 07:03:15 +0000 Received: from localhost ([127.0.0.1]:40399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYKup-0006eU-8S for submit@debbugs.gnu.org; Fri, 09 Feb 2024 02:03:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYKun-0006e4-Bz for 68970@debbugs.gnu.org; Fri, 09 Feb 2024 02:03:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYKuS-00078j-Mp; Fri, 09 Feb 2024 02:02:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Jn+HPqm2IY6dAXr2Rb22v1VuWbNIS/pZ2VmkwiGRgZ8=; b=Gj9e5poli/66 jFEDrKOhtfDQO9zuwifnbGtjqn8iZG32hHe/gK5BUjLzmVmVKz+UBsXu5gJ5IkmuYcO5GXk1fS3hm QqPn0uuk4i5M75mRWTVcBmheVTzD4ptDzNKBpTFLiFprucnZtjVx3p+e1nR06K4NwvxRsZ8FFTB0e OpDUMM7RuxL5KSyL4K1b9xT3Z6UZ5LeiZNDLaxAKm1umy0hg/8ez1Z/EoFVAYjM31zFvV0Gk+wQhg bCmPFwDQBEXiSuB35R10iXP1aoucih1tgFofg3C/xobRjTeZS+zE1cezoEsvxB8DQDtJfzlcz2quS ozNyP/keLx3uVsv90+V1MQ==; Date: Fri, 09 Feb 2024 09:02:49 +0200 Message-Id: <8634u2w25i.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87ttmi3ar3.fsf@posteo.de> (message from Mekeor Melire on Thu, 08 Feb 2024 20:20:18 +0000) Subject: Re: bug#68970: 30.0.50; Info.el: Info-url-alist should support format-sequence that encodes "Top" node as "index" References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: 68970@debbugs.gnu.org > Date: Thu, 08 Feb 2024 20:20:18 +0000 > > But let me try to explain what I really meant. Let's look at a node > named "Summary". Texinfo will generate a "Summary.html" file for it. For > this file, some webservers do not allow to omit the .html suffix when > requesting it via HTTP. For example: > > https://sourceware.org/gdb/current/onlinedocs/gdb/Summary > -> error 404, not found > > https://sourceware.org/gdb/current/onlinedocs/gdb/Summary.html > -> works fine > > Thus, for the GDB manual, the user would consider to use > > https://sourceware.org/gdb/current/onlinedocs/gdb/%e.html > > because %e does not contain the .html-suffix and because the webserver > requires to keep the .html-suffix for non-index-HTMLs. But that > URL-specification would not work in case of the "Top"-node because %e > will be substituted with the empty string "" in that case, thus > yielding: > > https://sourceware.org/gdb/current/onlinedocs/gdb/.html > -> error 404, not found > > The user would now understand that, with the restrictions of the current > implementation of the feature, they must define a custom function and > use it as URL-specification for the GDB-manual. > > > > Another idea would be to let users specify two URL-SPECs: One for the > > > Top-node; another for non-Top nodes. > > > > I'd prefer this latter alternative. > > Having thought about this idea again, it seems unnecessary because we > know that the "Top" node is always translated as "index.html". Here's a > quote from (info "(texinfo) HTML Xref Node Name Expansion"): > > A special exception: the Top node (*note The Top Node) is always > mapped to the file 'index.html', to match web server software. > > As a result, I'd like to propose yet another approach. Currently, the > implementation on the master branch offers %m (manual-name), %n (raw > node-name) and %e (URL-encoded node-name without .html-suffix). Let's > add the format-sequence %E that does include the .html-suffix. In case > of the Top-node, it'll be the empty-string "", i.e. it'll behave just > like %e in that case. Why should %e omit the .html extension in the first place? What problems will we cause if we make %e include the .html extension when that is required, and omit it when it isn't (like when converting the "Top" node)? AFAICS, the use of %e in Emacs 29 doesn't add the .html extension to the produced URLs, but would producing the .html extension from %e cause any problems with the GNU manuals we had in Info-url-alist in Emacs 29? Do we know of any package which augments Info-url-alist with specs that use %e.html? > | node | %e | %E | > |-------+-------+------------| > | "Top" | "" | "" | > | "Foo" | "Foo" | "Foo.html" | > > The gnu.org webserver is configured to allow omission of the > .html-suffix. We can thus use the %e format-sequence: > > | URL-specification | https://gnu.org/s/emacs/manual/html_node/emacs/%e | > |----------------------+------------------------------------------------------| > | URL for "Top" node | https://gnu.org/s/emacs/manual/html_node/emacs/ | > | URL for "Intro" node | https://gnu.org/s/emacs/manual/html_node/emacs/Intro | > > The sourceware.org does not allow to omit the .html-suffix. But it > allows to omit "index.html". We can thus use %E: > > | URL-specification | https://sourceware.org/gdb/current/onlinedocs/gdb/%E | > |------------------------+----------------------------------------------------------------| > | URL for "Top" node | https://sourceware.org/gdb/current/onlinedocs/gdb/ | > | URL for "Summary" node | https://sourceware.org/gdb/current/onlinedocs/gdb/Summary.html | > > I think with these format-sequences we'd cover a lot of cases. I'm asking why cannot we make %e behave like your proposed %E? From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 09 17:54:07 2024 Received: (at 68970) by debbugs.gnu.org; 9 Feb 2024 22:54:07 +0000 Received: from localhost ([127.0.0.1]:45059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYZl0-0002al-82 for submit@debbugs.gnu.org; Fri, 09 Feb 2024 17:54:06 -0500 Received: from mout01.posteo.de ([185.67.36.65]:37719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYZkx-0002aA-Cn for 68970@debbugs.gnu.org; Fri, 09 Feb 2024 17:54:04 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DEDD2240029 for <68970@debbugs.gnu.org>; Fri, 9 Feb 2024 23:44:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707518652; bh=EpDZoypCGVoj5Ll+bzkXMbvgovOctHNI91aHr00yzFE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=hT46siGFdUFhtV11FwbYVdSqfuRbGpuc7uOjRAd91HXnlwDJPtQ6kFZnx800BZfx4 KKJ1X/GZTZavq9+3ggUUcx5oacpbRnsCSEvS1Z2NSot1Ba2aTZyjpsHsQPLdtSIXw4 JrVHVfaJy1sUv7QT5+LPphwhNldio9sDaA90C7RD0bOGdd5NPxqEjDXvOff8uNOXkw QCM/6+/JSsjJCs3Dl90PzRJTyYw5M5nbd6JylgtZNtg+IhwBgz30+ei3+a6XzQmbTQ mlYo/ozaj6EeGhPd9j2Xl7zl/6wt9TI/jzR/6+/ol3hW854FjYasnQfPTsHw6qPtWB pHbYyeyGNBolg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TWpn801hNz6tvd; Fri, 9 Feb 2024 23:44:11 +0100 (CET) From: Mekeor Melire To: 68970@debbugs.gnu.org Subject: bug#68970: [PATCH] In Info-url-alist, add .html extension to %e format-sequence Date: Fri, 09 Feb 2024 22:00:47 +0000 References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> <8634u2w25i.fsf@gnu.org> In-reply-to: <8634u2w25i.fsf@gnu.org> Message-ID: <87le7t2r7o.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain 2024-02-09 09:02 eliz@gnu.org: > Why should %e omit the .html extension in the first place? Because by omitting the .html extension, URLs are a little shorter. By five characters. > What problems will we cause if we make %e include the .html extension > when that is required, and omit it when it isn't (like when converting > the "Top" node)? Yes, we could make %e include the .html extension for non-Top-nodes and for Top-nodes it could be replaced with the empty string "". > AFAICS, the use of %e in Emacs 29 Info-url-alist is not present in Emacs 29. It is only part of the master-branch, i.e. upcoming Emacs 30. It was committed on 27th January 2024, i.e. just a couple of days ago, in a commit authored by me. > doesn't add the .html extension to the produced URLs, but would > producing the .html extension from %e cause any problems with the GNU > manuals we had in Info-url-alist in Emacs 29? No, adding the .html extension for non-Top-nodes to %e would not cause any problems. > Do we know of any package which augments Info-url-alist with specs > that use %e.html? It's very unlikely because it's just a couple of days old. I myself am working on a package that will provide a community-maintained value for Info-url-alist. While working on it, I realized that the current implementation of %e would not work for many cases. > 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. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-In-Info-url-alist-add-.html-extension-to-e-format-se.patch >From 7eab913663fe8570d44f9c4399eb0547f1cc510f Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Fri, 9 Feb 2024 23:30:52 +0100 Subject: [PATCH] In Info-url-alist, add .html extension to %e format-sequence * lisp/info.el (Info-url-for-node): Implement the change. (Bug#68970) (Info-url-alist): Document the change. * test/lisp/info-tests.el (test-info-urls): Adjust tests to account for the change. --- lisp/info.el | 31 +++++++++++++++++-------------- test/lisp/info-tests.el | 12 ++++++------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index e91cc7b8e54..9be92f198c4 100644 --- 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 +the URL-encoded node-name, including the `.html' extension; in +case of the Top node, it will expand to the empty string. (The URL-encoding of the node-name mimics GNU Texinfo, as documented at Info node `(texinfo)HTML Xref Node Name Expansion'.) Alternatively, URL-SPEC can be a function which is given @@ -1924,18 +1925,20 @@ Info-url-for-node ;; (info "(texinfo) HTML Xref Node Name Expansion") (if (equal node "Top") "" - (url-hexify-string - (string-replace " " "-" - (mapconcat - (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- - (<= 33 ch 47) ; !"#$%&'()*+,-./ - (<= 58 ch 64) ; :;<=>?@ - (<= 91 ch 96) ; [\]_` - (<= 123 ch 127)) ; {|}~ DEL - (format "_00%x" ch) - (char-to-string ch))) - node "")))))) + (concat + (url-hexify-string + (string-replace " " "-" + (mapconcat + (lambda (ch) + (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (<= 33 ch 47) ; !"#$%&'()*+,-./ + (<= 58 ch 64) ; :;<=>?@ + (<= 91 ch 96) ; [\]_` + (<= 123 ch 127)) ; {|}~ DEL + (format "_00%x" ch) + (char-to-string ch))) + node ""))) + ".html")))) (cond ((stringp url-spec) (format-spec url-spec diff --git a/test/lisp/info-tests.el b/test/lisp/info-tests.el index 0dfdbf417e8..9835491912d 100644 --- 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"))) ;;; info-tests.el ends here -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 02:47:03 2024 Received: (at 68970) by debbugs.gnu.org; 10 Feb 2024 07:47:03 +0000 Received: from localhost ([127.0.0.1]:49630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYi4k-0001t7-Qx for submit@debbugs.gnu.org; Sat, 10 Feb 2024 02:47:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYi4i-0001sP-PG for 68970@debbugs.gnu.org; Sat, 10 Feb 2024 02:47:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYi4N-0000Vu-TI; Sat, 10 Feb 2024 02:46:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8c9x2n2UHmh6noU5acPTly5kmPu/dpmqbrD9i2/arE4=; b=raN835mcJsz3 Yn0Q69OLkFXNXwMowv6+ySUQVtK/6AY7GfnuOdXKgsHHZfb43yrDbVHUm+/cg0I5NwuuPDmPqIek5 yGCCMT7Q5HWiRFTNTYgqh/o/EClb6NnM6CV9VmVH60CywrTVT+nfXdguY2/q5Q/g6eVcvFyQW7aU1 hG6OiOo85qHqxe+YvXF0V7GV/BhNMvB9uKMVkOFw0H0Q5Vk03pWq4jB2gasY6drYywda8hBUNNadY r5OaeRVUocGVV5aKwvRhm3PVbhhb6Q4wY7IHC9b+rLOS1LsJOk8+EcDBu5TglLOKcg6O0FE8JQIhf AwpNBtH7N7QypJxBwqR5hw==; Date: Sat, 10 Feb 2024 09:46:37 +0200 Message-Id: <86jzncvk0y.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87le7t2r7o.fsf@posteo.de> (message from Mekeor Melire on Fri, 09 Feb 2024 22:00:47 +0000) Subject: Re: bug#68970: [PATCH] In Info-url-alist, add .html extension to %e format-sequence References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> <8634u2w25i.fsf@gnu.org> <87le7t2r7o.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: Eli Zaretskii > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 08:21:41 2024 Received: (at 68970) by debbugs.gnu.org; 10 Feb 2024 13:21:41 +0000 Received: from localhost ([127.0.0.1]:40431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYnIa-0008DY-T0 for submit@debbugs.gnu.org; Sat, 10 Feb 2024 08:21:41 -0500 Received: from mout01.posteo.de ([185.67.36.65]:41935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYnIY-0008DC-VR for 68970@debbugs.gnu.org; Sat, 10 Feb 2024 08:21:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 61924240029 for <68970@debbugs.gnu.org>; Sat, 10 Feb 2024 14:21:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707571277; bh=5v0UcZOT8nplDsdEtBdJNDDAwoz9/Zu17PKfsF5XY4g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=dwPfXf/AVg6d66B2nubUWU9+Sx34imZ+TMgajPt1HwgDUe5/RpG08Voa2yY6LGOqe W9isWASnafPvMXM73+tBYKOcYAlQ/2NzCryjCc0mXrg36YSjscgZdMr4C28Zv65JI+ GXyyT8qs/OORtiCgBhZYvmEAfHbqrvcckRgRuW5Bd9/A4+AKwlDJhNdmrfSkUFtlXq eiZiLVlMkCM2/jEheQiEbWkfioOBJFw1MW/yYpTr3bJNh+7KIOIbYF83naqo6oowze Rn90R9XKikAXg/z1527/c6Z4RHYOaWydxX2NOoyjQZ8CARi1rVHH4hpxtznj4Ddizy fc7WDolIDqQtg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TXBF81XQ0z9rxG; Sat, 10 Feb 2024 14:21:16 +0100 (CET) From: Mekeor Melire To: 68970@debbugs.gnu.org Subject: Re: bug#68970: [PATCH] In Info-url-alist, add .html extension to %e format-sequence Date: Sat, 10 Feb 2024 13:16:21 +0000 References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> <8634u2w25i.fsf@gnu.org> <87le7t2r7o.fsf@posteo.de> <86jzncvk0y.fsf@gnu.org> In-reply-to: <86jzncvk0y.fsf@gnu.org> Message-ID: <87cyt4316d.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 2024-02-10 09:46 eliz@gnu.org: > > From: Mekeor Melire > > Cc: Eli Zaretskii > > Date: Fri, 09 Feb 2024 22:00:47 +0000 > > > > 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. Sorry, I was referring to emacs-lisp-docstring-fill-column which Stefan Kangas increased from 65 to 72 on 2nd February 2024. Should I refill the docstring of Info-url-alist to match the new value? > Two spaces between sentences, please. Sorry, I will fix it. > Should we add here tests for the Top node? Yes, that's a good idea. I will do so. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 09:28:24 2024 Received: (at 68970) by debbugs.gnu.org; 10 Feb 2024 14:28:24 +0000 Received: from localhost ([127.0.0.1]:44201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYoL9-0002Yu-Oo for submit@debbugs.gnu.org; Sat, 10 Feb 2024 09:28:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYoL7-0002YV-2X for 68970@debbugs.gnu.org; Sat, 10 Feb 2024 09:28:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYnpv-0001RB-My; Sat, 10 Feb 2024 08:56:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KXm1NPf+gj6VlMwYQSL+ar5m3j56F6cX1uKMBvfGn3k=; b=IXJL2P0mXZRm bHJ24KFUpo/w41p7sG2Ghwtv6Ly9AkYdVDY6qH/vcJ1geaBFBhfS1Fu5mt/vKroOSHH4Hh1A06c9N IWVPEv6z30xstgnBG3hjwkhY1XzANyB4TQAnzgFgVKcaMrsf0WIJMVuSw6B4Xgxx5VXXF3UauvrUq rQM43O/X4Ke0e8ay8OTmpUtGRbvRN4Df08p2OZ0t9OCFPp/hxwxOfg561UIoRWvQx8gXPHiSxAaqe K5qJVKQ399QWHHz0VAwlWxfabEpc3YTbYTcKzhMYIpBBH5JzfJZvBXktjPTHqTYK7/CnYwY56hbjO 0BNlsUBm6Ub+QQj6JkmbAg==; Date: Sat, 10 Feb 2024 15:56:04 +0200 Message-Id: <86r0hktocr.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87cyt4316d.fsf@posteo.de> (message from Mekeor Melire on Sat, 10 Feb 2024 13:16:21 +0000) Subject: Re: bug#68970: [PATCH] In Info-url-alist, add .html extension to %e format-sequence References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> <8634u2w25i.fsf@gnu.org> <87le7t2r7o.fsf@posteo.de> <86jzncvk0y.fsf@gnu.org> <87cyt4316d.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: 68970@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: Eli Zaretskii > Date: Sat, 10 Feb 2024 13:16:21 +0000 > > 2024-02-10 09:46 eliz@gnu.org: > > > > From: Mekeor Melire > > > Cc: Eli Zaretskii > > > Date: Fri, 09 Feb 2024 22:00:47 +0000 > > > > > > 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. > > Sorry, I was referring to emacs-lisp-docstring-fill-column which Stefan > Kangas increased from 65 to 72 on 2nd February 2024. Should I refill the > docstring of Info-url-alist to match the new value? I understood, and answered your question above. To clarify: if the doc string looks okay to you, there's no need to refill. > > Two spaces between sentences, please. > > Sorry, I will fix it. > > > Should we add here tests for the Top node? > > Yes, that's a good idea. I will do so. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 10 17:46:14 2024 Received: (at 68970) by debbugs.gnu.org; 10 Feb 2024 22:46:14 +0000 Received: from localhost ([127.0.0.1]:48529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYw6v-0000HG-EF for submit@debbugs.gnu.org; Sat, 10 Feb 2024 17:46:14 -0500 Received: from mout02.posteo.de ([185.67.36.66]:48071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYw6s-0000Go-P5 for 68970@debbugs.gnu.org; Sat, 10 Feb 2024 17:46:12 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CCD71240101 for <68970@debbugs.gnu.org>; Sat, 10 Feb 2024 23:45:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1707605148; bh=60X4C9BKCDwp0iSaCkYrQZH0V3THEm4DySHAm5/gADk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=UaX1b17TMpscOkmq0ZEmrzl9NyiHYT7BEaebiRhf6uDpr3TrzwdcCn+IJCpApIyAQ JXkm+Y550806474ZIsRXVvpJ5RF9vP8z7cFXGzrtEBGnZAP32aca3Pjk1kVCddOIx8 ru3RifAM4z2n1LJoi62jBNTqTnOOMoVHWLfQKr9QDcxp1euia51OvMO4knsCAaCb+b 6CvH6D/kmBMNxAvyLknQGdFOGKw2Loo/Jn8NjMdbLJtYVUxgUDHmaXMcwdzkdSPTwe FXRoD4Cg3gV7732qfJMdjHIw2hJKrPagBwMgGNIp2B7cgqO93Rr2UoJSOqFNfeFBSX lbg3SEE5zvWqQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TXQmW547pz6tm4; Sat, 10 Feb 2024 23:45:47 +0100 (CET) From: Mekeor Melire To: 68970@debbugs.gnu.org Subject: [PATCH v2] In Info-url-alist, add .html extension to %e format-sequence Date: Sat, 10 Feb 2024 22:41:35 +0000 References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> <8634u2w25i.fsf@gnu.org> <87le7t2r7o.fsf@posteo.de> <86jzncvk0y.fsf@gnu.org> <87cyt4316d.fsf@posteo.de> <86r0hktocr.fsf@gnu.org> In-reply-to: <86r0hktocr.fsf@gnu.org> Message-ID: <87zfw80wh0.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970 Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain 2024-02-10 15:56 eliz@gnu.org: > if the doc string looks okay to you, there's no need to refill. I decided to not refill the docstring. > > > Two spaces between sentences, please. Done. > > > Should we add here tests for the Top node? Done. Find attached the new version of the patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-In-Info-url-alist-add-.html-extension-to-e-format-se.patch >From 7241f2ab1867f2d84c4e25c3ae5bba509718697f Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Fri, 9 Feb 2024 23:30:52 +0100 Subject: [PATCH] In Info-url-alist, add .html extension to %e format-sequence * lisp/info.el (Info-url-for-node): Implement the change. (Bug#68970) (Info-url-alist): Document the change. * test/lisp/info-tests.el (test-info-urls): Adjust tests to account for the change and add a test for the "Top" node. --- lisp/info.el | 31 +++++++++++++++++-------------- test/lisp/info-tests.el | 16 +++++++++------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index e91cc7b8e54..a6e78187e3b 100644 --- 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 +the URL-encoded node-name, including the `.html' extension; in +case of the Top node, it will expand to the empty string. (The URL-encoding of the node-name mimics GNU Texinfo, as documented at Info node `(texinfo)HTML Xref Node Name Expansion'.) Alternatively, URL-SPEC can be a function which is given @@ -1924,18 +1925,20 @@ Info-url-for-node ;; (info "(texinfo) HTML Xref Node Name Expansion") (if (equal node "Top") "" - (url-hexify-string - (string-replace " " "-" - (mapconcat - (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- - (<= 33 ch 47) ; !"#$%&'()*+,-./ - (<= 58 ch 64) ; :;<=>?@ - (<= 91 ch 96) ; [\]_` - (<= 123 ch 127)) ; {|}~ DEL - (format "_00%x" ch) - (char-to-string ch))) - node "")))))) + (concat + (url-hexify-string + (string-replace " " "-" + (mapconcat + (lambda (ch) + (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (<= 33 ch 47) ; !"#$%&'()*+,-./ + (<= 58 ch 64) ; :;<=>?@ + (<= 91 ch 96) ; [\]_` + (<= 123 ch 127)) ; {|}~ DEL + (format "_00%x" ch) + (char-to-string ch))) + node ""))) + ".html")))) (cond ((stringp url-spec) (format-spec url-spec diff --git a/test/lisp/info-tests.el b/test/lisp/info-tests.el index 0dfdbf417e8..8020a7419cf 100644 --- a/test/lisp/info-tests.el +++ b/test/lisp/info-tests.el @@ -28,18 +28,20 @@ (require 'ert-x) (ert-deftest test-info-urls () + (should (equal (Info-url-for-node "(tramp)Top") + "https://www.gnu.org/software/emacs/manual/html_node/tramp/")) (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")) - (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/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.html")) (should-error (Info-url-for-node "(nonexistent)Example"))) ;;; info-tests.el ends here -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 02:27:57 2024 Received: (at 68970-done) by debbugs.gnu.org; 11 Feb 2024 07:27:57 +0000 Received: from localhost ([127.0.0.1]:55391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZ4Fo-0002HT-Oe for submit@debbugs.gnu.org; Sun, 11 Feb 2024 02:27:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZ4Fm-0002H4-K4 for 68970-done@debbugs.gnu.org; Sun, 11 Feb 2024 02:27:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZ4FQ-0002Ik-VJ; Sun, 11 Feb 2024 02:27:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=L4aDhmumKnsNyZp5AlVemBhZDlaNPpXoBbBnYGv8Hhc=; b=L9WHKeMbYrzS KOfL5fPIot18T6sDclznFRKGXxBnNpPl7t68KbhBTWrknRLm6G3ScxmMkivCMdF57EZFKbXzeLLhC i6gdgvlDuvC0/EwGArAPe9biseRLmQI/EKAWGhEKfenMW5isF4I1RlIeB/3q/dKkW8Gkq2VJ/itVm d5kHbRmPbJwjSz5XhH7ozWkh26lB08fpGQsN8wjzyDqDBQnsh9omioln1CP7u1PSf5/JlPx3W5mW0 mUPACVS808nfbMZxbGDAfPS+ewqu0Jq7BbYH1A3SdUBjnTT1XZ1gOkGTXAkGtqyLHkPqCly8qfINX bGvg0y2EtQcikHepqk/PHw==; Date: Sun, 11 Feb 2024 09:27:31 +0200 Message-Id: <86y1brsboc.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87zfw80wh0.fsf@posteo.de> (message from Mekeor Melire on Sat, 10 Feb 2024 22:41:35 +0000) Subject: Re: [PATCH v2] In Info-url-alist, add .html extension to %e format-sequence References: <87fry44bz6.fsf@posteo.de> <867cjgz5rm.fsf@gnu.org> <87bk8s3usi.fsf@posteo.de> <86le7wxc3e.fsf@gnu.org> <8734u352rm.fsf@posteo.de> <86bk8rxyia.fsf@gnu.org> <87ttmi3ar3.fsf@posteo.de> <8634u2w25i.fsf@gnu.org> <87le7t2r7o.fsf@posteo.de> <86jzncvk0y.fsf@gnu.org> <87cyt4316d.fsf@posteo.de> <86r0hktocr.fsf@gnu.org> <87zfw80wh0.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68970-done Cc: 68970-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mekeor Melire > Cc: Eli Zaretskii > Date: Sat, 10 Feb 2024 22:41:35 +0000 > > > if the doc string looks okay to you, there's no need to refill. > > I decided to not refill the docstring. > > > > > Two spaces between sentences, please. > > Done. > > > > > Should we add here tests for the Top node? > > Done. > > Find attached the new version of the patch. Thanks, installed on the master branch, and closing the bug. From unknown Fri Jul 18 10:58:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 10 Mar 2024 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator