From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67615: [PATCH v3] * lisp/info.el (Info-url-alist): New option mapping manuals to URLs. Date: Sat, 09 Dec 2023 11:42:44 +0200 Message-ID: <83fs0byanf.fsf@gnu.org> References: <87plzmsuge.fsf@posteo.de> <87leaast8s.fsf@posteo.de> <87sf4ii8oi.fsf@posteo.de> <87o7f6hsfj.fsf@posteo.de> <87y1e5tumu.fsf@posteo.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67615@debbugs.gnu.org To: Mekeor Melire Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 09 10:44:11 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rBtsX-0005gf-RN for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Dec 2023 10:44:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBtsK-0007FT-7Q; Sat, 09 Dec 2023 04:43:56 -0500 Original-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 1rBtsD-0007FA-A1 for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:43:50 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBtsD-0004Et-1Z for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:43:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBtsQ-0004cR-Eu for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 04:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2023 09:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67615 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67615-submit@debbugs.gnu.org id=B67615.170211500117701 (code B ref 67615); Sat, 09 Dec 2023 09:44:02 +0000 Original-Received: (at 67615) by debbugs.gnu.org; 9 Dec 2023 09:43:21 +0000 Original-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 Original-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 Original-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==; In-Reply-To: <87y1e5tumu.fsf@posteo.de> (message from Mekeor Melire on Fri, 08 Dec 2023 00:15:15 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275838 Archived-At: > 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.