From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SLCZBF40Y19HFQAA0tVLHw (envelope-from ) for ; Thu, 17 Sep 2020 10:03:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wM9qAF40Y1+UTQAAbx9fmQ (envelope-from ) for ; Thu, 17 Sep 2020 10:03:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9C63594062D for ; Thu, 17 Sep 2020 10:03:09 +0000 (UTC) Received: from localhost ([::1]:44746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIqku-0005o9-EB for larch@yhetil.org; Thu, 17 Sep 2020 06:03:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIqi5-0003US-1q for guix-devel@gnu.org; Thu, 17 Sep 2020 06:00:14 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIqi2-00022D-KC for guix-devel@gnu.org; Thu, 17 Sep 2020 06:00:12 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1600336796; cv=none; d=zohomail.com; s=zohoarc; b=cS639TNVKre/DwPokYpfoail0nhnEnsfxJHwI5nmDbzEtDa50mX3eHZolJqs+I44vYoMxSI+H2t6SdTeB6RUqw269j4z1nw5LticspcNYdKD0EKHYbdW6OqNQMN5X2Nv42eX76Df8opokIPTzEM9GnMgtNj9PrOJ/iwX3BQRVus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600336796; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=euwHHntDWW0RmhnlSCor4KYDU+1C2cXecGhdYauLpig=; b=hKy4keEQaJYQVvEcsuwKRZabWDo7X09ajpVnB3utRMOHgSmzdiC4BBOc3dYuCbQkLOq/B5RaMa30Sj1564xYiTorBvYovahFHov4NiKunwfTrdxCHXvmnllaO+YdS1aNCkZ2/0DTd9C9v/xzeMZMupX5IlIX80wExxa621tT/qw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1600336796; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=euwHHntDWW0RmhnlSCor4KYDU+1C2cXecGhdYauLpig=; b=Z54cQCtw6muO1KF0Letf9pV3533bvifXqfzL9VpbaWb/lY5BAog6FjXWBcrRmbiR 9aYNfeIyiKnmEjnSbMMDB7N5/z5gS4Tk//eZRqlknbTQvNxg0oMf9zVY/AUVmkPsPEu ziJ+g/AAGu/J3uYaaXwykMd0IZJ1BnhSzlSAr3uA= Received: from localhost (p54ad4c4f.dip0.t-ipconnect.de [84.173.76.79]) by mx.zohomail.com with SMTPS id 1600336794361867.6639254668761; Thu, 17 Sep 2020 02:59:54 -0700 (PDT) References: <86sgbhz3fe.fsf@gmail.com> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus To: zimoun Subject: Re: Mummi wishlist: API using Message-ID In-reply-to: <86sgbhz3fe.fsf@gmail.com> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Thu, 17 Sep 2020 12:01:14 +0200 Message-ID: <87ft7gvi1h.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/17 06:00:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elephly.net header.s=zoho header.b=Z54cQCtw; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 1.99 X-TUID: Ne3dKQQ7DrkY zimoun writes: > For example . The number #16 is > really difficult to guess. :-) Yes, it comes from the number of messages we got from Debbugs. > Instead, it is easy to get the Message-ID. (Using emacs-notmuch, only > hit the key =E2=80=99ci=E2=80=99) Therefore, it could be nice to be able = to provide > e.g., the URL: > > > > redirecting to . This is an interesting idea! I don=E2=80=99t know if it=E2=80=99ll work as= a plain URL, because not all characters of a message id might be usable in a URL (you may need to URL-encode it and can=E2=80=99t just paste it in the URL bar of= your browser), but it would certainly work as a search query. The only problem is that we=E2=80=99re not currently indexing the message ids. Per bug we index the bug id, the submitter, the authors, the subject(s), the owner, the severity, the tags, the status, the file name of the original Debbugs =E2=80=9C.log=E2=80=9D file (I forgot why!), and all the m= essage bodies. All of these map to the very same =E2=80=9Cdocument=E2=80=9D (in X= apian parlance), which is a particular =E2=80=9Cissue=E2=80=9D. I think we could also index the message id (and expose it to the search), map that to the =E2=80=9Cissue=E2=80=9D, and then find the corresp= onding anchor in the HTML later. We wouldn=E2=80=99t be able to *directly* map the messa= ge id to the actual message in the thread, because the search does not operate on the concept of messages but only whole bug discussions. But I think this would get us very close to what you propose. > And maybe the > current webpage could provide the Message-ID, easy to copy and then > paste in my email reader. It=E2=80=99s already there but hidden! Every message is rendered in a div.message. Inside of that is div.card > div.card-header > div.details (hidden) > div.message-id. With custom CSS you could unhide div.details, and with a custom JS you could grab the contents of div.message-id on the click of a button. Most browsers make it a little hard to augment the CSS and/or JS of a served page, but with a little hacking I=E2=80=99m sure you can extract wha= t you want. > > Another (Emacs related) example is emacs-debbugs. > C-u M-x debbugs-gnu RET guix RET n y > M-x debbugs-gnu-bugs RET 33899 RET RET > Read messages > > Well, in the relevant message, I run =E2=80=9CM-x debbugs->url=E2=80=9D a= nd get the > ready-to-be-pasted URL: > > > > with the naive Emacs function: > > --8<---------------cut here---------------start------------->8--- > (defun debbugs->url () > (interactive) > (let ((url "https://yhetil.org/guix-bugs/") > mid) > (with-current-buffer gnus-article-buffer > (gnus-summary-toggle-header 1) > (setq mid (message-fetch-field "Message-ID")) > (gnus-summary-toggle-header -1)) > (while (string-match "[<>]" mid) > (setq mid (replace-match "" t t mid))) > (kill-new (concat url mid)) > (message mid))) > --8<---------------cut here---------------end--------------->8--- > > > > Last and off-topic to the Subject :-), the tool =E2=80=99public-inbox=E2= =80=99 exposes > such API and then it seems easier to refer to relevant message than > going by hand on e.g. > to find it. I don=E2=80=99t quite understand how this differs from this: https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=3D%3C86sgbhz3fe.fsf%= 40gmail.com%3E&submit=3DSearch%21&idxname=3Dguix-devel Here I search for the id of your message (the one I=E2=80=99m responding to= ); that=E2=80=99s the (URL-encoded) value of =E2=80=9Cquery=E2=80=9D, =E2=80= =9Cidxname=E2=80=9D is for the mailing list to be searched. It gives you a list of results, not one message directly, but I think it=E2=80=99s pretty close.=20 --=20 Ricardo