From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.help Subject: Re: Gnus: How to reference an article from a gmane mailing list Date: Wed, 08 Dec 2021 08:22:09 +0100 Message-ID: <874k7j7e8u.fsf@gmail.com> References: <86wnkj6v41.fsf@duenenhof-wilhelm.de> <87r1arceup.fsf@penguin> <86sfv76rqq.fsf@duenenhof-wilhelm.de> <87lf0yq3s5.fsf@gmail.com> <86mtlc6m3x.fsf@duenenhof-wilhelm.de> 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="19244"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: "H. Dieter Wilhelm" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 08 08:23:32 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 1murIa-0004m6-CF for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 08 Dec 2021 08:23:32 +0100 Original-Received: from localhost ([::1]:51904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1murIY-0007Wx-0f for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 08 Dec 2021 02:23:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1murHL-0007Wp-9k for help-gnu-emacs@gnu.org; Wed, 08 Dec 2021 02:22:15 -0500 Original-Received: from [2a00:1450:4864:20::432] (port=38620 helo=mail-wr1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1murHJ-0001md-BP for help-gnu-emacs@gnu.org; Wed, 08 Dec 2021 02:22:14 -0500 Original-Received: by mail-wr1-x432.google.com with SMTP id q3so2397348wru.5 for ; Tue, 07 Dec 2021 23:22:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=BXANdlpONvuo0LiwgBxck867Cdg2l8ycikY34096XW0=; b=Xeta4v0lvnJGZgxaAzouysU+iP5UMuQMuGEpDbSkGIsCuVhbN/XdoqMFafh00ozcXB 5DjH3FSOEU5wFGHJb5OI/Pij3nhgEXfgKZ4i9BNRC7VXESXdzlWMiIEnLsn8/nvUg59n wMD5buUrgwxIjlkwAiA5jZqYWBmiv5+FVN/uL6HXktuYNO4DmkXx3G4RybcCib7l87vv UwfFHpU8WrRUqtBD+4drdoAXBiJsWrrOY1N6hrkVIfZ6wazilhjwdE69iX2zN+lwMk4O Yu5lWzTNlzOO1z7bDaxIVPc7AgK70knQVdu6KaK9DQ99l4QDiCzCLz08hvU+U/fyaRVJ pVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=BXANdlpONvuo0LiwgBxck867Cdg2l8ycikY34096XW0=; b=xN9VeTh95xQoMqaFQL+uEqVNZEqKXZp8JdvyGhR9I/3cbvFWKLw+lffFWXBT8f7VTm rWvF5P2prXpoEN1S/WRDc7Gidju1QqUajy27uzMJtCfCctVQYcuhvaoEtvCGQZKiEtk6 HJAFeJwuIf8zmTfJhaHrKw6Vp4TmhYaAKcj0/z1IwzlUIy4eN738KMwyB6jQ0O/hEC+s zNKj4s5LraRefvi/8lIQWmwbWkvQ3OXBF5ispCRvVOvVJWjVtbxW0Uzpc12fK7u52nv9 DS3LWV0VsKXx+MT3CmVTTSlBz3MLFKxX5wihVxZACeOvOhy4EiyHclBbQmXCGAMk9gOW 6dYQ== X-Gm-Message-State: AOAM531BB28pgQcyC7h+BVez0dALJFVpHbOVCf6BU+xCBWqmd0hICTVk 48vV9I5GUulXwhlayeciQQs/4nUAIFg= X-Google-Smtp-Source: ABdhPJzkaa4ZcQl3tk76HsZhyvv1roPmEO0cmNvPtgHCPA73h+1HEsyN+Z2TyQsLaM75F85brepBog== X-Received: by 2002:a5d:64eb:: with SMTP id g11mr57564874wri.438.1638948130936; Tue, 07 Dec 2021 23:22:10 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id f8sm5548419wmf.2.2021.12.07.23.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 23:22:10 -0800 (PST) In-Reply-To: <86mtlc6m3x.fsf@duenenhof-wilhelm.de> (H. Dieter Wilhelm's message of "Wed, 08 Dec 2021 00:17:38 +0100") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::432 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:134886 Archived-At: "H. Dieter Wilhelm" writes: > Thanks, it seems to work (though the cursor is skipping to the end of > the message ;-)). Right; I should probably wrap this in a save-excursion form? >> https://lists.gnu.org/archive/html/help-gnu-emacs/2021-12/msg00103.html > > Thank you for the pointer to the archive! Is the GNU organisation > itself maintaining such archives? AFAIK, yes. Note that some GNU projects host additional mirrors of their discussions on other archiving systems. Notably, the Org Mode project uses public-inbox: https://list.orgmode.org/ FWIW I find public-inbox quite convenient for Message-ID users, since the IDs are included in the URLs. >> You'll see a comment in the HTML source with this same message ID: >> >>> > > I see, but how did you find this article? I tried to search (for parts) > of the message ID and this seems not to work. If I want to use html > links for such archives I need to search, for example, for the time of > the post or the author to get to a particular message in the web > archive, right? See my reply to Emanuel <877dcihgag.fsf@gmail.com>; it used to be that you could query the archive for a message ID, e.g. go here: https://lists.gnu.org/archive/html/help-gnu-emacs/ Then type in this search string: +message-id:<6214117000e144ffaeceded74c239fb8@frb.gov> That shold yield a single result (from a message I picked at random in Gnus's summray buffer). For some reason though, the search engine does not seem to work for more recent messages. Maybe indexing is broken? Someone would need to ping the list admins. > 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 GM= ail could work with Message IDs; as for other mail readers, I just don't know. For this reason I wrote some (very dumb and hackish, and just plain not working ATM, don't know why) helpers, which take in either a message ID (resp. an archive URL), fetch the corresponding URL (resp. message ID), and format them like so: > > https:// =E2=80=A6 to provide convenient links for everyone, regardless of their mail 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 "")) (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