From unknown Fri Sep 05 17:59:58 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#67615 <67615@debbugs.gnu.org> To: bug#67615 <67615@debbugs.gnu.org> Subject: Status: [PATCH] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. Reply-To: bug#67615 <67615@debbugs.gnu.org> Date: Sat, 06 Sep 2025 00:59:58 +0000 retitle 67615 [PATCH] * lisp/info.el (Info-url-for-node): Support all Emacs= info manuals. reassign 67615 emacs submitter 67615 Mekeor Melire severity 67615 wishlist tag 67615 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 03 19:07:15 2023 Received: (at submit) by debbugs.gnu.org; 4 Dec 2023 00:07:15 +0000 Received: from localhost ([127.0.0.1]:33088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9wUV-0004NX-6r for submit@debbugs.gnu.org; Sun, 03 Dec 2023 19:07:15 -0500 Received: from lists.gnu.org ([2001:470:142::17]:55496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9wUS-0004NI-Uz for submit@debbugs.gnu.org; Sun, 03 Dec 2023 19:07:14 -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 1r9wUC-00086N-2N for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 19:06:56 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9wU7-0006Ag-D1 for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 19:06:55 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1150C240101 for ; Mon, 4 Dec 2023 01:06:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701648407; bh=wYvryW+biN23dkq3MTlzoenO/wBRlZa9LBO/y3qFfvg=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=Qn9PokReanS7GzdEuE897H1qXiAVSiZOUboRHjAfvn7tJF2s70d+mvTZUTtV1Vvg7 Pu5YnU4J1TcTV4YPB6voyIcbGz6A0TXPP8dWrDLld0x/SPBLdL55iF1RTdG+IptT/a j35RH9Rv7GAxXsrbFaKJGiwYKcDm7fTLuhz22ZN3Q2w5JxVWLKC9Idq4loZkrXeUSR XI0Jv0IIBh9isC1S+wurGmJdX2BQ9W+k7bNUTYeyIJ8OkbNAC3Aejz0bGiwETJ330S Ykd36ESabGOXz7mKM0wdptmPOhVwEuRfCpT++brkT4PzRDuuSjJ2JQfhZrIWMOOStP TEaH+jgeC4HYA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sk3qp1ff9z6tmv; Mon, 4 Dec 2023 01:06:46 +0100 (CET) From: Mekeor Melire To: bug-gnu-emacs@gnu.org Subject: [PATCH] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. Date: Mon, 04 Dec 2023 00:04:47 +0000 Message-ID: <87plzmsuge.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=185.67.36.66; envelope-from=mekeor@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.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_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, 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 (/) This is my first patch to Emacs. I probably made some mistakes regarding the many conventions. I tried my best, including regarding the code formatting. Also, I hope that my mail client is configured well and formats the patch well. Last but not least, note that my FSF-copyright-assignment is still ongoing. --- ChangeLog.4 | 7 ++++ etc/NEWS | 8 ++++ lisp/info.el | 101 ++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 90 insertions(+), 26 deletions(-) diff --git a/ChangeLog.4 b/ChangeLog.4 index 24afabdbbb1..6e54264a32b 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -1,3 +1,10 @@ +2023-12-03 Mekeor Melire + + Support online-browsing all Emacs-contained manuals. + + * lisp/info.el (Info-urls): New defcustom that maps manual-names + to URL-specifications. + 2023-10-16 Po Lu Correctly register focus events concomitant with alpha changes diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..6b5928bd74e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,6 +356,14 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-urls'. +Browse any online info manual, not just the 'emacs' and 'elisp' +manuals. By default, allow browsing online info manuals of all +Emacs-contained manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. Note that diff --git a/lisp/info.el b/lisp/info.el index 51e9eb72edf..0e16ee7340c 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,45 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-urls + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gawk" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix" "mairix-el" + "message" "mh-e" "modus-themes" "newsticker" "nxml-mode" + "octave-mode" "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" + "sasl" "sc" "semantic" "ses" "sieve" "smtpmail" "speedbar" + "srecode" "todo-mode" "tramp" "transient" "url" "use-package" + "vhdl-mode" "vip" "viper" "vtable" "widget" "wisent" "woman") . + "https://www.gnu.org/software/emacs/manual/html_node/%m/%n.html")) + "Alist telling `Info-mode' where manuals are accessible online. + +Each element of this list should match the pattern (MANUALS +. URL-SPEC). MANUALS represents the name of one or many +manuals. It should either be a string or a list of +strings. URL-SPEC should be a string in which the substring +\"%m\" will be expanded to the manual-name, and \"%n\" to the +URL-encoded node-name. This URL-encoding of the node-name matches +Texinfo's HTML cross-reference node name +expansion. Alternatively, URL-SPEC can be the symbol of a +function receiving the manual-name, the node-name and the +URL-encoded node-name as arguments, returning a URL as string. + +The default value of this variable refers to the HTTP-accessible +HTML-manuals of all manuals that Emacs includes. Specifically, +the URL refers to the latest version of Emacs, disregarding the +locally installed version." + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function-item + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1846,43 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return a URL for NODE. NODE should be a string of the form +\"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (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 "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (error "Invalid node-name %s" node)) + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (matched-pair (seq-find + (lambda (pair) + (seq-contains (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-urls))) + (if-let* ((encoded-node + ;; Reproduce GNU Texinfo's way of URL-encoding. + ;; (info "(texinfo) HTML Xref Node Name Expansion") + (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-spec (cdr matched-pair)) + (url-spec (cond + ((functionp url-spec) + (funcall url-spec + manual node encoded-node)) + ((stringp url-spec) url-spec)))) + (format-spec url-spec `((?m . ,manual) (?n . ,encoded-node))) + (error "`Info-urls' associates an invalid URL-specification with manual-name \"%s\"." + manual)) + (error "`Info-urls' does not associate any URL-specification with manual-name \"%s\"." + manual))) (defvar Info-read-node-completion-table) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 03 19:33:19 2023 Received: (at submit) by debbugs.gnu.org; 4 Dec 2023 00:33:19 +0000 Received: from localhost ([127.0.0.1]:33123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9wtj-0007gl-EP for submit@debbugs.gnu.org; Sun, 03 Dec 2023 19:33:19 -0500 Received: from lists.gnu.org ([2001:470:142::17]:58662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9wtg-0007gV-Qx for submit@debbugs.gnu.org; Sun, 03 Dec 2023 19:33:18 -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 1r9wtP-0003tr-1L for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 19:32:59 -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 1r9wtM-0001Bh-Uw for bug-gnu-emacs@gnu.org; Sun, 03 Dec 2023 19:32:58 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 52A28240027 for ; Mon, 4 Dec 2023 01:32:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701649973; bh=G/6eOWj6sIlkfj3SLZERL057mx7wvjSbrpmtWdtVITU=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=RDpQcG+J1wwmWZHbdTdAWRSFA8Zf1QRlLOaOHC0ZNzjEVmRkw9vIXbi73OLrJQ95F HrpF+Pc+upkreFzBx/pe5hgpm7LouBGRIhkJBx4CpWQqCrmrDB+8e/ieXry4+7ILPK doJvFX20dl646Re2DTt6nA1WgD/gI7cu8pldf9OBPZAh5GEhlXaq9uoGlA6JJ4Q3Jm Qm/OFhBHf6qbk8XbjDPe7+R4RzJ2ZOGhIFKkMplW/z4UPp/gBuo2aHPYPCBueZT+o5 ZkUnBpiNLaf6YCx6zMa5IFHG2BuAYlviEsWOOXam1c9UWHxGKCWhSz4RGIneByG6mV KkdA8/PSiZz3g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sk4Pw4RHMz6twm; Mon, 4 Dec 2023 01:32:52 +0100 (CET) References: <87plzmsuge.fsf@posteo.de> From: Mekeor Melire To: bug-gnu-emacs@gnu.org Subject: Re: bug#67615: [PATCH] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. Date: Mon, 04 Dec 2023 00:30:56 +0000 In-reply-to: <87plzmsuge.fsf@posteo.de> Message-ID: <87leaast8s.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.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_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, 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 (/) 2023-12-04 00:04 mekeor@posteo.de: > I hope that my mail client is configured well and formats the > patch well. Apparently, format=flowed is a bad idea for Git patches. Sorry. I'll resend soon. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 05:07:48 2023 Received: (at submit) by debbugs.gnu.org; 4 Dec 2023 10:07:48 +0000 Received: from localhost ([127.0.0.1]:33551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rA5rg-0006P2-5M for submit@debbugs.gnu.org; Mon, 04 Dec 2023 05:07:48 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rA5re-0006Op-BD for submit@debbugs.gnu.org; Mon, 04 Dec 2023 05:07:47 -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 1rA5rO-00015q-GD for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 05:07:30 -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 1rA5rL-0007av-Or for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 05:07:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F1087240027 for ; Mon, 4 Dec 2023 11:07:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701684435; bh=Ud+BRDlvsCOCLk+DABk5W8k8YtYzlM3mNA1D3nYGWuo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=X2MYlao2oZYM8y4X20ZQz8V+kCBRLyTOxeJVSNRJiuk/4nvuEnjD6IMv+YRVf9tV5 PUrft8vEvCe5zhKTqdL/FRDXVOIh6SLNTQD35dxmW1nt6l7u9RBAIGKLF1CGYxwWj7 o6oF3zXsZl0fWmG2FIYLaF5QPYcW0P/hcFvIo7a092bcQ0QbnqtosnuqXQCw1aCc6N XCMAMshszjnzcirnRE52aWMQaLsnrENOrpQfyvxePGD8ETjSRquXcANuW3RsCP2VtE mHY/+dq5s6u2CkyG9ZVzbOzhbS2GHwA/RiILHr0ndRhgj3vbo/3p+lzIhe5b4fbhNE /686vZ/cQp80A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SkK8f1Vp1z6tw4; Mon, 4 Dec 2023 11:07:14 +0100 (CET) References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> From: Mekeor Melire To: Mekeor Melire Subject: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. Date: Mon, 04 Dec 2023 10:02:51 +0000 In-reply-to: <87leaast8s.fsf@posteo.de> Message-ID: <87sf4ii8oi.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: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.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_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, 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 Cc: bug-gnu-emacs@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: -0.0 (/) --=-=-= Content-Type: text/plain Here's another attempt to send my patch; this time, without format=flowed. I hope it works now. In any case, sorry for the inconvenience. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-info.el-Info-url-for-node-Support-all-Emacs-inf.patch >From 2f91e43aadaa6d23df4df9c676e19de27cad6404 Mon Sep 17 00:00:00 2001 From: user <> Date: Mon, 4 Dec 2023 00:47:00 +0100 Subject: [PATCH] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. --- ChangeLog.4 | 7 ++++ etc/NEWS | 8 ++++ lisp/info.el | 101 ++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 90 insertions(+), 26 deletions(-) diff --git a/ChangeLog.4 b/ChangeLog.4 index 24afabdbbb1..6e54264a32b 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -1,3 +1,10 @@ +2023-12-03 Mekeor Melire + + Support online-browsing all Emacs-contained manuals. + + * lisp/info.el (Info-urls): New defcustom that maps manual-names + to URL-specifications. + 2023-10-16 Po Lu Correctly register focus events concomitant with alpha changes diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..6b5928bd74e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,6 +356,14 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-urls'. +Browse any online info manual, not just the 'emacs' and 'elisp' +manuals. By default, allow browsing online info manuals of all +Emacs-contained manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. Note that diff --git a/lisp/info.el b/lisp/info.el index 51e9eb72edf..0e16ee7340c 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,45 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-urls + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gawk" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix" "mairix-el" + "message" "mh-e" "modus-themes" "newsticker" "nxml-mode" + "octave-mode" "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" + "sasl" "sc" "semantic" "ses" "sieve" "smtpmail" "speedbar" + "srecode" "todo-mode" "tramp" "transient" "url" "use-package" + "vhdl-mode" "vip" "viper" "vtable" "widget" "wisent" "woman") . + "https://www.gnu.org/software/emacs/manual/html_node/%m/%n.html")) + "Alist telling `Info-mode' where manuals are accessible online. + +Each element of this list should match the pattern (MANUALS +. URL-SPEC). MANUALS represents the name of one or many +manuals. It should either be a string or a list of +strings. URL-SPEC should be a string in which the substring +\"%m\" will be expanded to the manual-name, and \"%n\" to the +URL-encoded node-name. This URL-encoding of the node-name matches +Texinfo's HTML cross-reference node name +expansion. Alternatively, URL-SPEC can be the symbol of a +function receiving the manual-name, the node-name and the +URL-encoded node-name as arguments, returning a URL as string. + +The default value of this variable refers to the HTTP-accessible +HTML-manuals of all manuals that Emacs includes. Specifically, +the URL refers to the latest version of Emacs, disregarding the +locally installed version." + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function-item + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1846,43 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return a URL for NODE. NODE should be a string of the form +\"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (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 "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (error "Invalid node-name %s" node)) + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (matched-pair (seq-find + (lambda (pair) + (seq-contains (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-urls))) + (if-let* ((encoded-node + ;; Reproduce GNU Texinfo's way of URL-encoding. + ;; (info "(texinfo) HTML Xref Node Name Expansion") + (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-spec (cdr matched-pair)) + (url-spec (cond + ((functionp url-spec) + (funcall url-spec + manual node encoded-node)) + ((stringp url-spec) url-spec)))) + (format-spec url-spec `((?m . ,manual) (?n . ,encoded-node))) + (error "`Info-urls' associates an invalid URL-specification with manual-name \"%s\"." + manual)) + (error "`Info-urls' does not associate any URL-specification with manual-name \"%s\"." + manual))) (defvar Info-read-node-completion-table) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 10:58:35 2023 Received: (at submit) by debbugs.gnu.org; 4 Dec 2023 15:58:35 +0000 Received: from localhost ([127.0.0.1]:35502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rABL9-0002Ud-8k for submit@debbugs.gnu.org; Mon, 04 Dec 2023 10:58:35 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rABL8-0002UQ-1C for submit@debbugs.gnu.org; Mon, 04 Dec 2023 10:58:34 -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 1rABKr-00031K-2F for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 10:58:17 -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 1rABKp-00015c-Cz for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2023 10:58:16 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6EA59240028 for ; Mon, 4 Dec 2023 16:58:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701705493; bh=6vbUXHwXhz4p1/dMkj+gXp0AMwE9Nrv1lzOdgpzmSs4=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=bWEmVDUa2PgfzHsfiGvYmLlAABTQ0/igllQEYK6kishonk+JjQfaSBOKLyl8mymam xoY34UO25LAGTHD/PL6vTqhDAQxinobMoIBoB8v0N3BiXXLPQgfDbE8H/vLOqudpZ4 I7fxmiYS5oO9DyRtzI9gefn+2atEJLKaWG542Pjotf0qrB1QKRvHNH1So07lExf2Kg CQiyqYtX5UtSgAmexMoO+mNOd6jUddOuFVcN5ijrwb3RKEIDOZBhCM6gdw2DS+xEwu k1kH2BtXj7Fz0ZQF/Kyvdqoaab2PY6TGAKnYKlSJv4VeUfJgy+q4Si/6q8DVM1W3hb ART4r9fFG3N0A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SkSxc5gTqz6tvJ; Mon, 4 Dec 2023 16:58:12 +0100 (CET) References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> From: Mekeor Melire To: bug-gnu-emacs@gnu.org Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. Date: Mon, 04 Dec 2023 15:51:32 +0000 In-reply-to: <87sf4ii8oi.fsf@posteo.de> Message-ID: <87o7f6hsfj.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain 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_H5=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 (/) Please do not yet commit this patch. There are some TODOs left: - Remove "gawk" and "mairix" manual-names from default value of Info-urls since they response with HTTP status "not found". - Check if there are more Emacs-included manuals, perhaps ones that are not "one page per node". - Improve and revisit NEWS, CHANGELOG and commit message. - Adhere to fill-column. - FSF copyright assignment. Also I have some questions: - What do you think about the naming of the Info-urls variable? - Is the position of the definition of Info-urls fine? From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 11:25:11 2023 Received: (at 67615) by debbugs.gnu.org; 4 Dec 2023 16:25:11 +0000 Received: from localhost ([127.0.0.1]:35512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rABkt-0003Gi-52 for submit@debbugs.gnu.org; Mon, 04 Dec 2023 11:25:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rABkq-0003GO-0y for 67615@debbugs.gnu.org; Mon, 04 Dec 2023 11:25:09 -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 1rABkZ-0003K0-Es; Mon, 04 Dec 2023 11:24:51 -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=1EDzQb43HskAX5LjCSu9QXUPqECmh7+mufjzyog7DHQ=; b=YHDg7EySZaTS xuB3JPE9ZIi/8j5aRPTYbDWQVdQNfUF7YQQk63/v5daIL5gHbXun5sttVAZbVX3e34cpZ633UspY1 pKZZVt5O4QLF2QneCeRh/k9ScfqaxFI8rSTC6sI/N6uK9wzuim3V1b5zp+aUD1W/K98RtGvjs5gJs tI+5OlZXIhwZnIs0B5a/V+OBKKlCsDX1g1EaGyyncK5kww124QrQmUEdbRc832QeUGx1S0lH6/ny0 2ArXhnr5sMh5nl37BbG0ZEM2LmJCtGB1rQNWd8r8VunxnWaNkg+YiNK3iAH06OL4wXz1IErA2dBlh BFjeK5WwID06q91YuKa/6g==; Date: Mon, 04 Dec 2023 18:24:56 +0200 Message-Id: <83msuq5413.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87o7f6hsfj.fsf@posteo.de> (message from Mekeor Melire on Mon, 04 Dec 2023 15:51:32 +0000) Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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: Mon, 04 Dec 2023 15:51:32 +0000 > > Please do not yet commit this patch. There are some TODOs left: > > - Remove "gawk" and "mairix" manual-names from default value of Gawk and mairix are not parts of Emacs, they are separately-maintained programs. So their manuals cannot be reached via the common base of the Emacs manuals, and therefore they should not be in that list, indeed. > Info-urls since they response with HTTP status "not found". > - Check if there are more Emacs-included manuals, perhaps ones that are > not "one page per node". > - Improve and revisit NEWS, CHANGELOG and commit message. > - Adhere to fill-column. > - FSF copyright assignment. > > Also I have some questions: > > - What do you think about the naming of the Info-urls variable? > - Is the position of the definition of Info-urls fine? I will review the patch in a couple of days, so if you have more changes, please feel free to post updated patches. There's no rush. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 04 20:17:13 2023 Received: (at 67615) by debbugs.gnu.org; 5 Dec 2023 01:17:13 +0000 Received: from localhost ([127.0.0.1]:36169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAK3l-0003dl-3B for submit@debbugs.gnu.org; Mon, 04 Dec 2023 20:17:13 -0500 Received: from mout02.posteo.de ([185.67.36.66]:41579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rAK3i-0003dQ-Ex for 67615@debbugs.gnu.org; Mon, 04 Dec 2023 20:17:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8C029240101 for <67615@debbugs.gnu.org>; Tue, 5 Dec 2023 02:16:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701739013; bh=pTELsXqRoHJkkawO0zf890Tpp7YG0EFyaqWzQ+mGZo4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=WiYXhvd6rNpN7lKF1Rh+/UCN13I/rWGPASzROkLAft3WWT3j5Zrk2IifcaWv79NPB +scmhXPdLdzJht5O79Z//TZcDv2DQggbaKJXXzps1ki1zu4j3WwHFqr8qrdbsWP2mh K+6o0fn3DaM8Wci38yuIQC1ubhn1IVx89gjhktFiOCLLu7SI3+5iPc7H+vtJbMvUkt xf1StO8T8eWzMN4fpuO1I8UgumxbuDWhx+jcZcqTJHkh+Nko9lohEdvLx3Ux8M1mgu 8cRArEU0Pn+hktxb0vhGzsVkqZ+gWmVEyzi5xPiSfR/T+JAGaQIr+7wqSGI3IYA/Yt Wp8z2XpIXQJqA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SkjLD5bmxz6tmv; Tue, 5 Dec 2023 02:16:52 +0100 (CET) References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <83msuq5413.fsf@gnu.org> From: Mekeor Melire To: Eli Zaretskii Subject: Org-Mode story on how I gathered the list of Emacs-contained online-manuals Date: Tue, 05 Dec 2023 01:06:43 +0000 In-reply-to: <83msuq5413.fsf@gnu.org> Message-ID: <87h6kxih4w.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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 (---) --=-=-= Content-Type: text/plain 2023-12-04 18:24 eliz@gnu.org: > > From: Mekeor Melire > > Date: Mon, 04 Dec 2023 15:51:32 +0000 > > > > - Remove "gawk" and "mairix" manual-names from default value of > > Gawk and mairix are not parts of Emacs, they are separately-maintained > programs. So their manuals cannot be reached via the common base of > the Emacs manuals, and therefore they should not be in that list, > indeed. For Gawk, my heuristics for gathering the list of manuals failed for an unknown reason. For mairix, it's "mairix" in https://www.gnu.org/software/emacs/manual/mairix.html but "mairix-el" in https://www.gnu.org/software/emacs/manual/html_node/mairix-el/index.html but I don't know why. That's why my heuristics failed here too. But yeah, "mairix-el" is the right one. To ensure a complete list, I revisited my heuristics and wrote a little story with Org Mode how I gathered the list of Emacs-included online-manuals. Anyone who's really interested, can read the attachment. :D --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=story.org * Sources Let's gather a list of Emacs-included manuals from different sources. ** Included of Guix-installed Emacs Gather a list of manuals that an Guix-installed Emacs includes: #+begin_src sh :results raw :wrap for f in $(find $(guix package -I | grep emacs-next | cut -f 4)/share/info -type f); do basename $f | cut -d . -f 1 done | sort #+end_src #+NAME: from_guix #+results: #+begin_results auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq eglot eieio eintr elisp emacs emacs-gnutls emacs-mime epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info mairix-el message mh-e modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp transient url use-package vhdl-mode vip viper vtable widget wisent woman #+end_results rcirc vtable vhdl-mode ses ido mh-e ccmode efaq info sieve emacs-gnutls mairix-el calc widget message transient cl forms autotype htmlfontify elisp pgg ebrowse wisent auth newsticker pcl-cvs erc sc org nxml-mode remember ediff vip dired-x bovine emacs-mime epa edt semantic eshell use-package gnus viper ert speedbar srecode eww woman idlwave eudc todo-mode dbus eieio eintr ede eglot modus-themes octave-mode url flymake smtpmail emacs sasl reftex tramp ** Mentioned on gnu.org Gather a list of Emacs-included manuals by parsing https://www.gnu.org/software/emacs/manual/. #+begin_src elisp (string-join (sort (seq-map #'cadr (s-match-strings-all "href=\"\\([a-zA-Z0-9_-]+\\)\.html" (plz 'get "https://www.gnu.org/software/emacs/manual/"))) #'string<) "\n") #+end_src #+NAME: from_gnu_org #+RESULTS: #+begin_example auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq efaq-w32 eglot eieio eintr elisp emacs emacs-gnutls emacs-mime epa epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info mairix message mh-e modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp transient url use-package vhdl-mode vip viper vtable widget wisent woman #+end_example ** Checked into emacs repository Gather a list of Emacs-included manuals from Emacs' repository; from a local clone in particular. #+begin_src sh :results raw :wrap find ~/store/host/permanent/git/foreign/emacs/doc/misc/ -type f -iname '*.texi' -exec basename \{\} .texi \; | sort #+end_src #+NAME: from_repo #+RESULTS: #+begin_results auth autotype bovine calc cc-mode cl dbus dired-x doclicense ebrowse ede ediff edt efaq efaq-w32 eglot eieio emacs-gnutls emacs-mime epa erc ert eshell eudc eww flymake forms gnus gnus-faq gpl htmlfontify idlwave ido info mairix-el message mh-e newsticker nxml-mode octave-mode pcl-cvs pgg rcirc reftex remember sasl sc semantic sem-user ses sieve smtpmail speedbar srecode todo-mode tramp trampver transient url use-package vhdl-mode vip viper vtable widget wisent woman #+end_results * Merge manual-lists from all sources Merge all sources; make sure each manual-name is unique. #+begin_src sh :var from_guix=from_guix :var from_gnu_org=from_gnu_org :var from_repo=from_repo :results raw :wrap for m in $from_guix $from_gnu_org $from_repo; do echo $m done | sort | uniq #+end_src #+NAME: merged #+RESULTS: #+begin_results auth autotype bovine calc cc-mode ccmode cl dbus dired-x doclicense ebrowse ede ediff edt efaq efaq-w32 eglot eieio eintr elisp emacs emacs-gnutls emacs-mime epa erc ert eshell eudc eww flymake forms gnus gnus-faq gpl htmlfontify idlwave ido info mairix mairix-el message mh-e modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic sem-user ses sieve smtpmail speedbar srecode todo-mode tramp trampver transient url use-package vhdl-mode vip viper vtable widget wisent woman #+end_results * Check online availability of each manual ** Filter manuals with "one page per node" online-manuals #+begin_src sh :var manuals=merged :results raw :wrap for m in $manuals; do if [ 200 = "$(curl -s -i https://www.gnu.org/software/emacs/manual/html_node/$m/index.html | head -n 1 | cut -d ' ' -f 2)" ]; then echo $m; fi done #+end_src #+NAME: available_per_node #+RESULTS: #+begin_results auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq efaq-w32 eglot eieio eintr elisp emacs emacs-gnutls emacs-mime epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info mairix-el message mh-e modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp transient url use-package vhdl-mode vip viper vtable widget wisent woman #+end_results ** Filter manuals with "entirely on one page" online-manuals Find out if there are manuals that do not have a "one page per node" online-manual, but have only a "entirely on one page" online-manual. It could be! First, determine those manuals without "one page per node" online-manuals: #+begin_src sh :var merged=merged :var available_per_node=available_per_node :results raw :wrap for m in $merged $available_per_node; do echo $m; done | sort | uniq -c | grep ' 1 ' | rev | cut -d ' ' -f 1 | rev #+end_src #+NAME: not_available_per_node #+RESULTS: #+begin_results cc-mode doclicense gnus-faq gpl mairix sem-user trampver #+end_results Well, these manuals are known to not exist because of following reasons: - cc-mode: It's =cc-mode.texi= but =ccmode.info=: https://git.sv.gnu.org/cgit/emacs.git/tree/doc/misc/cc-mode.texi?h=88a6209a7f881b6cab5f1fd9761f1b8ae7cad6fa#n84 - doclicense: Only used via ~@include ....texi~ - gnus-faq: Only used via ~@include ....texi~ - gpl: Only used via ~@include ....texi~ - mairix: It's "mairix" in https://www.gnu.org/software/emacs/manual/mairix.html but "mairix-el" in https://www.gnu.org/software/emacs/manual/html_node/mairix-el/index.html - sem-user: Only used via ~@include ....texi~ - trampver: Only used via ~@include ....texi~ Thus, there is no (online-)manual for these texi-files, particularly no "entirely on one page" online-manual. * Conclusion See results named =available_per_node= for list of all Emacs-included online manuals. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 06 21:49:14 2023 Received: (at 67615) by debbugs.gnu.org; 7 Dec 2023 02:49:14 +0000 Received: from localhost ([127.0.0.1]:40757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB4Ru-0005Qp-4H for submit@debbugs.gnu.org; Wed, 06 Dec 2023 21:49:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB4Rr-0005QZ-0y for 67615@debbugs.gnu.org; Wed, 06 Dec 2023 21:49:12 -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 1rB4RY-0006yj-O2; Wed, 06 Dec 2023 21:48:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=MKRHMrt+j2Q/0hgr7fdNq9xlUh3wEJkWpONtnvhFRrw=; b=GddfgQ/S7/U3 /1uKANDIexHuDfBTsHbtrNwUfmKsw5x9Y+DcBSYq/7jLnqGrWa9V76NtOlRlc+xIxsMXvF/Cpdn58 KNmhOk0tZs5zaIS3eFY8OaW4C5NSW2Rt1OJlSiSXwetaRucrM+2Ma6JpHfA+oH3fbJ0TQQP87odal DG0JZRKuh9TmhpuTax1n+y++Mx7p5rIN1170YJz05VXcF+1vzgifpqrnZh86Xy3ClxKS5D7zVRmes lFI5Ba9CkNW21jWAI6kws/o2crnJH3oXnIAg9rnYYkI1/FVkOaWTQu+9bnZ7rovpgt0FZS645WCwP +CBUeUZ8xwF9TEbOvNElQg==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rB4RY-0005nQ-4l; Wed, 06 Dec 2023 21:48:52 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Mekeor Melire In-Reply-To: <87o7f6hsfj.fsf@posteo.de> (message from Mekeor Melire on Mon, 04 Dec 2023 15:51:32 +0000) Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> Message-Id: Date: Wed, 06 Dec 2023 21:48:52 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > - Remove "gawk" and "mairix" manual-names from default value of > Info-urls since they response with HTTP status "not found". What is the intended meaning of Info-urls? What is the criterion for what to include, and what is the reason for choosing that criterion? I ask becaise Gawk is a GNU package. It is reasonable, as a matter of general principle, for Emacs to refer people to GAWK and its documentation. Whether it is useful to do so _in this specific case_, I don't have an opinion about, because I don't know ebough about this specific case. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 02:20:01 2023 Received: (at 67615) by debbugs.gnu.org; 7 Dec 2023 07:20:01 +0000 Received: from localhost ([127.0.0.1]:40919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB8fw-0006Ns-RQ for submit@debbugs.gnu.org; Thu, 07 Dec 2023 02:20:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rB8fr-0006NY-QQ for 67615@debbugs.gnu.org; Thu, 07 Dec 2023 02:19:59 -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 1rB8fa-0002wu-4F; Thu, 07 Dec 2023 02:19:38 -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=jkA03gSbYrYrtNA3+lD2PS4gegkwO5IysOugeroRUf4=; b=LtaSWPaB9OrT ySwUkWsK9UjYkhbiifafv5rcZOGePCfzxzxqFR2IrQBnv3kG6R4qOoQznTGeQDoUZTdWO+e2OXcDh dEQTjsAeetn5he2sfhIa5V5c2Z1dJIt1kkvDC3eVnJHGjtBxpO66MKTqcGJyhIwliLq7CRMoHXJ/L zF/LJDYpU08ISsea6yXc3SRPZ1QmW5EdH7i5eLH/Fo4eLdGc/qzDoYG/Be5eSJ/bcmn8TK/7AAFBC 2AXuYm01SkYzyrgDR6NJ9p1eJpUm8MZ+ACdQwBMjN1azZ4paIh9YlXtL383aOFvKOWrBAGD7dgLJO FKy+ohz4HmyAHAaZiUfQjg==; Date: Thu, 07 Dec 2023 09:19:42 +0200 Message-Id: <83il5a32ep.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-Reply-To: (message from Richard Stallman on Wed, 06 Dec 2023 21:48:52 -0500) Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: mekeor@posteo.de, 67615@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 (---) > Cc: 67615@debbugs.gnu.org > From: Richard Stallman > Date: Wed, 06 Dec 2023 21:48:52 -0500 > > > - Remove "gawk" and "mairix" manual-names from default value of > > Info-urls since they response with HTTP status "not found". > > What is the intended meaning of Info-urls? What is the criterion for > what to include, and what is the reason for choosing that criterion? > > I ask becaise Gawk is a GNU package. It is reasonable, as a matter of > general principle, for Emacs to refer people to GAWK and its > documentation. We decided first to support manuals that come with Emacs, and Gawk's manual doesn't. Supporting all GNU manuals is a much larger job, since there's no single base URL from which they all can be reached (although many of them can be reached from the GNU site). Also, the arrangement of the manuals of the other packages is slightly different from that of Emacs, which needs more specialized processing. So I think for now it should be enough to have only the Emacs manuals by default, and let users add more associations for other packages if they like. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 07:04:45 2023 Received: (at 67615) by debbugs.gnu.org; 7 Dec 2023 12:04:45 +0000 Received: from localhost ([127.0.0.1]:41302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBD7U-00005K-LI for submit@debbugs.gnu.org; Thu, 07 Dec 2023 07:04:44 -0500 Received: from mout01.posteo.de ([185.67.36.65]:57745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBD7S-00004z-4A for 67615@debbugs.gnu.org; Thu, 07 Dec 2023 07:04:43 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EBFD924002A for <67615@debbugs.gnu.org>; Thu, 7 Dec 2023 13:04:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701950664; bh=n6eKQabsRQd2QSg3CVbyT1YVxV5aDrwYiaZYtjPMNeY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=MDeinRxsrBABMC71cFHHSeViER4HmIuQyNcycLOByiaMxdch1/IiLNdlMzFiZSdGP yngq1dB62H31sZ8VTV7+Vh4OzXb5E0D3ypywLIWwNtLCe2MODOwduLt5KNjVbNsuvl slOIZ8ditzrMaeKOWJK7OV3dKzNy0v3z90CjvnAs1xFJz4o7hZuJD8xot2ciFGRsgB Le4HS8+7QRkK4iIIWzpqdw81QOXnGqD9dEgfzlWmTWi8IqCCtgs0IttPmeQ2h48JRy eAZCZl1nxiXanzschucHMzsux7Ef8oSmS0wt230TU0CasjnBtyeNML3IsRQRv1OZPW aPpIQkj+oGduw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SmCcR26Qhz6twF; Thu, 7 Dec 2023 13:04:23 +0100 (CET) References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <83il5a32ep.fsf@gnu.org> From: Mekeor Melire To: Eli Zaretskii Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. Date: Thu, 07 Dec 2023 11:56:34 +0000 In-reply-to: <83il5a32ep.fsf@gnu.org> Message-ID: <87bkb2usmz.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@debbugs.gnu.org, rms@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 (---) 2023-12-07 09:19 eliz@gnu.org: > We decided first to support manuals that come with Emacs, and Gawk's > manual doesn't. > > Supporting all GNU manuals is a much larger job, since there's no > single base URL from which they all can be reached (although many of > them can be reached from the GNU site). Also, the arrangement of the > manuals of the other packages is slightly different from that of > Emacs, which needs more specialized processing. It would be of great help if the administrators of gnu.org could provide a strict pattern for online-manual-URLs on gnu.org. Additionally, it'd be nice if gnu.org would not only provide the manual for the latest version of GNU packages, but also for prior versions. This would allow Emacs' info.el to browse the version-matching online-manual corresponding to the locally-installed, currently-read Emacs-included manual. But all of this needs to be discussed on another mailing-list, related to the administration of gnu.org. > So I think for now it should be enough to have only the Emacs manuals > by default, and let users add more associations for other packages if > they like. By the way, I'm planning to release a FSF-assigned Emacs-package providing more associations. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 12:02:31 2023 Received: (at 67615) by debbugs.gnu.org; 7 Dec 2023 17:02:31 +0000 Received: from localhost ([127.0.0.1]:42972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBHlf-0000ZA-FI for submit@debbugs.gnu.org; Thu, 07 Dec 2023 12:02:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBHlb-0000Yu-2P for 67615@debbugs.gnu.org; Thu, 07 Dec 2023 12:02:29 -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 1rBHlJ-0001MQ-0T; Thu, 07 Dec 2023 12:02:09 -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=E5SFTMrpXtP0PLU2U0fZjaZNiHhQ50IOndHuk9/9bHg=; b=Wptt8wa7Umnb VimrWRkyTlW1yw2PVf/pqQrn3Ru72NeBvWCugfLAjERl2WCifhWOA/WSjjWoSaU8D2TVv8+0P3yWh 998eegiPLGPQW8VxlWMq53udNlIr8qjyTXnOHqeQdvGYIAKJAN8VAVBDgqlwGFSJN+lhymdc7Xktf 3DS66EMwsl9Oc5sGnMenRcJb+2KTSC7s8uVJsIqYHPEZnAp/OADa2UJy74MEvi8D1K2R+cLga/Rl3 xo60lP/U5QJpJzWaFt5qvjc8RJa0++96oHYHIco4sz5CuGQ1XGL14tdhseX9ahKRJ3zQheie3Uw52 CRizuldekf/SVG9grjC6Hw==; Date: Thu, 07 Dec 2023 19:02:15 +0200 Message-Id: <834jgu2bfs.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87bkb2usmz.fsf@posteo.de> (message from Mekeor Melire on Thu, 07 Dec 2023 11:56:34 +0000) Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <83il5a32ep.fsf@gnu.org> <87bkb2usmz.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@debbugs.gnu.org, rms@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: rms@gnu.org, 67615@debbugs.gnu.org > Date: Thu, 07 Dec 2023 11:56:34 +0000 > > 2023-12-07 09:19 eliz@gnu.org: > > > We decided first to support manuals that come with Emacs, and Gawk's > > manual doesn't. > > > > Supporting all GNU manuals is a much larger job, since there's no > > single base URL from which they all can be reached (although many of > > them can be reached from the GNU site). Also, the arrangement of the > > manuals of the other packages is slightly different from that of > > Emacs, which needs more specialized processing. > > It would be of great help if the administrators of gnu.org could provide > a strict pattern for online-manual-URLs on gnu.org. Additionally, it'd > be nice if gnu.org would not only provide the manual for the latest > version of GNU packages, but also for prior versions. This would allow > Emacs' info.el to browse the version-matching online-manual > corresponding to the locally-installed, currently-read Emacs-included > manual. But all of this needs to be discussed on another mailing-list, > related to the administration of gnu.org. I think each GNU project uses slightly different arrangements. Also, how exactly the HTML manuals are arranged on gnu.org is up to the projects, not gnu.org admmins (which just provide technical support). In any case, this is not the right place to talk about GNU-wide conventions and decisions. > > So I think for now it should be enough to have only the Emacs manuals > > by default, and let users add more associations for other packages if > > they like. > > By the way, I'm planning to release a FSF-assigned Emacs-package > providing more associations. That is okay, but one problem with such associations is the need to maintain them so they remain accurate, tracking whatever changes in other GNU projects that could affect this. This is one reason I suggested that we stop short of doing that, and only limit ourselves to the manuals which we control. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 19:19:18 2023 Received: (at 67615) by debbugs.gnu.org; 8 Dec 2023 00:19:18 +0000 Received: from localhost ([127.0.0.1]:43386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBOaL-0001b2-P1 for submit@debbugs.gnu.org; Thu, 07 Dec 2023 19:19:18 -0500 Received: from mout01.posteo.de ([185.67.36.65]:59867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBOaH-0001ag-Ry for 67615@debbugs.gnu.org; Thu, 07 Dec 2023 19:19:16 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D4AB8240027 for <67615@debbugs.gnu.org>; Fri, 8 Dec 2023 01:18:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1701994732; bh=f1PdfSMjgWGc2XuosEG7xJwi+2YqWe39jlk6ClxjMqQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Disposition:From; b=IQokG76nwdkEw8BCdDV8LpG5+dPFVXiCP7+Y/Il9AGU8x/fo6uGp0kbU5DKbT92X7 QkTnjoS/lGCsgWT2rM70dDVBcHuqhofCmIlzdh30Pc0bCqKrml3RZmJxD2FJEe53mI rYEUaR2hEeQxCWPg4q+oo/S4df7J/khRVXF/H6imTy8J3JWdREdQfEBZFrctvCkRVM ixK/5JRik5mXI5hznTr1rc8TLzUwUXeQUXig8nLZrEKqz/jR6CJOae51m6BYQcdy8D N1cZd+/rbFdnjml1n8xpBDLQhRLB99CyqJHNodrmEWyTZxDZoGIGoKw+5v1PJ4aQpr Fv8TGE9z0OOaA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SmWvv5N17z6tw5; Fri, 8 Dec 2023 01:18:51 +0100 (CET) From: Mekeor Melire To: 67615@debbugs.gnu.org Subject: bug#67615: [PATCH v3] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. Date: Fri, 08 Dec 2023 00:15:15 +0000 References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> In-reply-to: <87o7f6hsfj.fsf@posteo.de> Message-ID: <87y1e5tumu.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-info.el-Info-url-alist-New-option-mapping-manua.patch X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 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 (---) >From 1e9b31174ab4cfb2edb73f23aa1a3ec86943ba42 Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Mon, 4 Dec 2023 16:37:37 +0100 Subject: [PATCH] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. --- ChangeLog.4 | 8 +++++ etc/NEWS | 9 +++++ lisp/info.el | 100 ++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 96 insertions(+), 21 deletions(-) diff --git a/ChangeLog.4 b/ChangeLog.4 index 24afabdbbb1..0aabd9f52bb 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -1,3 +1,11 @@ +2023-12-08 Mekeor Melire + + Support online-browsing all Emacs-contained manuals or any other. + + * lisp/info.el (Info-url-alist): New defcustom that maps + manual-names to URL-specifications. + (Info-url-for-node): Use it. + 2023-10-16 Po Lu Correctly register focus events concomitant with alpha changes diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..4730cc3a351 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,6 +356,15 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-url-alist'. +This user option associates manual-names with URLs. It affects the +'Info-goto-node-web' command. By default, associations for all +Emacs-included manuals are set. Further associations can be added for +arbitrary info manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. Note that diff --git a/lisp/info.el b/lisp/info.el index 51e9eb72edf..c0e342a62d6 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,52 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-url-alist + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" + "vip" "viper" "vtable" "widget" "wisent" "woman") . + "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 should match the pattern (MANUALS +. URL-SPEC). MANUALS represents the name of one or many 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 with 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 string. + +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." + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1853,45 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return a URL for NODE. NODE should be a string of the form +\"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (mapconcat (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (error "Invalid node-name %s" node)) + ;; use `if-let*' instead of `let*' so we check if an association was + ;; found. + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (association (seq-find + (lambda (pair) + (seq-contains (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-url-alist)) + (url-spec (cdr association)) + (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 - "")) - (concat "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (char-to-string ch))) + node "")))))) + (cond + ((stringp url-spec) + (format-spec url-spec + `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + ((functionp url-spec) + (funcall url-spec manual node encoded-node)) + (t (error "URL-specification neither string nor function"))) + (error "No URL-specification associated with manual-name `%s'"))) (defvar Info-read-node-completion-table) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 23:06:02 2023 Received: (at 67615) by debbugs.gnu.org; 9 Dec 2023 04:06:02 +0000 Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBobK-0003e3-Ac for submit@debbugs.gnu.org; Fri, 08 Dec 2023 23:06:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBobI-0003dY-DU for 67615@debbugs.gnu.org; Fri, 08 Dec 2023 23:06: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 1rBoay-0000Qv-BV; Fri, 08 Dec 2023 23:05:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=LIDDZj1UUxhB+MIMItCGzfJ2ekCZ4BrVGV4AD2timpc=; b=nsipxNcbNK2N SinnE/SkBGOnrkKvHrCZ3KDEJMJU9jEx1e8rlUuk/SOpHvg9xhQ5+tBPYN9bk038CmJy7d5sfNO3s +HiOUgROjnlmybmiOFHLrLZyPxMs+s1bkmA7kukofOpReedMcpO6Yhg2CzjzewZeRx4hPZwQ1lTy8 QuJi0zyp7vekcBZ7fJ5akH7kR9vCnm53nfCDDxWjz4xCZ8Fh+tr9UNswf4QRyXaYpNpz1rUoHenYq JDm/AoOmvlDzrwxj0JLQNiwgdgA6um2EBUIz9ACNe3MzSiWlqnqcizoohmzQ5N6VrbQ5nLgvuHTi1 gzQQioRvWlcW2F7f++auhw==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rBoaP-0001Gs-4e; Fri, 08 Dec 2023 23:05:05 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-Reply-To: <834jgu2bfs.fsf@gnu.org> (message from Eli Zaretskii on Thu, 07 Dec 2023 19:02:15 +0200) Subject: Re: bug#67615: [PATCH v2] * lisp/info.el (Info-url-for-node): Support all Emacs info manuals. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <83il5a32ep.fsf@gnu.org> <87bkb2usmz.fsf@posteo.de> <834jgu2bfs.fsf@gnu.org> Message-Id: Date: Fri, 08 Dec 2023 23:05:05 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: mekeor@posteo.de, 67615@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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I think each GNU project uses slightly different arrangements. Also, > how exactly the HTML manuals are arranged on gnu.org is up to the > projects, not gnu.org admmins (which just provide technical support). > In any case, this is not the right place to talk about GNU-wide > conventions and decisions. We could adopt a standard for this, if that would make it possible to integrate finding more manuals. I suggest people work on designing a standard to propose, then send it to gnu-prog-discuss@gnu.org. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 09 04:43:21 2023 Received: (at 67615) by debbugs.gnu.org; 9 Dec 2023 09:43:21 +0000 Received: from localhost ([127.0.0.1]:46838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBtrl-0004bQ-2k for submit@debbugs.gnu.org; Sat, 09 Dec 2023 04:43:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBtrj-0004bA-3s for 67615@debbugs.gnu.org; Sat, 09 Dec 2023 04:43:19 -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 1rBtrQ-0004AN-1g; Sat, 09 Dec 2023 04:43:00 -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=RvWyLkzH4Y3QWoFkjZpV/lWkQ8poNnwd2hNlNu6OkNs=; b=bslMpSGR56jm V6aU4BmgsZ7dZpMXfBqdhYsJzne9i7BYrCMpY/LbGTzSEQUPpva9esgdP8afdE+/MA+LmXOrqwIm0 amQDZjd9yjpq10+8o0o3n84IIRhrbT8OhltPV3Oj8mVrdUQB669UnPiD0UghcGfn+JNqfdU3cEVx8 LsRnumkxAitnjpnl90qTp2tLk1dMPar/hM0oo05D0H1Mo0weryC/LM7k1Ec01JnsdFZLk8lspXPIm A7xyOvevHpr6+Gk2ysvcE20W61LTsooMG9U/P+bITSciBYb/o0V0b75nhVhi9v8ydaYLDw2usMJQv PRaF6fMG/dEI0RiIiXJikA==; Date: Sat, 09 Dec 2023 11:42:44 +0200 Message-Id: <83fs0byanf.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87y1e5tumu.fsf@posteo.de> (message from Mekeor Melire on Fri, 08 Dec 2023 00:15:15 +0000) Subject: Re: bug#67615: [PATCH v3] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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, 08 Dec 2023 00:15:15 +0000 > > >From 1e9b31174ab4cfb2edb73f23aa1a3ec86943ba42 Mon Sep 17 00:00:00 2001 > From: Mekeor Melire > Date: Mon, 4 Dec 2023 16:37:37 +0100 > Subject: [PATCH] * lisp/info.el (Info-url-alist): New option mapping manuals > to URLs. Thanks, a few comments below. > diff --git a/ChangeLog.4 b/ChangeLog.4 > index 24afabdbbb1..0aabd9f52bb 100644 > --- a/ChangeLog.4 > +++ b/ChangeLog.4 > @@ -1,3 +1,11 @@ > +2023-12-08 Mekeor Melire > + > + Support online-browsing all Emacs-contained manuals or any other. > + > + * lisp/info.el (Info-url-alist): New defcustom that maps > + manual-names to URL-specifications. > + (Info-url-for-node): Use it. > + This is an auto-generated file, so no need to patch it by hand. > +*** New user option 'Info-url-alist'. > +This user option associates manual-names with URLs. It affects the ^^ Our convention is to leave two spaces between sentences. > +'Info-goto-node-web' command. By default, associations for all > +Emacs-included manuals are set. Further associations can be added for > +arbitrary info manuals. ^^^^ "Info", capitalized. > +(defcustom Info-url-alist > + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" > + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" > + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" > + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" > + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" > + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" > + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" > + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" > + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" > + "vip" "viper" "vtable" "widget" "wisent" "woman") . > + "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 should match the pattern (MANUALS > +. URL-SPEC). Our style is to say Each element of this list should have the form (MANUALs . URL-SPEC) > MANUALS represents the name of one or many manuals. ^^^^^^^^^^^ "one or more" > +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 string. ^^^^^^^^^ "as a string" > + :type '(alist > + :tag "Mapping from manual-name(s) to URL-specification" > + :key-type (choice > + (string :tag "A single manual-name") > + (repeat :tag "List of manual-names" string)) > + :value-type (choice > + (string :tag "URL-specification string") > + (function > + :tag "URL-specification function")))) Each defcustom should have the :version tag. > (defun Info-url-for-node (node) > - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. > -NODE should be a string on the form \"(manual)Node\". Only emacs > -and elisp manuals are supported." > + "Return a URL for NODE. NODE should be a string of the form > +\"(manual)Node\"." The first line of a doc string should be a single complete sentence. This is important because apropos commands show only the first line of each doc string. > + ;; use `if-let*' instead of `let*' so we check if an association was > + ;; found. Comments should be preferably complete sentences, starting with a capitalized letter and ending with a period. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 09 06:25:33 2023 Received: (at 67615) by debbugs.gnu.org; 9 Dec 2023 11:25:33 +0000 Received: from localhost ([127.0.0.1]:46904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBvSQ-0001dU-C2 for submit@debbugs.gnu.org; Sat, 09 Dec 2023 06:25:33 -0500 Received: from mout01.posteo.de ([185.67.36.65]:33991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBvSM-0001W9-2f for 67615@debbugs.gnu.org; Sat, 09 Dec 2023 06:25:16 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E193C24002A for <67615@debbugs.gnu.org>; Sat, 9 Dec 2023 12:24:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702121094; bh=fGEzE/PWJwXi93i0d4PuZ+HQNuLKxIVCj81MZCLQkBk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=Umfh1zItBvto4ok6xd3GhAwv6+XWjeCn/OKQ3T1z8OQsUOgWAV/+V1D8gvj0dl2eY f+wpnFaXcTvrZDJEUfNM3x0xUglt+SX0VTDkXpZmU99Db/YUExiDS8BdZ/sRCkoK3r H10RcvmIiwK7PkktDDvTPbNZixAJ0MpxV7RC/f7VjofhgTwE7iQsWfRt8rW83D6hEK exV4V4yYI7msrBn/QALl6KY9J0l4VXIqpRhjzXPFr3o+uSji0ZzEE3cdrokHjDdKIH Tr9rFCyq6ZltYyTFHhzmmmZRVqtiYzSR4wXUL+2rtVVYef48vTejcBQLC4WmExt1Hh 5eT8XJ1E5FSbA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SnQdy14fvz6txJ; Sat, 9 Dec 2023 12:24:54 +0100 (CET) From: Mekeor Melire To: 67615@debbugs.gnu.org Subject: Re: bug#67615: [PATCH v3] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. Date: Sat, 09 Dec 2023 11:21:55 +0000 References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> In-reply-to: <83fs0byanf.fsf@gnu.org> Message-ID: <87y1e3ei0t.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 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: -1.0 (-) --=-=-= Content-Type: text/plain 2023-12-09 11:42 eliz@gnu.org: > Thanks, a few comments below. Thanks for reviewing. I implemented the requested changes. Here's the new patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-info.el-Info-url-alist-New-option-mapping-manua.patch >From a30f11d1112a08a32f3da7adce37d8e09b390041 Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Mon, 4 Dec 2023 16:37:37 +0100 Subject: [PATCH] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. --- etc/NEWS | 9 +++++ lisp/info.el | 102 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 90 insertions(+), 21 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..cd1d3b1c060 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,6 +356,15 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-url-alist'. +This user option associates manual-names with URLs. It affects the +'Info-goto-node-web' command. By default, associations for all +Emacs-included manuals are set. Further associations can be added for +arbitrary Info manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. Note that diff --git a/lisp/info.el b/lisp/info.el index 51e9eb72edf..4ee62c1e729 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,53 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-url-alist + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" + "vip" "viper" "vtable" "widget" "wisent" "woman") . + "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 should have 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 with 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. + +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." + :version "30.1" + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1854,46 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return the URL corresponding to NODE. + +NODE should be a string of the form \"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (mapconcat (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (error "Invalid node-name %s" node)) + ;; Use `if-let*' instead of `let*' so we check if an association was + ;; found. + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (association (seq-find + (lambda (pair) + (seq-contains (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-url-alist)) + (url-spec (cdr association)) + (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 - "")) - (concat "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (char-to-string ch))) + node "")))))) + (cond + ((stringp url-spec) + (format-spec url-spec + `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + ((functionp url-spec) + (funcall url-spec manual node encoded-node)) + (t (error "URL-specification neither string nor function"))) + (error "No URL-specification associated with manual-name `%s'"))) (defvar Info-read-node-completion-table) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 19 18:15:23 2023 Received: (at 67615) by debbugs.gnu.org; 19 Dec 2023 23:15:23 +0000 Received: from localhost ([127.0.0.1]:37929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFjJ4-0004yh-Ap for submit@debbugs.gnu.org; Tue, 19 Dec 2023 18:15:23 -0500 Received: from mout02.posteo.de ([185.67.36.66]:43257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFjJ1-0004bA-Is for 67615@debbugs.gnu.org; Tue, 19 Dec 2023 18:15:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 49210240103 for <67615@debbugs.gnu.org>; Wed, 20 Dec 2023 00:15:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1703027710; bh=SRSVtdUBU26SELV6jb6EMfzmQhwgSpvENAI9KN+uGnU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=BZPogdM8pQevhj83IVSkHr0XjUNnLZr1dkuG7V8tOvglzp+gZxyleSIu8HwbT50UN EMK1sbHbd6F2Gkst/GJDCTmLBcareQxhWqbmXtRQPUXVeM7NPDHymmSSE+zxlfoPlf EKwn0prUozFZTuvtYxXlx42IjvoAINKl4fQx7kFJxOHC4P9Ex+bhbu7fcS9xO59FBj TYx/GvCLPoqFu9SIZBo6u6xVURMsWZRhBetkJPmTc03ppJAB2MQLCMuZN1oi2uSkqS cg+2QslG3R/bslAlxNhoi2zH6RrfCNurCcx6rZ+bHBMktO8a6Zj+4UbagPxfDONo/G xdAak+gFzESuw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Svsws3604z6tsB; Wed, 20 Dec 2023 00:15:09 +0100 (CET) From: Mekeor Melire To: 67615@debbugs.gnu.org Subject: [PATCH v4] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. Date: Tue, 19 Dec 2023 23:08:29 +0000 References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> In-reply-to: <87y1e3ei0t.fsf@posteo.de> Message-ID: <878r5pzsxy.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 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 Hello again :) Firstly, I'm happy to announce that my FSF-copyright-assignment is done. Secondly, I'd like to re-share the same version of the patch from my last e-mail. Perhaps it was forgotten, perhaps because I did not choose a new subject line. (I did so for this e-mail.) So here it is again. I'd appreciate a review or even a commit/merge if it's done. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-info.el-Info-url-alist-New-option-mapping-manua.patch >From a30f11d1112a08a32f3da7adce37d8e09b390041 Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Mon, 4 Dec 2023 16:37:37 +0100 Subject: [PATCH] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. --- etc/NEWS | 9 +++++ lisp/info.el | 102 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 90 insertions(+), 21 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..cd1d3b1c060 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -356,6 +356,15 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-url-alist'. +This user option associates manual-names with URLs. It affects the +'Info-goto-node-web' command. By default, associations for all +Emacs-included manuals are set. Further associations can be added for +arbitrary Info manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. Note that diff --git a/lisp/info.el b/lisp/info.el index 51e9eb72edf..4ee62c1e729 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,53 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-url-alist + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" + "vip" "viper" "vtable" "widget" "wisent" "woman") . + "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 should have 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 with 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. + +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." + :version "30.1" + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1854,46 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return the URL corresponding to NODE. + +NODE should be a string of the form \"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (mapconcat (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (error "Invalid node-name %s" node)) + ;; Use `if-let*' instead of `let*' so we check if an association was + ;; found. + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (association (seq-find + (lambda (pair) + (seq-contains (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-url-alist)) + (url-spec (cdr association)) + (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 - "")) - (concat "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (char-to-string ch))) + node "")))))) + (cond + ((stringp url-spec) + (format-spec url-spec + `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + ((functionp url-spec) + (funcall url-spec manual node encoded-node)) + (t (error "URL-specification neither string nor function"))) + (error "No URL-specification associated with manual-name `%s'"))) (defvar Info-read-node-completion-table) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 22 10:02:12 2023 Received: (at control) by debbugs.gnu.org; 22 Dec 2023 15:02:12 +0000 Received: from localhost ([127.0.0.1]:47587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGh2R-0006qU-Po for submit@debbugs.gnu.org; Fri, 22 Dec 2023 10:02:11 -0500 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:50258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGh2Q-0006qG-9a for control@debbugs.gnu.org; Fri, 22 Dec 2023 10:02:10 -0500 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-554473c653aso1145148a12.0 for ; Fri, 22 Dec 2023 07:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703257320; x=1703862120; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=fHfsWqIruAWtJEkakUfSRm17pDJ2CCT33bJVHXIFmEQ=; b=Zkxng8pyg79wc6fsTUtbG8Dtehuco35XOiioOqjKXUBM3qed+5iNiOT6uZ0FeTolL6 GOE2i3LekE9neVcuxScm5TLCgp056E+iRFfW4JYPQqpzJyYK9O6sqSkoLrrca48Zna6J tGHzfKEbaEvJrgfuwT1MnxwNu1vKocp3lGrorTYCdWt1SmZTKrOh0C1no8NOuAkbI9u/ 0b1mtU134iRXaIFIUL9dugxDJcLKL3qn08v6kcJd0hPXSoElji3Pizkeo1FnC7dJf1LG AEYGsTTmkcEDmjFWL1CkQ9hXB3fN7el9EWWnfGDqOMhPI77z94MMkMbUrEDV8ui7gEJv 2msw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257320; x=1703862120; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fHfsWqIruAWtJEkakUfSRm17pDJ2CCT33bJVHXIFmEQ=; b=nwlOQveReC7IoVUC251mhPSwsHusAwnAP3beTxI8MP1Nis98Wx3gKnnCAOmYb4jbtn YOiZQKlG6hQlhRbdc1hZYLdcb++CYwU40HE7h5GiTDP73wCRCZrHGkd4J6pI1OPQT6G9 5LeME0HLL9A8/4lFf0VhlxbnMn4SHfufZyJqcVR53kkaJMn/aZ1TviCOWt6SgG//CTUW NmnxsfiKiUMTBJwUsgGo42IiwscWklDoRwZgy5qkLPkA/FZSLBKcT2J282mUxbhN0GN0 KIKAOCf2E02Jgujqa1LJLNK+GnJTwQYuL0sJAQ16uZso034rrA0b4W/zgFsW1DAOyx93 XcBw== X-Gm-Message-State: AOJu0YxJ4OVvh3JHU6pPi2yHb1T32a8wfPbTlad69in3J0LU+bzQ3Tlz OcoXCLf+LZi8iJZh5x0GxNzh+T5bc6A5mB2Eof2lHLXBeZQKbQ== X-Google-Smtp-Source: AGHT+IHW8zCatQ2FOLcAesD/AAywgMRshxrfcOscpC1JSQO3PkKQwSWATcQB4yL/RxNWfSudJd8Dq0XzjgIbRv5jYPg= X-Received: by 2002:a50:ed02:0:b0:553:7dd8:f130 with SMTP id j2-20020a50ed02000000b005537dd8f130mr869275eds.29.1703257319077; Fri, 22 Dec 2023 07:01:59 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Dec 2023 07:01:58 -0800 From: Stefan Kangas MIME-Version: 1.0 Date: Fri, 22 Dec 2023 07:01:58 -0800 Message-ID: Subject: control message for bug #67615 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control 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: -1.0 (-) severity 67615 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 23 05:05:41 2023 Received: (at 67615) by debbugs.gnu.org; 23 Dec 2023 10:05:41 +0000 Received: from localhost ([127.0.0.1]:48624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyt2-0000Xz-Hl for submit@debbugs.gnu.org; Sat, 23 Dec 2023 05:05:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGysy-0000Xj-DF for 67615@debbugs.gnu.org; Sat, 23 Dec 2023 05:05:39 -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 1rGysm-0007jx-0d; Sat, 23 Dec 2023 05:05: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=qp678oulyz4/Ejt/HZ335raDOo+qJrNzhrdClIJVJwA=; b=MaEasBQ8qCud 8bwI4TFO52Z3u0h3snsVbuqW4qhiGU+zVCizQ0YH2CeZqU/H2/kMuR2F3YGrQZ19dOPEpyU+9jtJ6 o3e/fAiK+QvUcCokd+7fearnfdQnNdgQfDseg0AvqQyORM2GLa0VxPNKGqBc0bnEtgznqS23DMwQh N/L47yuSgW5cfrCv1S+RO12TAtnilqb9aLSP9N6ZozGc3dc1baDv6fAJA/LLFygXaeS2jKwqJKJj2 0Rh3633AsnbH1sSq+8W65NN+jTSXw3jUU0akz6GRw+IGpQ15sJ8GNQiOADoeABOyew/KHxg/10ndd YpaC0/ANENIiN4+qKmwyGg==; Date: Sat, 23 Dec 2023 12:05:05 +0200 Message-Id: <83bkahdyjy.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <878r5pzsxy.fsf@posteo.de> (message from Mekeor Melire on Tue, 19 Dec 2023 23:08:29 +0000) Subject: Re: [PATCH v4] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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: Tue, 19 Dec 2023 23:08:29 +0000 > > Secondly, I'd like to re-share the same version of the patch from my > last e-mail. Perhaps it was forgotten, perhaps because I did not choose > a new subject line. It wasn't forgotten, but thanks anyway. I have a few minor comments to this version: > +(defcustom Info-url-alist > + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" > + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" > + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" > + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" > + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" > + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" > + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" > + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" > + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" > + "vip" "viper" "vtable" "widget" "wisent" "woman") . > + "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 should have the form (MANUALs > +. URL-SPEC). MANUALS represents the name of one or more manuals. Please reformat/refill this so that "(MANUALs . URL-SPEC)" is not broken between two lines. > + (if-let* ((manual (match-string 1 node)) > + (node (match-string 2 node)) > + (association (seq-find > + (lambda (pair) > + (seq-contains (ensure-list (car pair)) ^^^^^^^^^^^^^ This triggers a byte-compiler warning: In Info-url-for-node: info.el:1868:32: Warning: `seq-contains' is an obsolete function (as of 27.1); use `seq-contains-p' instead. > + (error "No URL-specification associated with manual-name `%s'"))) And this line triggers the following byte-compiler warning: info.el:1896:6: Warning: `error' called with 0 args to fill 1 format field(s) From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 08 17:18:22 2024 Received: (at 67615) by debbugs.gnu.org; 8 Jan 2024 22:18:22 +0000 Received: from localhost ([127.0.0.1]:37809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMxwr-00028d-K0 for submit@debbugs.gnu.org; Mon, 08 Jan 2024 17:18:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]:49589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMxwp-00028P-7M for 67615@debbugs.gnu.org; Mon, 08 Jan 2024 17:18:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E0AC0240105 for <67615@debbugs.gnu.org>; Mon, 8 Jan 2024 23:18:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1704752286; bh=rkWSr/JfmA7skYVXaY3CaBh0kyzhNRwLVbAObXIHeBo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=pGqWii4HtDKcOOk9U6SGK+rJO2MfV+WDVSjykXBeJReUopbm1LjFtQq5G5DOKTQzz l95MhB96w4aNHJD4RPMzt23OL2ahMlNmeC9q+Nfbw/mtIb8pzePmCYKLoUNvvsf6eW 1xj81IX2jsl7JFsF6pVuH2hHwBaDEXAqa/UaVEscxxLlh3mhF3H6HDZTNLoc5EBLZD ICYgRdpYvFBQ/Jx+7jYDLUUNOEbLc45+ZC5B4MMTwxhJpLxPVG0vPnDbXpmOFN68mW lN9B7nGS3p866feGPvFnlQcLHuAHQLhWWX2GmYkQQlN6mVtXMSmfRoTQacj/vEzf50 bKFuTAKsFNWKg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T87jp0jnnz9rxG; Mon, 8 Jan 2024 23:18:06 +0100 (CET) From: Mekeor Melire To: Eli Zaretskii Subject: [PATCH v5] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. Date: Mon, 08 Jan 2024 21:56:03 +0000 References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> In-reply-to: <83bkahdyjy.fsf@gnu.org> Message-ID: <87sf37v5fi.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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 (---) --=-=-= Content-Type: text/plain 2023-12-23 12:05 eliz@gnu.org: > It wasn't forgotten, but thanks anyway. > I have a few minor comments to this version Thanks for... - not forgetting, - for all the patience, and - the comments. Attached is a new version of the patch which includes the requested improvements: - In a docstring, do not break line within form specification. - Pass a previously missing argument to `error'. - Use `seq-contains-p' instead of `seq-contains'. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-info.el-Info-url-alist-New-option-mapping-manua.patch >From 438c259a23e9f6ed6f8c3c460e6856404bfe002d Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Mon, 4 Dec 2023 16:37:37 +0100 Subject: [PATCH] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. --- etc/NEWS | 9 +++++ lisp/info.el | 103 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 91 insertions(+), 21 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a6b0beb6ee5..f0540df95f7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -402,6 +402,15 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-url-alist'. +This user option associates manual-names with URLs. It affects the +'Info-goto-node-web' command. By default, associations for all +Emacs-included manuals are set. Further associations can be added for +arbitrary Info manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. diff --git a/lisp/info.el b/lisp/info.el index 39ca88c358c..1edf663f9b3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,53 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-url-alist + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" + "vip" "viper" "vtable" "widget" "wisent" "woman") . + "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 with 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. + +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." + :version "30.1" + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1854,47 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return the URL corresponding to NODE. + +NODE should be a string of the form \"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (mapconcat (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + (error "Invalid node-name %s" node)) + ;; Use `if-let*' instead of `let*' so we check if an association was + ;; found. + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (association (seq-find + (lambda (pair) + (seq-contains-p (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-url-alist)) + (url-spec (cdr association)) + (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 - "")) - (concat "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (char-to-string ch))) + node "")))))) + (cond + ((stringp url-spec) + (format-spec url-spec + `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + ((functionp url-spec) + (funcall url-spec manual node encoded-node)) + (t (error "URL-specification neither string nor function"))) + (error "No URL-specification associated with manual-name `%s'" + manual))) (defvar Info-read-node-completion-table) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 13 04:52:28 2024 Received: (at 67615) by debbugs.gnu.org; 13 Jan 2024 09:52:28 +0000 Received: from localhost ([127.0.0.1]:38485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOagl-0002vc-ST for submit@debbugs.gnu.org; Sat, 13 Jan 2024 04:52:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOagj-0002vQ-Ov for 67615@debbugs.gnu.org; Sat, 13 Jan 2024 04:52:26 -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 1rOagd-00065I-OO; Sat, 13 Jan 2024 04:52:20 -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=BTaS/F3PE3xXd/AEqHF1/wdr1ElA9ED9p/LUyj/QM0Q=; b=lWMbk4Euoh/k sXvSDulqX7xPtZeb/bU2hRxYJRhTKYu58ybv4ycPTA7QsCg9MjEagoASm7iQWFLRxI0+w/B6zB64i pA9rfnL7d2tJzidMaiTXjvFqBGL1il+rYQb2rZmb66Gg0yz0XYYB3fizl3oDQCAjVI1v3KRCWVUdB j+MrDUgFPVYoryLRAB4umXyeMNGLeAtTMggmpTOzIWBihOf04Z3H+q6LI+2jRUxamXl7F+CCcwkha PvH16Ve+g/EAj3+Mm80dILl+ecDi2i9n86Fheaza9dr8QF9Rw04NqG6yvBwnTyjeUbpAzJEt2SVub Vh8I5qJTSUZMR8IvKfXidQ==; Date: Sat, 13 Jan 2024 11:51:35 +0200 Message-Id: <83a5p9h87s.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87sf37v5fi.fsf@posteo.de> (message from Mekeor Melire on Mon, 08 Jan 2024 21:56:03 +0000) Subject: Re: [PATCH v5] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> <87sf37v5fi.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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: 67615@debbugs.gnu.org > Date: Mon, 08 Jan 2024 21:56:03 +0000 > > > It wasn't forgotten, but thanks anyway. > > > I have a few minor comments to this version > > Thanks for... > > - not forgetting, > - for all the patience, and > - the comments. > > Attached is a new version of the patch which includes the requested > improvements: > > - In a docstring, do not break line within form specification. > - Pass a previously missing argument to `error'. > - Use `seq-contains-p' instead of `seq-contains'. Thanks. I was going to install this, but it causes info-tests in the test suite to fail: Test test-info-urls backtrace: signal(ert-test-failed (((should (equal (Info-url-for-node "(emacs)M ert-fail(((should (equal (Info-url-for-node "(emacs)Minibuffer") "ht (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-de (let (form-description-4) (if (unwind-protect (setq value-2 (apply f (let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-descripti (let* ((fn-0 #'equal) (args-1 (condition-case err (list (Info-url-fo (closure (t) nil (let* ((fn-0 #'equal) (args-1 (condition-case err ( #f(compiled-function () #)() handler-bind-1(#f(compiled-function () # Subject: [PATCH] * lisp/info.el (Info-url-alist): New option mapping manuals > to URLs. Please also improve the commit log message to mention all the changes, not just the new option. See CONTRIBUTE for details, and you can use "git log" to see many examples of how we do that. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 19 20:05:31 2024 Received: (at 67615) by debbugs.gnu.org; 20 Jan 2024 01:05:31 +0000 Received: from localhost ([127.0.0.1]:60538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQzne-0006N5-RW for submit@debbugs.gnu.org; Fri, 19 Jan 2024 20:05:31 -0500 Received: from mout01.posteo.de ([185.67.36.65]:36257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQznd-0006Mq-3f for 67615@debbugs.gnu.org; Fri, 19 Jan 2024 20:05:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 74863240027 for <67615@debbugs.gnu.org>; Sat, 20 Jan 2024 02:05:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1705712720; bh=gp0XGCYHTX7YkXaxCgbzmCd7lUqxmkPqxQ3X7rEGvOs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=muUkgZLvYZkXvCxFjRdMtu9eUNCwDNtr1iC9VBq7WKIXF7qLq1pn9sf5kPqYhPcp2 Yx64porsTBqKrKXB0Zdws4823vXibvH/2gaOJ/t27ocYvF4Qmq0EL2rWJjFXUoVKcg bQXJBLcGzB6zdaTFp56SmpLGEpWNR8eAinS+PtIXwvLs8zRCMKjsce96uUZ9ZmYvXO aO5G8WBcjV2/6GG4POiqQUVEHqVmtvI17feV0iNb3t/klilsaU+aiwHsoSiAI+Xumc Zqntgr0wVIaGzq+d+NLy8Uq5RTe4Dub/5VI3oxBmJ8sdfX1NkdODE9Kl1l1M7hibDG J1Zhilrgh/K5A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGyvg2X6Fz9rxB; Sat, 20 Jan 2024 02:05:19 +0100 (CET) From: Mekeor Melire To: 67615@debbugs.gnu.org Subject: Re: [PATCH v6] Add option Info-url-alist Date: Sat, 20 Jan 2024 00:50:22 +0000 References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> <87sf37v5fi.fsf@posteo.de> <83a5p9h87s.fsf@gnu.org> In-reply-to: <83a5p9h87s.fsf@gnu.org> Message-ID: <87edec3jcl.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 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-01-13 11:51 eliz@gnu.org: > > From: Mekeor Melire > > Cc: 67615@debbugs.gnu.org > > Date: Mon, 08 Jan 2024 21:56:03 +0000 > I was going to install this, but it causes info-tests in the test > suite to fail: > If we want the result to include the "html" extension (which might not > be correct, since perhaps we could have Minibuffer.htm?), then please > update the test. Otherwise, it sounds like the code needs some > adjustment to behave as before? I vote for keeping the ".html" suffix because I can imagine that Texinfo creates only files with that suffix and it's depends on the web-server and its configuration if the file is also served when the suffix is missed in the URL. Unfortunately, I was not able to verify this in the Texinfo documentation or source code. I had to make another adjustment info-test.el to make the test succeed: Previously, Info-node-for-url failed when the passed manual-name was neither "emacs" nor "elisp". In particular, it failed for "gnus". Now that "gnus" is a handled manual-name, it succeeds. But it should still error when the manual-name is not handled (by the default value of the newly introduced Info-url-alist). > Please also improve the commit log message to mention all the changes, > not just the new option. See CONTRIBUTE for details, and you can use > "git log" to see many examples of how we do that. I gave my best. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-Info-url-alist.patch >From 1e75f8397fb6396b2244e87d5a66062c8a11ee16 Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Mon, 4 Dec 2023 16:37:37 +0100 Subject: [PATCH] Add option Info-url-alist * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. (Info-url-for-node): Use it. * test/lisp/info-tests.el (test-info-urls): Info-url-for-node should error when manual-name is not handled in Info-url-alist. * etc/NEWS: Announce the change. --- etc/NEWS | 9 ++++ lisp/info.el | 113 +++++++++++++++++++++++++++++++--------- test/lisp/info-tests.el | 4 +- 3 files changed, 100 insertions(+), 26 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a6b0beb6ee5..f0540df95f7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -402,6 +402,15 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-url-alist'. +This user option associates manual-names with URLs. It affects the +'Info-goto-node-web' command. By default, associations for all +Emacs-included manuals are set. Further associations can be added for +arbitrary Info manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. diff --git a/lisp/info.el b/lisp/info.el index 39ca88c358c..78512d0d518 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,53 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-url-alist + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" + "vip" "viper" "vtable" "widget" "wisent" "woman") . + "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 with 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. + +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." + :version "30.1" + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1854,49 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." + "Return the URL corresponding to NODE. + +NODE should be a string of the form \"(manual)Node\"." (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (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 "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) + (error "Invalid node-name %s" node)) + ;; Use `if-let*' instead of `let*' so we check if an association was + ;; found. + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (association (seq-find + (lambda (pair) + (seq-contains-p (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-url-alist)) + (url-spec (cdr association)) + (encoded-node + ;; Reproduce GNU Texinfo's way of URL-encoding. + ;; (info "(texinfo) HTML Xref Node Name Expansion") + (if (equal node "Top") + "" (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (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 + `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + ((functionp url-spec) + (funcall url-spec manual node encoded-node)) + (t (error "URL-specification neither string nor function"))) + (error "No URL-specification associated with manual-name `%s'" + manual))) (defvar Info-read-node-completion-table) diff --git a/test/lisp/info-tests.el b/test/lisp/info-tests.el index ebe718167bf..b4f94b77030 100644 --- a/test/lisp/info-tests.el +++ b/test/lisp/info-tests.el @@ -34,6 +34,8 @@ test-info-urls "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.html")) - (should-error (Info-url-for-node "(gnus)Minibuffer File"))) + (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 Sat Jan 20 01:18:27 2024 Received: (at 67615) by debbugs.gnu.org; 20 Jan 2024 06:18:27 +0000 Received: from localhost ([127.0.0.1]:60712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR4gT-0003U9-Uc for submit@debbugs.gnu.org; Sat, 20 Jan 2024 01:18:27 -0500 Received: from mout02.posteo.de ([185.67.36.66]:38241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR0MU-00049F-2D for 67615@debbugs.gnu.org; Fri, 19 Jan 2024 20:41:30 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 554B6240101 for <67615@debbugs.gnu.org>; Sat, 20 Jan 2024 02:41:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1705714881; bh=Meln/6Xmm2lvKTkh6oXJ78eLS4cHc807SxlIc89eWeY=; h=Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=H3vKXJAoFmbBoP2WRap/Zmp1jsqrB4JGoT6akxXDhuC12nR5mqv3hDWp9DHkV61JV ETFk6YO4DjwreJ/ZhcogdX0vrydqzmoE5omODdHh4midcD2oMxQm19GN4Hc1QyVl0z tjzP4fTfimLKeQRv35gT1dcK+/Tz3w+/tuCLK+CP+cCUzK7YiqHYOOfHE3lQsjvB/8 9CgR0IB6WENps9G67QVl3liU3Zt22oMAn/Gngjwome/Qd3+w1uG7p9EDv7FfS93r5G CImiJgENcR0ZiKEFIXohxg4Qx+VFGJIkrbWtJW5HJiuTLjNV7NSOKIziRgbQQpQee7 CjUqzRWfYx1Uw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGzjD2tGXz9rxD; Sat, 20 Jan 2024 02:41:20 +0100 (CET) Date: Sat, 20 Jan 2024 01:41:19 +0000 From: =?ISO-8859-1?Q?Orhan_Kemal_Y=FCksel?= To: 67615@debbugs.gnu.org Subject: Re: [PATCH v6] Add option Info-url-alist In-Reply-To: <87edec3jcl.fsf@posteo.de> References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> <87sf37v5fi.fsf@posteo.de> <83a5p9h87s.fsf@gnu.org> <87edec3jcl.fsf@posteo.de> Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----VDFRORJ2C46WSYGX3GIC4UMXV8OQRY Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 X-Mailman-Approved-At: Sat, 20 Jan 2024 01:18:22 -0500 Cc: eliz@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 (---) ------VDFRORJ2C46WSYGX3GIC4UMXV8OQRY Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On January 20, 2024 1:50:22 AM GMT+01:00, Mekeor Melire wrote: >2024-01-13 11:51 eliz@gnu=2Eorg: > >> > From: Mekeor Melire >> > Cc: 67615@debbugs=2Egnu=2Eorg >> > Date: Mon, 08 Jan 2024 21:56:03 +0000 > >> I was going to install this, but it causes info-tests in the test >> suite to fail: > >> If we want the result to include the "html" extension (which might not >> be correct, since perhaps we could have Minibuffer=2Ehtm?), then please >> update the test=2E Otherwise, it sounds like the code needs some >> adjustment to behave as before? > >I vote for keeping the "=2Ehtml" suffix because I can imagine that Texinf= o >creates only files with that suffix and it's depends on the web-server >and its configuration if the file is also served when the suffix is >missed in the URL=2E > >Unfortunately, I was not able to verify this in the Texinfo >documentation or source code=2E > >I had to make another adjustment info-test=2Eel to make the test succeed: >Previously, Info-node-for-url failed when the passed manual-name was >neither "emacs" nor "elisp"=2E In particular, it failed for "gnus"=2E Now >that "gnus" is a handled manual-name, it succeeds=2E But it should still >error when the manual-name is not handled (by the default value of the >newly introduced Info-url-alist)=2E > >> Please also improve the commit log message to mention all the changes, >> not just the new option=2E See CONTRIBUTE for details, and you can use >> "git log" to see many examples of how we do that=2E > >I gave my best=2E > I will send another version of the patch=2E The %e provided to URL-SPECs i= n Info-url-alist should not contain the "=2Ehtml"-suffix=2E Since we know t= hat the webserver of gnu=2Eorg does serve the docs even if the URL omits th= e HTML-suffix, we should prefer that shorter version since it's easier on t= he eyes (and better e=2Eg=2E for IRC etc=2E)=2E Sorry for the noise=2E ------VDFRORJ2C46WSYGX3GIC4UMXV8OQRY Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Ja= nuary 20, 2024 1:50:22 AM GMT+01:00, Mekeor Melire <mekeor@posteo=2Ede&g= t; wrote:
2024-01-13 11:51 eliz@gnu=2Eorg:
From: Mekeor Melire &l= t;mekeor@posteo=2Ede>
Cc: 67615@debbugs=2Egnu=2Eorg
Date: Mon, 08 = Jan 2024 21:56:03 +0000

I was going to install this, but it causes info-tests in the test
su= ite to fail:

If we want the resul= t to include the "html" extension (which might not
be correct, since per= haps we could have Minibuffer=2Ehtm?), then please
update the test=2E O= therwise, it sounds like the code needs some
adjustment to behave as bef= ore?

I vote for keeping the "= =2Ehtml" suffix because I can imagine that Texinfo
creates only files wi= th that suffix and it's depends on the web-server
and its configuration = if the file is also served when the suffix is
missed in the URL=2E
Unfortunately, I was not able to verify this in the Texinfo
documentat= ion or source code=2E

I had to make another adjustment info-test=2Ee= l to make the test succeed:
Previously, Info-node-for-url failed when th= e passed manual-name was
neither "emacs" nor "elisp"=2E In particular, i= t failed for "gnus"=2E Now
that "gnus" is a handled manual-name, it succ= eeds=2E But it should still
error when the manual-name is not handled (b= y the default value of the
newly introduced Info-url-alist)=2E

Plea= se also improve the commit log message to mention all the changes,
not j= ust the new option=2E See CONTRIBUTE for details, and you can use
"git = log" to see many examples of how we do that=2E

I gave my best=2E

I will send another version of the patch= =2E The %e provided to URL-SPECs in Info-url-alist should not contain the "= =2Ehtml"-suffix=2E Since we know that the webserver of gnu=2Eorg does serve= the docs even if the URL omits the HTML-suffix, we should prefer that shor= ter version since it's easier on the eyes (and better e=2Eg=2E for IRC etc= =2E)=2E

Sorry for the noise=2E

------VDFRORJ2C46WSYGX3GIC4UMXV8OQRY-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 20 02:23:49 2024 Received: (at 67615) by debbugs.gnu.org; 20 Jan 2024 07:23:50 +0000 Received: from localhost ([127.0.0.1]:60762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR5hl-0007U9-IV for submit@debbugs.gnu.org; Sat, 20 Jan 2024 02:23:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR5hk-0007Tt-1R for 67615@debbugs.gnu.org; Sat, 20 Jan 2024 02:23:48 -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 1rR5hb-0006Yo-Uj; Sat, 20 Jan 2024 02:23: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=l8FHHUVI2r5GZC/IHELR84JIYerbG5W+2m3LxPZrjJ4=; b=KGNZDVV63nUt YSG7R86mhKxwYGKjvFvC5nrj5Ul1u973WXssC8m116H04T5JPRC9eXerhdVQEioLMuGRAd69JSZmm BYtzYErFawBWQdT4JIHHeOOmNPx4X9c5gI2hkGd0+f2GS5XYOVaVEn/q8Ib2UQ8DlaYRuGPYXPHIZ 5OyHJL8p9ZGJMKOnNr2y/pENbWK/Yyv1Eu+Uh33jDpilREZKDBc3bX3MUClIkNNptl4idw5U15soE m/eHEEeRbAzn176rlzALqrv7WoLP3EYmX2oGlaeG8z4BdCvSUlZhQjoLB/6ZxdbrwyPPPajqLqT0f qE5s3Ig+95a8ReR70Edl0A==; Date: Sat, 20 Jan 2024 09:23:20 +0200 Message-Id: <835xzov57b.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87edec3jcl.fsf@posteo.de> (message from Mekeor Melire on Sat, 20 Jan 2024 00:50:22 +0000) Subject: Re: [PATCH v6] Add option Info-url-alist References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> <87sf37v5fi.fsf@posteo.de> <83a5p9h87s.fsf@gnu.org> <87edec3jcl.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 Cc: 67615@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, 20 Jan 2024 00:50:22 +0000 > > > I was going to install this, but it causes info-tests in the test > > suite to fail: > > > If we want the result to include the "html" extension (which might not > > be correct, since perhaps we could have Minibuffer.htm?), then please > > update the test. Otherwise, it sounds like the code needs some > > adjustment to behave as before? > > I vote for keeping the ".html" suffix because I can imagine that Texinfo > creates only files with that suffix and it's depends on the web-server > and its configuration if the file is also served when the suffix is > missed in the URL. What about the case where the HTML docs are produced with one file per node? doesn't Texinfo create in that case directories that are named like the manual, but without the .html extension? From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 20 21:01:00 2024 Received: (at 67615) by debbugs.gnu.org; 21 Jan 2024 02:01:00 +0000 Received: from localhost ([127.0.0.1]:36225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRN8t-0002He-Mp for submit@debbugs.gnu.org; Sat, 20 Jan 2024 21:01:00 -0500 Received: from mout01.posteo.de ([185.67.36.65]:37827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRN8q-0002HM-LB for 67615@debbugs.gnu.org; Sat, 20 Jan 2024 21:00:58 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CD68D240027 for <67615@debbugs.gnu.org>; Sun, 21 Jan 2024 03:00:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1705802447; bh=06em10uNRUfm4apiRhib3GbG3AtRgFCpd/ubxRdgOD4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=BrAzNRAumAnzRPJaBvHN0wcwrvlMMXKa+lrojFU6MEVzo6atgi1uxS9LVZVKYXTYH YPhiCTgRIjcN9Gddpn8KwMhALKiE+NmSt30osUbw0ITCVnFDtvJr3S8W4GGBaToE3n z0jshgqf68RXMmWfoGiQT5i+u8oCdfzHjlEWhsS7PPeGHoUN8HhaLusckpFFfqhQaJ zbsfqJ+09lzFU1HLfrYGBIdcxPqW1trZe1X3JfDJo7lG7rPOUbuzfa4tWp9jyMf5pY 2AJHZKckoY0vWkz1r9OtUUD/OjKWay2fVhfMMdScBmOQ8ouG9rB/4WfGatzwZUhrz4 OBdnXuIdJ3YMA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4THc5B2wqnz9rxB; Sun, 21 Jan 2024 03:00:46 +0100 (CET) From: Mekeor Melire To: 67615@debbugs.gnu.org Subject: Re: [PATCH v7] Add option Info-url-alist Date: Sun, 21 Jan 2024 01:43:04 +0000 References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> <87sf37v5fi.fsf@posteo.de> <83a5p9h87s.fsf@gnu.org> <87edec3jcl.fsf@posteo.de> <835xzov57b.fsf@gnu.org> In-reply-to: <835xzov57b.fsf@gnu.org> Message-ID: <87a5oz30om.fsf@posteo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615 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-01-20 09:23 eliz@gnu.org: > What about the case where the HTML docs are produced with one file per > node? doesn't Texinfo create in that case directories that are named > like the manual, but without the .html extension? I tested this and found out that Texinfo does not create directories for each node in that case. The reason why after omitting the .html-suffix gnu.org still serves the html-manual is its web-server configuration. This was confirmed to me via IRC in the #gnu channel on libera.chat server. Attached is a new version of that patch with following changes: - Let Info-url-for-node skip whitespace and newlines between closing parenthesis and node-name. This mimics Texinfo as can be traced here: https://git.savannah.gnu.org/cgit/texinfo.git/tree/info/info.h?h=114e10b2a1cb5ee07ae6b9d1228d6d016c9f86e6#n44 https://git.savannah.gnu.org/cgit/texinfo.git/tree/info/scan.c?h=114e10b2a1cb5ee07ae6b9d1228d6d016c9f86e6#n123 It also makes Info-url-for-node work with the string that is put into kill-ring with the Info-copy-current-node-name command which uses a whitespace. - Do not use a .html suffix, neither in the default value for the new Info-url-alist, nor in the %e format-thing that can be in user-defined values of it. Users still can add a ".html" suffix themselves, if the respective web-server does not support omitting it. - More tests, including manuals in all relevant directories and formats and "special" characters. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-Info-url-alist.patch >From 856ea96868c54af8649cd604b5f92cf5cab4ca3c Mon Sep 17 00:00:00 2001 From: Mekeor Melire Date: Mon, 4 Dec 2023 16:37:37 +0100 Subject: [PATCH] Add option Info-url-alist * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. (Info-url-for-node): Use it. * test/lisp/info-tests.el (test-info-urls): Add more tests. In particular, Info-url-for-node should error when manual-name is not handled in Info-url-alist. * etc/NEWS: Announce the change. --- etc/NEWS | 9 ++++ lisp/info.el | 108 ++++++++++++++++++++++++++++++++-------- test/lisp/info-tests.el | 14 ++++-- 3 files changed, 105 insertions(+), 26 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a6b0beb6ee5..f0540df95f7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -402,6 +402,15 @@ respectively, in addition to the existing translations 'C-x 8 / e' and * Changes in Specialized Modes and Packages in Emacs 30.1 +** Info + +--- +*** New user option 'Info-url-alist'. +This user option associates manual-names with URLs. It affects the +'Info-goto-node-web' command. By default, associations for all +Emacs-included manuals are set. Further associations can be added for +arbitrary Info manuals. + +++ ** New command 'lldb'. Run the LLDB debugger, analogous to the 'gud-gdb' command. diff --git a/lisp/info.el b/lisp/info.el index 39ca88c358c..4b3df1b98a1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -213,6 +213,53 @@ Info-additional-directory-list These directories are searched after those in `Info-directory-list'." :type '(repeat directory)) +(defcustom Info-url-alist + '((("auth" "autotype" "bovine" "calc" "ccmode" "cl" "dbus" "dired-x" + "ebrowse" "ede" "ediff" "edt" "efaq" "efaq-w32" "eglot" "eieio" + "eintr" "elisp" "emacs" "emacs-gnutls" "emacs-mime" "epa" "erc" + "ert" "eshell" "eudc" "eww" "flymake" "forms" "gnus" + "htmlfontify" "idlwave" "ido" "info" "mairix-el" "message" + "mh-e" "modus-themes" "newsticker" "nxml-mode" "octave-mode" + "org" "pcl-cvs" "pgg" "rcirc" "reftex" "remember" "sasl" "sc" + "semantic" "ses" "sieve" "smtpmail" "speedbar" "srecode" + "todo-mode" "tramp" "transient" "url" "use-package" "vhdl-mode" + "vip" "viper" "vtable" "widget" "wisent" "woman") . + "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. + +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." + :version "30.1" + :type '(alist + :tag "Mapping from manual-name(s) to URL-specification" + :key-type (choice + (string :tag "A single manual-name") + (repeat :tag "List of manual-names" string)) + :value-type (choice + (string :tag "URL-specification string") + (function + :tag "URL-specification function")))) + (defcustom Info-scroll-prefer-subnodes nil "If non-nil, \\\\[Info-scroll-up] in a menu visits subnodes. @@ -1807,33 +1854,50 @@ Info-goto-node-web (Info-url-for-node (format "(%s)%s" filename node))))) (defun Info-url-for-node (node) - "Return a URL for NODE, a node in the GNU Emacs or Elisp manual. -NODE should be a string on the form \"(manual)Node\". Only emacs -and elisp manuals are supported." - (unless (string-match "\\`(\\(.+\\))\\(.+\\)\\'" node) - (error "Invalid node name %s" node)) - (let ((manual (match-string 1 node)) - (node (match-string 2 node))) - (unless (member manual '("emacs" "elisp")) - (error "Only emacs/elisp manuals are supported")) - ;; Encode a bunch of characters the way that makeinfo does. - (setq node - (mapconcat (lambda (ch) - (if (or (< ch 32) ; ^@^A-^Z^[^\^]^^^- + "Return the URL corresponding to NODE. + +NODE should be a string of the form \"(manual)Node\"." + ;; GNU Texinfo skips whitespaces and newlines between the closing + ;; parenthesis and the node-name, i.e. space, tab, line feed and + ;; carriage return. + (unless (string-match "\\`(\\(.+\\))[ \t\n\r]*\\(.+\\)\\'" node) + (error "Invalid node-name %s" node)) + ;; Use `if-let*' instead of `let*' so we check if an association was + ;; found. + (if-let* ((manual (match-string 1 node)) + (node (match-string 2 node)) + (association (seq-find + (lambda (pair) + (seq-contains-p (ensure-list (car pair)) + manual #'string-equal-ignore-case)) + Info-url-alist)) + (url-spec (cdr association)) + (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 - "")) - (concat "https://www.gnu.org/software/emacs/manual/html_node/" - manual "/" - (and (not (equal node "Top")) - (concat - (url-hexify-string (string-replace " " "-" node)) - ".html"))))) + (char-to-string ch))) + node "")))))) + (cond + ((stringp url-spec) + (format-spec url-spec + `((?m . ,manual) (?n . ,node) (?e . ,encoded-node)))) + ((functionp url-spec) + (funcall url-spec manual node encoded-node)) + (t (error "URL-specification neither string nor function"))) + (error "No URL-specification associated with manual-name `%s'" + manual))) (defvar Info-read-node-completion-table) diff --git a/test/lisp/info-tests.el b/test/lisp/info-tests.el index ebe718167bf..0dfdbf417e8 100644 --- a/test/lisp/info-tests.el +++ b/test/lisp/info-tests.el @@ -29,11 +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.html")) + "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer")) (should (equal (Info-url-for-node "(emacs)Minibuffer File") - "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-File.html")) + "https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-File")) (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.html")) - (should-error (Info-url-for-node "(gnus)Minibuffer File"))) + "https://www.gnu.org/software/emacs/manual/html_node/elisp/Backups-and-Auto_002dSaving")) + (should (equal (Info-url-for-node "(eintr)car & cdr") + "https://www.gnu.org/software/emacs/manual/html_node/eintr/car-_0026-cdr")) + (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")) + (should-error (Info-url-for-node "(nonexistent)Example"))) ;;; info-tests.el ends here -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 05:21:46 2024 Received: (at 67615-done) by debbugs.gnu.org; 27 Jan 2024 10:21:46 +0000 Received: from localhost ([127.0.0.1]:53522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTfon-00088U-Kx for submit@debbugs.gnu.org; Sat, 27 Jan 2024 05:21:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTfol-00088G-Qr for 67615-done@debbugs.gnu.org; Sat, 27 Jan 2024 05:21: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 1rTfoZ-00047E-8Z; Sat, 27 Jan 2024 05:21:31 -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=Qm1IFUrWhNWHGmT0oQij51dZlPUVzfftrDGeh3r4pk8=; b=Yziwc5u3vDQr MsQURJhmfLGjP4aq2T9mjLPGleYfIehovCBv1WoMSE7qxRRdZxbIxoOBrHt2LejEDFQGOjD3GTnJ2 saeBltTDYty/gMH/uRCBblw4/PpAOM8aNzBBzj0It8nLg1ECW+CREtNozaAa3K206c3HsyWPDrLfJ sXxD8KkhDJhVIk4sj1ZQOX2sHar1NEb3HuOYvcqCT2WW8RNpmDDhl5s9U9+LGMAXmKr/Ao8ZHzUnT ghRt1f5vcqf5E63qQxqocvFW2dzd+cI+drWNGAosfKbbnKtNT/cbqqUMAd9lcQrDnWQve7KBm9gKN TrwyulcxBqucudLyDI0uXA==; Date: Sat, 27 Jan 2024 12:21:28 +0200 Message-Id: <86le8b84bb.fsf@gnu.org> From: Eli Zaretskii To: Mekeor Melire In-Reply-To: <87a5oz30om.fsf@posteo.de> (message from Mekeor Melire on Sun, 21 Jan 2024 01:43:04 +0000) Subject: Re: [PATCH v7] Add option Info-url-alist References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> <83fs0byanf.fsf@gnu.org> <87y1e3ei0t.fsf@posteo.de> <878r5pzsxy.fsf@posteo.de> <83bkahdyjy.fsf@gnu.org> <87sf37v5fi.fsf@posteo.de> <83a5p9h87s.fsf@gnu.org> <87edec3jcl.fsf@posteo.de> <835xzov57b.fsf@gnu.org> <87a5oz30om.fsf@posteo.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67615-done Cc: 67615-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: Sun, 21 Jan 2024 01:43:04 +0000 > > 2024-01-20 09:23 eliz@gnu.org: > > > What about the case where the HTML docs are produced with one file per > > node? doesn't Texinfo create in that case directories that are named > > like the manual, but without the .html extension? > > I tested this and found out that Texinfo does not create directories for > each node in that case. > > The reason why after omitting the .html-suffix gnu.org still serves the > html-manual is its web-server configuration. This was confirmed to me > via IRC in the #gnu channel on libera.chat server. > > Attached is a new version of that patch with following changes: > > - Let Info-url-for-node skip whitespace and newlines between closing > parenthesis and node-name. This mimics Texinfo as can be traced here: > > https://git.savannah.gnu.org/cgit/texinfo.git/tree/info/info.h?h=114e10b2a1cb5ee07ae6b9d1228d6d016c9f86e6#n44 > https://git.savannah.gnu.org/cgit/texinfo.git/tree/info/scan.c?h=114e10b2a1cb5ee07ae6b9d1228d6d016c9f86e6#n123 > > It also makes Info-url-for-node work with the string that is put into > kill-ring with the Info-copy-current-node-name command which uses a > whitespace. > > - Do not use a .html suffix, neither in the default value for the new > Info-url-alist, nor in the %e format-thing that can be in user-defined > values of it. Users still can add a ".html" suffix themselves, if the > respective web-server does not support omitting it. > > - More tests, including manuals in all relevant directories and formats > and "special" characters. Thanks, installed on the master branch, and closing the bug. From unknown Fri Sep 05 17:59:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 24 Feb 2024 12:24:05 +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