GNU bug report logs - #75788
[PATCH] Bug-Reference: Allow referencing sourcehut patch series.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Nicolas Graves <ngraves@HIDDEN>; Keywords: patch; dated Thu, 23 Jan 2025 18:08:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Jan 2025 18:07:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 23 13:07:22 2025
Received: from localhost ([127.0.0.1]:42272 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tb1bt-0004PF-Gt
	for submit <at> debbugs.gnu.org; Thu, 23 Jan 2025 13:07:21 -0500
Received: from lists.gnu.org ([2001:470:142::17]:42718)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ngraves@HIDDEN>)
 id 1tb1bl-0004Or-TW
 for submit <at> debbugs.gnu.org; Thu, 23 Jan 2025 13:07: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 <ngraves@HIDDEN>)
 id 1tb1be-0002Xz-Du
 for bug-gnu-emacs@HIDDEN; Thu, 23 Jan 2025 13:07:06 -0500
Received: from 8.mo583.mail-out.ovh.net ([178.32.116.78])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ngraves@HIDDEN>)
 id 1tb1bb-0006mT-3y
 for bug-gnu-emacs@HIDDEN; Thu, 23 Jan 2025 13:07:06 -0500
Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.176.118])
 by mo583.mail-out.ovh.net (Postfix) with ESMTP id 4Yf8634Jmfz1TP6
 for <bug-gnu-emacs@HIDDEN>; Thu, 23 Jan 2025 18:06:51 +0000 (UTC)
Received: from ghost-submission-5b5ff79f4f-gfwbm (unknown [10.110.188.144])
 by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 2C6E21FD5B
 for <bug-gnu-emacs@HIDDEN>; Thu, 23 Jan 2025 18:06:51 +0000 (UTC)
Received: from ngraves.fr ([37.59.142.99])
 by ghost-submission-5b5ff79f4f-gfwbm with ESMTPSA
 id sgCkOTqFkmc4fgUAzz2Vzg (envelope-from <ngraves@HIDDEN>)
 for <bug-gnu-emacs@HIDDEN>; Thu, 23 Jan 2025 18:06:51 +0000
Authentication-Results: garm.ovh; auth=pass
 (GARM-99G003e71c39fc-91bc-4712-9409-fa405bd0b53c,
 500C159F6CC1B5F58847AECAE687DF28B59DCF9A) smtp.auth=ngraves@HIDDEN
X-OVh-ClientIp: 90.92.117.144
From: Nicolas Graves <ngraves@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Bug-Reference: Allow referencing sourcehut patch series.
Date: Thu, 23 Jan 2025 19:06:50 +0100
Message-ID: <87cygdqu9x.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Ovh-Tracer-Id: 9600267034752574116
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgvdefgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvufffkfggtgesmhdtreertddttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeefjeffgfetfeeitdetteelueehfedtfeetiedugeegheejtdegvdehfeeuiedttdenucfkphepuddvjedrtddrtddruddpledtrdelvddruddujedrudeggedpfeejrdehledrudegvddrleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeefmgdpmhhouggvpehsmhhtphhouhht
DKIM-Signature: a=rsa-sha256; bh=QGqcMW2QPorXegU5badYK2qn5GhPPbGWIdk6Klfz2uE=; 
 c=relaxed/relaxed; d=ngraves.fr; h=From;
 s=ovhmo4487190-selector1; t=1737655611; v=1;
 b=HFFCY0fmin1DymuNzjyeApR8g31/Nvlotf6yhvZf3caPaK5aOrMweIM+YQ5oVlkAlvookb6T
 fCXNKLSslf/H228ENVcpeocqM5NBkvlD41us4m5338wVkyU4OW5gblPw77shTJtSJ8eMFXBLvM+
 P7e+CBDoyEC4xUfJNANSu2bLHa42R/0BdQflrjybfDmZEr3XJ35kVmOqbgAxM/2sFlKdMBdnqK/
 vKo4Rd9yPJhCOEYmHftu8nl8YmK3oCF9YbCDf9frfKmoVuC4iA6hNmZQnPzfpKWZZRVWtlUzKBE
 bjyynUSiiYyQgdJT2vG0J5CTOUg0mZc8kvqkGcER4PQtQ==
Received-SPF: pass client-ip=178.32.116.78; envelope-from=ngraves@HIDDEN;
 helo=8.mo583.mail-out.ovh.net
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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain

Tags: patch


This patch adds a way to bug-reference sourcehut patch series, which are
sometimes used rather than "todo" issues.

In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
cairo version 1.18.0)
System Description: Guix System

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/m0xdsa8cfq6mq1kxgxmpmpg71la4f0b9-bash-minimal-5.1.16/bin/bash
 SHELL=/gnu/store/m0xdsa8cfq6mq1kxgxmpmpg71la4f0b9-bash-minimal-5.1.16/bin/bash
 --prefix=/gnu/store/fs9gpdns2r052dcdj8sb1a8f4cv1qb17-emacs-pgtk-29.4
 --enable-fast-install --with-pgtk --with-cairo --with-modules
 --with-native-compilation=aot --disable-build-details'


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Bug-Reference-Allow-referencing-sourcehut-patch-seri.patch

From 8538fda01fce00561e9d22bd1a04074796aa2739 Mon Sep 17 00:00:00 2001
From: Nicolas Graves <ngraves@HIDDEN>
Date: Thu, 23 Jan 2025 18:58:20 +0100
Subject: [PATCH] Bug-Reference: Allow referencing sourcehut patch series.

* lisp/progmodes/bug-reference.el
(bug-reference--build-forge-setup-entry):  Add ! syntax to reference
sourcehut patch series.
---
 lisp/progmodes/bug-reference.el | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 2b2858739cb..0622cb52ff6 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -317,9 +317,10 @@ via the internet it might also be http.")
                    (or (match-string-no-properties 2) ns-project)
                    (match-string-no-properties 3)))))))
 
-;; Sourcehut: #19 is an issue.  Other project's issues can be
-;; referenced as ~user/project#19.
-;;
+;; Sourcehut: #19 is an issue. !19 is a patch series
+;; Other project's issues can be referenced as ~user/project#19.
+;; Other project's patch series can be referenced as ~user/project!19.
+
 ;; Caveat: The code assumes that a project on git.sr.ht or hg.sr.ht
 ;; has a tracker of the same name on todo.sh.ht.  That's a very common
 ;; setup but all sr.ht services are loosely coupled, so you can have a
@@ -329,14 +330,21 @@ via the internet it might also be http.")
   (host-domain (_forge-type (eql 'sourcehut)) protocol)
   `(,(concat "[/@]\\(?:git\\|hg\\)." (regexp-quote host-domain)
              "[/:]\\(~[.A-Za-z0-9_/-]+\\)")
-    "\\(\\(~[.A-Za-z0-9_/-]+\\)?\\(?:#\\)\\([0-9]+\\)\\)\\>"
+    "\\(\\(~[.A-Za-z0-9_/-]+\\)?\\([#!]\\)\\([0-9]+\\)\\)\\>"
     ,(lambda (groups)
        (let ((ns-project (nth 1 groups)))
          (lambda ()
-           (format "%s://todo.%s/%s/%s"
-                   protocol host-domain
+           (format "%s://%s.%s/%s%s/%s"
+                   protocol
+                   (if (string= (match-string-no-properties 3) "#")
+                       "todo"
+                     "lists")
+                   host-domain
                    (or (match-string-no-properties 2) ns-project)
-                   (match-string-no-properties 3)))))))
+                   (if (string= (match-string-no-properties 3) "#")
+                       ""
+                     "/patches")
+                   (match-string-no-properties 4)))))))
 
 (defun bug-reference--setup-from-vc-alist (&optional rebuild)
   "Compute the `bug-reference--setup-from-vc-alist' value.
-- 
2.47.1


--=-=-=
Content-Type: text/plain


-- 
Best regards,
Nicolas Graves

--=-=-=--




Acknowledgement sent to Nicolas Graves <ngraves@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#75788; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 25 Jan 2025 00:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.