From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "H. Dieter Wilhelm" Newsgroups: gmane.emacs.help Subject: Re: Gnus: How to reference an article from a gmane mailing list Date: Fri, 10 Dec 2021 19:30:24 +0100 Message-ID: <86sfv0xqgv.fsf@duenenhof-wilhelm.de> References: <86wnkj6v41.fsf@duenenhof-wilhelm.de> <87r1arceup.fsf@penguin> <86sfv76rqq.fsf@duenenhof-wilhelm.de> <87lf0yq3s5.fsf@gmail.com> <86mtlc6m3x.fsf@duenenhof-wilhelm.de> <874k7j7e8u.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28975"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 10 19:31:39 2021 Return-path: Envelope-to: geh-help-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 1mvkgF-0007Ok-CZ for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 19:31:39 +0100 Original-Received: from localhost ([::1]:55250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvkgE-0008PO-AK for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 13:31:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvkf9-0008OL-4p for help-gnu-emacs@gnu.org; Fri, 10 Dec 2021 13:30:31 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.135]:35185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvkf7-0007BW-Bj for help-gnu-emacs@gnu.org; Fri, 10 Dec 2021 13:30:30 -0500 Original-Received: from ping ([92.116.159.129]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MNss4-1nBC3O3RSy-00OGwi; Fri, 10 Dec 2021 19:30:26 +0100 In-Reply-To: <874k7j7e8u.fsf@gmail.com> (=?utf-8?Q?=22K=C3=A9vin?= Le Gouguec"'s message of "Wed, 08 Dec 2021 08:22:09 +0100") X-Provags-ID: V03:K1:swJ/5u+h3VehN7rORh6ye8aGu34s/tq1Te1wDoDBdRmz7LHCu1n 6+WhWQ+8elLityPMyiHSPqeqH1ABs5Y4W2R4dfgQs1Pz4v8rzR4SX/NGan/ZwL0Rt1QnrhM OZcy8IqECoqpXEb2s+D1g8sPHaAqTJ3qIV8WUhWiZ3P0yatSgP+XlNrGplI6yNLPPzAsEUt CmGqFWNVM7BzjGbmEN1Gg== X-UI-Out-Filterresults: notjunk:1;V03:K0:kkGzQy8O5HI=:H9WiScNZJC1tT+g7iKOE+h 6YpF2dtvjd7PQza5khPRtbX81b2pRhFDitsQJuwK+TCUzqPWzKOQ1yU4VOq+XKwdw4bdaYyGu 7koSHkIg/RkY3T2eeKgXt14RM3KgmT3gh49Ps0TGY48xYbZN62/rDIMuFdLcTul7PE/XX4DSe ZDSKV60hkJpyTgjadSUnO9fdtN9b2+mDwJRq0YlrVzdgW3UiMovP84NCkWtb1hVo21O3DsMpj SdZ3SxxOcIiTZfI+zj7hp3gMIpy3tQpjhbkfl9AgblhI0dwUw2DPjhBa60Wb08fldBc7cKnJu McSHkbfiRcAratM4017jJ31eXxLxXmrMcmvXbwZFm1vhcOiss3C0fophOxm1uy1Gzou1r4DH3 qMwusULhuiZ2h7o/2I8eKdU5voMAohczHupt/UE4UJvL6rykF6allJhpOTxy7k8mSd+UABQdR Y63NpKUw6UQDBrHJyyDAIajwRsT17lBIvQuJH5juCJHm5o8a/AWSpnyIK13YMzd+/VYtZplz2 GqEP+ZzsU5ZuQlBb4cyNYX5M5guW1BjKlAa+czUFKSTAKagzYifrDIntGSRDNrtj/Ph9+utYO 7sufD15nCBeuFUR0MjiY/FzDc2+nGU2Ffu5lsf1BwGdOpShFLZvF0NFwuP1tfFHBC9icJhNH9 YtZi1yDtHB8l47qeP2uMer2R8KHGCCeDZKNApgVp0Y7E8ZrVsyuGp2X1RCR1yOulMFCNAzfgb K760z5xHd7jIwY53 Received-SPF: none client-ip=212.227.126.135; envelope-from=dieter@duenenhof-wilhelm.de; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134941 Archived-At: K=C3=A9vin Le Gouguec writes: > Then type in this search string: > > +message-id:<6214117000e144ffaeceded74c239fb8@frb.gov> I didn't realise that one is able to do a dedicated search for these IDs! Thanks a lot. >> Oh wait! What about Gmail or other mail readers of Emacs, do they have >> this functionality as well? > > Can't tell you =F0=9F=98=95 I'd be very (though pleasantly) surprised if = GMail > could work with Message IDs; as for other mail readers, I just don't > know. > =E2=80=A6 to provide convenient links for everyone, regardless of their m= ail > client. As I said though, for some reason they don't work anymore; I'd > need to debug them =F0=9F=98=92 > #+begin_src elisp > ;; Utilities for mailing lists. > (defun my/kill-message-id () > (interactive) > (kill-new (mail-header-message-id (gnus-summary-article-header)))) > > (defun my/describe-message (id url) > (kill-new (format "%s\n%s\n" > (if (string-prefix-p "<" id) > id > (format "<%s>" id)) > url))) > > (defun my/describe-message-id (list id) > "Format references from the Message-ID of a gnu.org list." > (interactive > (list > (read-string "List: ") ; TODO: default to current list. > (let ((default-id > (mail-header-message-id (gnus-summary-article-header)))) > (read-string (format-prompt "Message-ID" default-id) > nil nil default-id)))) > (with-current-buffer > (url-retrieve-synchronously > (concat > ;; For some reason, literal "+" chars cause the search to fail. > ;; Escape them. > "https://lists.gnu.org/archive/cgi-bin/namazu.cgi" > "?query=3D%2Bmessage-id:" > (replace-regexp-in-string "\\+" "%2B" id) > "&submit=3DSearch!" > "&idxname=3D" list)) > (search-forward-regexp > (rx " (group "/archive/html/" (literal list) "/" > (+ (any "0-9-")) "/msg" (+ (any "0-9")) ".html") > "\">")) > (let ((url (concat "https://lists.gnu.org" (match-string 1)))) > (my/describe-message id url)))) > > (defun my/describe-message-url (url) > "Format references from an article archived on MHonArc." > (interactive > (list > (let ((default (or (thing-at-point 'url) > (and (derived-mode-p 'eww-mode) > (shr-url-at-point nil))))) > (read-string (format-prompt "URL" default) nil nil default)))) > (with-current-buffer (url-retrieve-synchronously url) > (search-forward-regexp "^$") > (let ((id (xml-substitute-numeric-entities (match-string 1)))) > (my/describe-message id url)))) > #+end_src Interesting what people are able to do! Thanks for the idea Dieter --=20 Best wishes H. Dieter Wilhelm Zwingenberg, Germany