GNU bug report logs - #79570
30.2.50; Accept list value for bug-reference-url-format

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; Reported by: Augusto Stoffel <arstoffel@HIDDEN>; Done: Augusto Stoffel <arstoffel@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 30.2.50, send any further explanations to 79570 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel@HIDDEN> Request was from Augusto Stoffel <arstoffel@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 79570) by debbugs.gnu.org; 20 Oct 2025 07:24:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 20 03:24:05 2025
Received: from localhost ([127.0.0.1]:43351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vAkFR-0007dB-9T
	for submit <at> debbugs.gnu.org; Mon, 20 Oct 2025 03:24:05 -0400
Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:58520)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <arstoffel@HIDDEN>)
 id 1vAkFN-0007cY-EM
 for 79570 <at> debbugs.gnu.org; Mon, 20 Oct 2025 03:24:02 -0400
Received: by mail-ed1-x534.google.com with SMTP id
 4fb4d7f45d1cf-63c21467e5bso5906962a12.0
 for <79570 <at> debbugs.gnu.org>; Mon, 20 Oct 2025 00:24:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1760945034; x=1761549834; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=zptzTc+3efhR5FCdH1Sh55DUTrhhBoyiqXNWf4yKoCk=;
 b=hGXdYfkjCfKujp0bjpZUpXKfc2I9cmJCmOEhrN0Dhr+mqbLWZlLki5XaOb0BCOTsOM
 SiIVORyK99jHyQlF7waU2b5UyTdHdH/zc8CZfTM7HZ3U98e7Vk9jsEdzIZ+o9V5OEm/A
 GGQ/db07xQ1+GFFJfIAYi1FdmxgtbUGRJSes4smpNh+MO4a+08pwfuFM1Nl6XMD3Ze/D
 6vm46HctD839N0fIYjOx0K6LEX15GahnyI8JHSI19WSYa3SPkmMG5ld1A2yg896WYg7/
 co5hjjqQgXh2hjU0AEFB4H5U1I7WHIdAd1PTU31kfO19wH94rcfPwKcfdD8vcUjzoaXb
 g4IA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1760945034; x=1761549834;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=zptzTc+3efhR5FCdH1Sh55DUTrhhBoyiqXNWf4yKoCk=;
 b=qgQZ6TTJoyB2vv2MNhnMWVAChXQq2sFJbDq8T9X2HwDHQz8U9qo1mmsXoZMZjM65m8
 xMFh1HMKc5SiOD8ADl8oUJ97DQkU4ElOCvTxEp/77OIiFQ/idNkRz8F6ypB2TKaYGPeE
 krbV6VaQpxfVC54/2umaGjAMh3leumh5K3jFzXy8wxWjG1bGDl8blBlSFwxEHk1Wg7Bv
 U7QMTwjRILDpoEQxroza6JMNMZ3GzJFZNMsiBvGKYPigFfHaK/xOiGxjeoGa3WDr85lJ
 XBryOiUfC6I7SqZUn+Ilnx3IAzZYLpaawLqGx5akn4KBk4kqp6pkbIx9e5zQ1JULia8q
 QyBw==
X-Forwarded-Encrypted: i=1;
 AJvYcCWbJ900J6lWCbWLX073QFsrZd0bO4YtvvuEGvqZyj/FPYjOHeCr0u6rhUy/x0XIKZaT7SGIIQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yw4OjoGKHw4Q8ulvAOlYNeRdTjUO24wmiFF7+pSXkVmshvWUTrn
 I19MCEMuonCHYpIcTCLtvw6dJo6hS+uc5VrMyryYf5BfAHmzCjuNL9vgWQQWJgXh
X-Gm-Gg: ASbGncvQWNPx7oGjykh2FI8o0fOfYAtyijK9su7xqMWnjf6RsbJvez3aywCdK7No4tW
 BVPe1SH2vBdR5/jb3JWhCdu51ZmxhVSWGnH9hsr5hArJXJ72lyEp2L4UCqgAfT1IFEO0wSXZVjo
 EXgxq7wWagZ5DFUbhhMYiXy0AwFTTyTyn1j2GwtSART70ob+op4sxjhuEC95DbgX4osKgMPNMrb
 gU0rTbbBTPOy2AzRV5kZP3SG4BCPzoC5zVqYipSY4Vzkd3pykI4+H0wR3HRSMQaVN1OELTvhOzn
 wZAXVh+5K+vJuw4NhHlXiNO0LbtkYcc5/UPzKjTn6BLQp3czmAim1UZAk7JLP7mXMuUN/xC/15p
 vl0PMhtI2AQjLdCGMVNzY0Vc3QZfGMHpQzyq70d8Ql4bT5pseOJRoMuPMu81iqamhOuAMHAmKoW
 5T
X-Google-Smtp-Source: AGHT+IGPT9VTIdgj/cAOp0sC+mrnPPkNAISMUoYQpeXqJX4VBOGn/gcKoI5Ee/pqQAkeaKXD/Zt86w==
X-Received: by 2002:a05:6402:1ed2:b0:63c:276b:1504 with SMTP id
 4fb4d7f45d1cf-63c276b1683mr10584271a12.19.1760945034318; 
 Mon, 20 Oct 2025 00:23:54 -0700 (PDT)
Received: from ars3 ([89.246.250.22]) by smtp.gmail.com with ESMTPSA id
 4fb4d7f45d1cf-63c48a928cesm6152163a12.7.2025.10.20.00.23.53
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 20 Oct 2025 00:23:53 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
Subject: Re: bug#79570: 30.2.50; Accept list value for bug-reference-url-format
In-Reply-To: <87347xvl8d.fsf@HIDDEN>
References: <87qzvjulg5.fsf@HIDDEN> <864isff409.fsf@HIDDEN>
 <871pnijrnb.fsf@HIDDEN> <87y0ppuaei.fsf@HIDDEN>
 <87347xvl8d.fsf@HIDDEN>
Date: Mon, 20 Oct 2025 09:23:53 +0200
Message-ID: <87a51m2fzq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79570
Cc: Eli Zaretskii <eliz@HIDDEN>, 79570 <at> debbugs.gnu.org,
 Augusto Stoffel <arstoffel@HIDDEN>
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: -1.0 (-)

On Sun,  5 Oct 2025 at 09:52, Tassilo Horn wrote:

> Augusto Stoffel <arstoffel@HIDDEN> writes:

[...]

>> Anyway, I still think this is useful so let me know if you are
>> convinced, otherwise feel free to close the bug.
>
> Please go ahead.  But I would highly welcome if you add some additional
> tests to bug-reference-tests.el in the style of the existing
> test-thing-at-point.

Upon further thought, I think what I suggested, while simple use and to
implement, is a bit of a hack, so I will retract my suggestion :-).

What I think could be done, if "someone" gets to it, is to redefine (in
a backwards compatible way) bug-reference-bug-regexp be an alist mapping
regexps to format strings (or function).

This would be nice because then the configuration would be composable,
i.e., you could add and remove things independently from each other.
This may seem "too much" just to make some bug tracker links, but I
guess "bug-reference-mode" is a bit of a misnomer.  It can be used for
all sorts of hyperlinks, for example pointing to external documentation
texts; I myself use it to refer to some internet RFCs.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79570; Package emacs. Full text available.

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


Received: (at 79570) by debbugs.gnu.org; 5 Oct 2025 07:52:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 05 03:52:48 2025
Received: from localhost ([127.0.0.1]:51156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v5JY0-0006Nn-3L
	for submit <at> debbugs.gnu.org; Sun, 05 Oct 2025 03:52:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36996)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <tsdh@HIDDEN>) id 1v5JXx-0006NY-3X
 for 79570 <at> debbugs.gnu.org; Sun, 05 Oct 2025 03:52:45 -0400
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 <tsdh@HIDDEN>)
 id 1v5JXr-0005Vz-M3; Sun, 05 Oct 2025 03:52:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=ZfXTnv7TT5uRibMspytvv/neolZLDhbLzvEFx4/1mbw=; b=N2YWwcrjrxG5N0mezeIl
 IUTh262Oeu0MzAFOR4Rj4Kp+WjBl9Y2ht4gyLqqs3JatY1vGawc+ZLsOoOa10wpRLi2OwbZ/FczCv
 IrRi4AnH2YCBzXrjUc+iOTdPrmf9jURytKXl5H57LraO7jPcaPVKEO1Z+T5Xf1in+kThpRdW+pChi
 TgHeHy4hAe+TEVSlPTHDZ1NuH4AeQemTY37bKvPfZG5s5MMtR8+Haum6IvQYj70imdJK+ZIuxz8x6
 1sgeJ4553vyTb8kUBSbuLpCkTLSTX8M9F48STgANTZnUKXIDWp6gcu92GcBMy7iIFQ8bpr8PsOlCD
 U3Gwif9dwMYKdA==;
X-ME-Sender: <xms:xiPiaBekwBy9LJfSaxzgAQ9ONyrt1cLNwl-dL7YBTyvYZrTRjIxxMw>
 <xme:xiPiaGp_eDry4WZG_YE2VaYyq-daFTRTP4XqfnvazyzqTqVzAeEQXE55aaKlGashJ
 TbJXg6Ky8PvozuaKjb7fd4Mgb5vmm5rJD8QlL-ZW4GxivPn>
X-ME-Received: <xmr:xiPiaH6E_b2CNSQG84QzcrBp5efm4YfAvpEtL-iq9b0Vhae9WSXUVDfQHtDBZ31PgyB2l4px9g-OfNT55Qi6AylJSn6o6Bw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdelgeduudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
 ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
 hrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhilhho
 ucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepvdeive
 efhedvtdejiefftdeitdfggfejjeehkefggeefgfegieelveejhffhfefgnecuffhomhgr
 ihhnpehgnhhurdhorhhgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe
 dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhp
 vghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnh
 hurdhorhhgsehfrghsthhmrghilhdrfhhmpdhnsggprhgtphhtthhopeefpdhmohguvgep
 shhmthhpohhuthdprhgtphhtthhopeejleehjedtseguvggssghughhsrdhgnhhurdhorh
 hgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtoheprghrshhtohhf
 fhgvlhesghhmrghilhdrtghomh
X-ME-Proxy: <xmx:xiPiaEoh7fq4o-YSsyYqBfmn_f2hlrC31a7OxN5Z29G3M_lsVJ_W0g>
 <xmx:xiPiaBgkeSn-MXNcaDvsb98W9bO6WuFy3XyH3nMpccEDMx-Cvtj_PA>
 <xmx:xiPiaGJvs594ZHQFAHGZcapruYmnZLkuaxibfsHQ9FY7vd6PWt1-zA>
 <xmx:xiPiaJCCo03K3PhArIrJai5UqzNmGIWCpUcJFHQg-KsT2VnbAHOGKA>
 <xmx:xiPiaOi32pUweUXzlzIVBZKvURlxDH86ObxdWViP34SknQczWM6m-PAy>
Feedback-ID: ib2b94485:Fastmail
From: Tassilo Horn <tsdh@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>
Subject: Re: bug#79570: 30.2.50; Accept list value for bug-reference-url-format
In-Reply-To: <87y0ppuaei.fsf@HIDDEN>
References: <87qzvjulg5.fsf@HIDDEN> <864isff409.fsf@HIDDEN>
 <871pnijrnb.fsf@HIDDEN> <87y0ppuaei.fsf@HIDDEN>
User-Agent: mu4e 1.12.14-dev1; emacs 31.0.50
Date: Sun, 05 Oct 2025 09:52:34 +0200
Message-ID: <87347xvl8d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79570
Cc: Eli Zaretskii <eliz@HIDDEN>, 79570 <at> debbugs.gnu.org
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: -3.3 (---)

Augusto Stoffel <arstoffel@HIDDEN> writes:

Hi Augusto,

>>>> ;; Local Variables:
>>>> ;; bug-reference-bug-regexp: "\\(bug#\\([0-9]+\\)\\|github#\\([0-9]+\\)\\)"
>>>> ;; bug-reference-url-format: ("https://debbugs.gnu.org/%s"
>>>> "https://github.com/joaotavora/eglot/issues/%s")
>>>> ;; End:
>>
>> I don't think this is much better than the current version in eglot.el
>>
>> ;; Local Variables:
>> ;; bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)"
>> ;; bug-reference-url-format: eglot--debbugs-or-github-bug-uri
>> ;; End:
>>
>> where a simple function eglot--debbugs-or-github-bug-uri does the
>> dispatching between the two URLs.
>
> The problem here is the "simple function" which has to be shared with
> everyone who wants to look at the code.  I'm normally in favor of
> customization via functions, but for file-local variables this doesn't
> work so well -- for one thing, not everyone is allowed to add their
> bug reference function as an autoloaded function in the Emacs core...

Sorry, I don't understand.  Who forbids a package (no matter if in Emacs
core or not) to do exactly what eglot does, i.e., define an autoloaded
function my-package--bug-uri and declare it safe for use in file-local
variables using:

  (put 'my-package--bug-uri 'bug-reference-url-format t)

>>  And of course, it would add more complexity, not only to the
>> implementation but also to the documentation.
>
> I offered to implement it, so I checked first :-P.  AFAICS it just
> takes 5 or 6 lines of code (plus documentation).

Yeah, what I meant is that the implementation is easier than the
documentation because such a list-valued url-format depends on a special
setting of the bug-regexp.  But probably it's not too hard...

>> And above you said "The purpose is to cover the most common case
>> where a function is needed."  Is a project with more than one bug
>> tracker really that common to justify such an addition?  Or do you
>> have other examples in mind?
>
> Potentially every ELPA package could use this, to point do its own
> bugs and Emacs bugs.

Yes, but which packages aside from eglot really use two separate
trackers?

> Or in general a project closely tied to some other "upstream" project,
> such as an extension package to some programming language.

Ok, that makes sense.  I guess those would reference the prog-lang bugs
usually with the complete URL or foo/prog-lang#23 if mode and prog-lang
are hosted on the same forge.  Your addition would allow them to define
custom bug references like prog-lang#23, dependency-x#17, etc...

>> The only other scenario I know is that frequently own bugs are
>> referenced with something short like #17 but bugs in other projects
>> (and therefore other trackers) on the same forge with
>> user-or-org/their-project#19.  But here your suggestion doesn't work
>> because user-or-org/their-project#19 is probably not a literal part
>> of the url which is more likely something like
>> https://forge/user-or-org/their-project/issues/19, so a function is
>> needed.  (That said, the auto-setup functionality supports all that
>> for all major forges, so bug-regexp and url-format usually don't have
>> to be specified at all.)
>
> Fine, but I suppose this doesn't work across forges.

True.  And one additional downside is that the auto-setup guesses the
right bug-url/url-format from the version-control settings which don't
exist if you look at the installed code below ~/.emacs.d/elpa/ rather
than a checkout.

> Anyway, I still think this is useful so let me know if you are
> convinced, otherwise feel free to close the bug.

Please go ahead.  But I would highly welcome if you add some additional
tests to bug-reference-tests.el in the style of the existing
test-thing-at-point.

Thanks,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79570; Package emacs. Full text available.

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


Received: (at 79570) by debbugs.gnu.org; 5 Oct 2025 06:32:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 05 02:32:03 2025
Received: from localhost ([127.0.0.1]:51054 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v5IHr-0001qS-4X
	for submit <at> debbugs.gnu.org; Sun, 05 Oct 2025 02:32:03 -0400
Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:42168)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <arstoffel@HIDDEN>)
 id 1v5IHn-0001pn-MV
 for 79570 <at> debbugs.gnu.org; Sun, 05 Oct 2025 02:32:01 -0400
Received: by mail-ed1-x535.google.com with SMTP id
 4fb4d7f45d1cf-62fca216e4aso8948621a12.0
 for <79570 <at> debbugs.gnu.org>; Sat, 04 Oct 2025 23:31:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759645913; x=1760250713; darn=debbugs.gnu.org;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=8pO8fcLHyEPdDdUOwU+kn1Ucmw1e5UOFASSRLxgBPD0=;
 b=kvsW1H/Avj58YkQa/bKrRi+pmP+HC46ySf0SM8lvAkDYfkkfGRfvjWUcXE47pno4z1
 91zIdtjfu+Xam1DtgJUtM2KQAHmGvJlGnt53ImGSFlI87mfye6/oUjfgSFu+pF+o0bmi
 BvxuVjS5IFM4iHwMOG6Y59Z+2Wo5anzxmFZiVrDax5wPfoVHE4wh6+Lvs2cfBhAjfAl4
 A080rE19lMwESd9FessMUnV40EYRbDt2bEYtWpWWVyQmvo23xVoVAOXsa3H51GQxQmQ7
 ruUTRXACk6Zshr8k+5wHJDOzCwEgqf/k8qnERTiug53QwU1MofrBnjJR+EKYIXa58Jto
 RisA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759645913; x=1760250713;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=8pO8fcLHyEPdDdUOwU+kn1Ucmw1e5UOFASSRLxgBPD0=;
 b=f6+HyoWYvQvPRmzX5I+S/TtI4lP8O6Z7P2REBvv/f9wPZoQrSim6j3rbvw7drGRc3n
 n+UPUES8qVe86lULdoLvWeNNPsqqqksfaNhiNjRTqT7gHv8k9prrKCQUNSKgkbhA+QTJ
 +gP+ALbFIFNI4QhJGZcOCbhof3/njpz8QRzZ+E5qmcLFdWkkypNBF0vRUnbt48cmkI2z
 nYILh1o4qR068xQV0ZIlKFklzUmh7UQO4rJG1+fCyeL+ooZaFgT170s8UZ1K9QfNTqFI
 ygUYhjiG4Jd9R2YhcrLrwOYlvkPw5UrzEhDn0/eQEed5CjJ0o5QmGfs6XD26uLYL/aRn
 5JOw==
X-Forwarded-Encrypted: i=1;
 AJvYcCVVpf1nhkcUwpJq0Enl/BBxbyOE3IsXL4SxEqlr61gYifbXLdbeFDW2XBwduTAE5YRENOvaKw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yyzo8Hk5wKWTFdp4g9oqwKpxVRhfiG3kQ9o6N/1JLvnxIZLMbya
 7st9/XaYb2sObklRhACLOcWFBh0gGnnTwpCqCq4mSQPPuZ32i1GmdTGMn3C1eY6M
X-Gm-Gg: ASbGncvgsZBOiv2NhevHMHLy2HspNeq1D5cNBe1s/2APhoQU9mmfN/CYLgJ7JjgEsUi
 4PgFsrTKe5mAeoUar220horyC/fW/Xa4AJI5WMDWqMXKCGqFj99oWRLcA6DKBGupIOezbjtkD5c
 2JhbgBUZ6nlG/NJAXul4xDg/wa2goGPs7qNxHwjIBvpqFOae4gz9Ua2J6safZqMvQPKUklZWGF5
 AehV//wc9KPYNPsIgSR+UkouWgqVVpA9CfEysggzWckEBJT1jzU8yDeRLvIbAKR9keWZR49B/lq
 gLDE6Aspj4FXteY8Gj9uBQXjTKd9aBCspR7nBvChpKf0GZG4WusUOwtNbN/sZNIDxrS5puzGoyv
 eBhiB8cnKqAKilrpacTfbfqWAaTI2l6QE9A==
X-Google-Smtp-Source: AGHT+IEQxLR8LUTNMeHf56L3Tr5MLmdPbqkh2hj/Fc/wJJs4iIzkOsUj/Eb1gMWzyP9QTnSW+wNrxw==
X-Received: by 2002:a05:6402:2786:b0:62d:6601:a6cf with SMTP id
 4fb4d7f45d1cf-63904da2ad1mr9118957a12.9.1759645912748; 
 Sat, 04 Oct 2025 23:31:52 -0700 (PDT)
Received: from ars3 ([2a02:8109:8a95:9a00::12a4])
 by smtp.gmail.com with ESMTPSA id
 4fb4d7f45d1cf-63788110219sm7388771a12.37.2025.10.04.23.31.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 04 Oct 2025 23:31:50 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
Subject: Re: bug#79570: 30.2.50; Accept list value for bug-reference-url-format
In-Reply-To: <871pnijrnb.fsf@HIDDEN>
References: <87qzvjulg5.fsf@HIDDEN> <864isff409.fsf@HIDDEN>
 <871pnijrnb.fsf@HIDDEN>
Date: Sun, 05 Oct 2025 08:31:49 +0200
Message-ID: <87y0ppuaei.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79570
Cc: Eli Zaretskii <eliz@HIDDEN>, 79570 <at> debbugs.gnu.org,
 Augusto Stoffel <arstoffel@HIDDEN>
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: -1.0 (-)

Hi Tassilo,

On Sat,  4 Oct 2025 at 23:14, Tassilo Horn wrote:

> Hi Augusto,
>
>>> I would like to suggest extending bug-reference-url-format to accept
>>> a list-of-strings value besides the current options, string or
>>> function.  The purpose is to cover the most common case where a
>>> function is needed.
>>> 
>>> The logic would be as follows:
>>> - match group 1 of bug-reference-bug-regexp determines the extent of the
>>>   hyperlink, as usual.
>>> - then look for the next regexp group that matched, say N, and use entry
>>>   N-2 of bug-reference-url-format to format the destination URL
>>> 
>>> As an example, eglot.el could then be simplified as follows:
>>> 
>>> ;; Local Variables:
>>> ;; bug-reference-bug-regexp: "\\(bug#\\([0-9]+\\)\\|github#\\([0-9]+\\)\\)"
>>> ;; bug-reference-url-format: ("https://debbugs.gnu.org/%s"
>>> "https://github.com/joaotavora/eglot/issues/%s")
>>> ;; End:
>
> I don't think this is much better than the current version in eglot.el
>
> ;; Local Variables:
> ;; bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)"
> ;; bug-reference-url-format: eglot--debbugs-or-github-bug-uri
> ;; End:
>
> where a simple function eglot--debbugs-or-github-bug-uri does the
> dispatching between the two URLs.

The problem here is the "simple function" which has to be shared with
everyone who wants to look at the code.  I'm normally in favor of
customization via functions, but for file-local variables this doesn't
work so well -- for one thing, not everyone is allowed to add their bug
reference function as an autoloaded function in the Emacs core...

>  And of course, it would add more complexity, not only to the
> implementation but also to the documentation.

I offered to implement it, so I checked first :-P.  AFAICS it just takes
5 or 6 lines of code (plus documentation).

> And above you said "The purpose is to cover the most common case where a
> function is needed."  Is a project with more than one bug tracker really
> that common to justify such an addition?  Or do you have other examples
> in mind?

Potentially every ELPA package could use this, to point do its own bugs
and Emacs bugs.  Or in general a project closely tied to some other
"upstream" project, such as an extension package to some programming
language.

> The only other scenario I know is that frequently own bugs are
> referenced with something short like #17 but bugs in other projects (and
> therefore other trackers) on the same forge with
> user-or-org/their-project#19.  But here your suggestion doesn't work
> because user-or-org/their-project#19 is probably not a literal part of
> the url which is more likely something like
> https://forge/user-or-org/their-project/issues/19, so a function is
> needed.  (That said, the auto-setup functionality supports all that for
> all major forges, so bug-regexp and url-format usually don't have to be
> specified at all.)

Fine, but I suppose this doesn't work across forges.  So at some point
a custom function is needed.

Anyway, I still think this is useful so let me know if you are
convinced, otherwise feel free to close the bug.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79570; Package emacs. Full text available.

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


Received: (at 79570) by debbugs.gnu.org; 4 Oct 2025 21:15:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 04 17:15:01 2025
Received: from localhost ([127.0.0.1]:49699 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v59an-0003Em-0a
	for submit <at> debbugs.gnu.org; Sat, 04 Oct 2025 17:15:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42216)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <tsdh@HIDDEN>) id 1v59al-0003EZ-BH
 for 79570 <at> debbugs.gnu.org; Sat, 04 Oct 2025 17:14:59 -0400
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 <tsdh@HIDDEN>)
 id 1v59af-0005Ps-A7; Sat, 04 Oct 2025 17:14:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=TP02CH+3nFe1G5M8RTsjxSlHLwERkouwFduea3NTtaw=; b=jqAJKlVGS+8fXn97dE4i
 T9us5es6qwyskt05YgpwABhYTr9z86X88qGCekbR4UbnFS7D+hpsVHqXpriWcVxTFDIteL8/dOWpv
 RzdUWdh2F7j27bfj75f9TImh+C1NxTbUlZaNfhf+t4Kuo5V2OlOyQuqZ2YyFzP8DwRocjh7NPB3Uh
 K2LHEfApJC+p/Q6G3/wyHakqrS10bYqlU7Tisj9YTfkRGsxKZBMP5YVUMrzw93YoQajGg1sdQwCPy
 oR2PqDYrP602KD02gLSCYsIpfIit9adA/CRHqIVt8FY5O6Y/thdnM3VpU/IaeSAYTMpTAxUF2vy+F
 ZtWYp6dBy/c/IA==;
X-ME-Sender: <xms:S47haOfvIci3yb6HkaeDx8U3Ua8vq813LnSECIdx_xNohb-unqAfAw>
 <xme:S47haPqmwuBlmItzvBdxrJ3ClK8SOgwq6eG9LOpG7EfE4rWaBGEL154sIZOxeuAT-
 9JZrzqK95tFVkmszgu9fxSYaGIsZkv-wAjk3Bcc7uRvDcJcANk>
X-ME-Received: <xmr:S47haM6824Mub-EfFb05GD9msxagsYi34KAQNW2Lqryuhzu_m0CMJ_4jav1MFGM9aL5hRmQJYs44XZYzmG3THamhr9O7Vww>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdelvdekfecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr
 ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
 hrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhilhho
 ucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepvdeive
 efhedvtdejiefftdeitdfggfejjeehkefggeefgfegieelveejhffhfefgnecuffhomhgr
 ihhnpehgnhhurdhorhhgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe
 dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvghsmhhtphgruhhthhhp
 vghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleekqdhtshguhheppehgnh
 hurdhorhhgsehfrghsthhmrghilhdrfhhmpdhnsggprhgtphhtthhopeefpdhmohguvgep
 shhmthhpohhuthdprhgtphhtthhopeejleehjedtseguvggssghughhsrdhgnhhurdhorh
 hgpdhrtghpthhtoheprghrshhtohhffhgvlhesghhmrghilhdrtghomhdprhgtphhtthho
 pegvlhhiiiesghhnuhdrohhrgh
X-ME-Proxy: <xmx:S47haFr74ir2JhJb_b5c2EYRldoNvFgvSnQ8m0-L1Soye4C2jSHlQQ>
 <xmx:S47haOhc0V3wuiyvDhkwI3fct0vUppY1q9apYtOzE6E1GwTIEYbfHA>
 <xmx:S47haPJ_DuwK7mdVk4hMroiBeuYTBX4Cs9EbiXQ71dwY0PstakMl7g>
 <xmx:S47haODvCsZimCBgsa9q24lfekhkxSUgMrGGc43J5-P8RHElUds2pQ>
 <xmx:S47haPgi2ussnT_k1pl8Tro6Tp1R1soZX3TjMmJOAVUviEHv0QizLLXW>
Feedback-ID: ib2b94485:Fastmail
From: Tassilo Horn <tsdh@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#79570: 30.2.50; Accept list value for bug-reference-url-format
In-Reply-To: <864isff409.fsf@HIDDEN>
References: <87qzvjulg5.fsf@HIDDEN> <864isff409.fsf@HIDDEN>
User-Agent: mu4e 1.12.14-dev1; emacs 31.0.50
Date: Sat, 04 Oct 2025 23:14:48 +0200
Message-ID: <871pnijrnb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79570
Cc: 79570 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel@HIDDEN>
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: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

Hi Augusto,

>> I would like to suggest extending bug-reference-url-format to accept
>> a list-of-strings value besides the current options, string or
>> function.  The purpose is to cover the most common case where a
>> function is needed.
>> 
>> The logic would be as follows:
>> - match group 1 of bug-reference-bug-regexp determines the extent of the
>>   hyperlink, as usual.
>> - then look for the next regexp group that matched, say N, and use entry
>>   N-2 of bug-reference-url-format to format the destination URL
>> 
>> As an example, eglot.el could then be simplified as follows:
>> 
>> ;; Local Variables:
>> ;; bug-reference-bug-regexp: "\\(bug#\\([0-9]+\\)\\|github#\\([0-9]+\\)\\)"
>> ;; bug-reference-url-format: ("https://debbugs.gnu.org/%s"
>> "https://github.com/joaotavora/eglot/issues/%s")
>> ;; End:

I don't think this is much better than the current version in eglot.el

--8<---------------cut here---------------start------------->8---
;; Local Variables:
;; bug-reference-bug-regexp: "\\(\\(github\\|bug\\)#\\([0-9]+\\)\\)"
;; bug-reference-url-format: eglot--debbugs-or-github-bug-uri
;; End:
--8<---------------cut here---------------end--------------->8---

where a simple function eglot--debbugs-or-github-bug-uri does the
dispatching between the two URLs.  And of course, it would add more
complexity, not only to the implementation but also to the
documentation.

And above you said "The purpose is to cover the most common case where a
function is needed."  Is a project with more than one bug tracker really
that common to justify such an addition?  Or do you have other examples
in mind?

The only other scenario I know is that frequently own bugs are
referenced with something short like #17 but bugs in other projects (and
therefore other trackers) on the same forge with
user-or-org/their-project#19.  But here your suggestion doesn't work
because user-or-org/their-project#19 is probably not a literal part of
the url which is more likely something like
https://forge/user-or-org/their-project/issues/19, so a function is
needed.  (That said, the auto-setup functionality supports all that for
all major forges, so bug-regexp and url-format usually don't have to be
specified at all.)

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79570; Package emacs. Full text available.

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


Received: (at 79570) by debbugs.gnu.org; 4 Oct 2025 08:46:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 04 04:46:57 2025
Received: from localhost ([127.0.0.1]:47834 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v4xuq-0007Ot-TA
	for submit <at> debbugs.gnu.org; Sat, 04 Oct 2025 04:46:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47938)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1v4xup-0007Oe-41
 for 79570 <at> debbugs.gnu.org; Sat, 04 Oct 2025 04:46:55 -0400
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 <eliz@HIDDEN>)
 id 1v4xui-0000t1-K9; Sat, 04 Oct 2025 04:46:49 -0400
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=w9eE7ReU8QEVH1oGcmOdQlz74qRi20HjA3IKpoPhKpM=; b=Ob17VtDxdcIy
 MMJnToJrIV4Q5CLRPh1q7Eab/3OMORGdf584bGfwX73vF3tb6HB2qsYrl140SCLWJcsNskOfAHqr4
 tjxzixpuUiV25A/itJmY50GYKrXTqsamWNiwrHnpGlyM2SAQCITKgMteSG2hXGpAqqtlQSdC9b1sC
 3dw4qwNWh2/gAU7bb0Tlx3mlTdRWH33v+Y3yi6TVW7yQEImXEZ1dIdA5Mod1XtMpHJJtcs9swEBrE
 0Wmn6cJpNfZb7VpGzmO6Z+K4GUkPoIFZQJZ9aHYYrj13gi1K2j8prcWyFdN76ucB8IffIVpvdbHhw
 YucmQJteWfcsDd6hUUx/gg==;
Date: Sat, 04 Oct 2025 11:46:46 +0300
Message-Id: <864isff409.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Augusto Stoffel <arstoffel@HIDDEN>, Tassilo Horn <tsdh@HIDDEN>
In-Reply-To: <87qzvjulg5.fsf@HIDDEN> (message from Augusto Stoffel on Sat, 
 04 Oct 2025 10:20:58 +0200)
Subject: Re: bug#79570: 30.2.50; Accept list value for bug-reference-url-format
References: <87qzvjulg5.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79570
Cc: 79570 <at> debbugs.gnu.org
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: -3.3 (---)

> From: Augusto Stoffel <arstoffel@HIDDEN>
> Date: Sat, 04 Oct 2025 10:20:58 +0200
> 
> I would like to suggest extending bug-reference-url-format to accept a
> list-of-strings value besides the current options, string or function.
> The purpose is to cover the most common case where a function is needed.
> 
> The logic would be as follows:
> - match group 1 of bug-reference-bug-regexp determines the extent of the
>   hyperlink, as usual.
> - then look for the next regexp group that matched, say N, and use entry
>   N-2 of bug-reference-url-format to format the destination URL
> 
> As an example, eglot.el could then be simplified as follows:
> 
> ;; Local Variables:
> ;; bug-reference-bug-regexp: "\\(bug#\\([0-9]+\\)\\|github#\\([0-9]+\\)\\)"
> ;; bug-reference-url-format: ("https://debbugs.gnu.org/%s"  "https://github.com/joaotavora/eglot/issues/%s")
> ;; End:
> 
> Let me know if you agree and I will prepare a patch.

Thanks.

Tassilo, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79570; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 4 Oct 2025 08:21:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 04 04:21:18 2025
Received: from localhost ([127.0.0.1]:47753 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1v4xVx-0005RC-5v
	for submit <at> debbugs.gnu.org; Sat, 04 Oct 2025 04:21:18 -0400
Received: from lists.gnu.org ([2001:470:142::17]:42146)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <arstoffel@HIDDEN>)
 id 1v4xVu-0005Qf-A1
 for submit <at> debbugs.gnu.org; Sat, 04 Oct 2025 04:21:10 -0400
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 <arstoffel@HIDDEN>)
 id 1v4xVo-00085Z-Hz
 for bug-gnu-emacs@HIDDEN; Sat, 04 Oct 2025 04:21:04 -0400
Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arstoffel@HIDDEN>)
 id 1v4xVm-00060l-MA
 for bug-gnu-emacs@HIDDEN; Sat, 04 Oct 2025 04:21:04 -0400
Received: by mail-ej1-x633.google.com with SMTP id
 a640c23a62f3a-b457d93c155so573727766b.1
 for <bug-gnu-emacs@HIDDEN>; Sat, 04 Oct 2025 01:21:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1759566060; x=1760170860; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=LpwF9mzfck7q3OrerrTWQqa0dLaq4LnF7ERMaPbLq6M=;
 b=UL/P4GiTW6wfbG7XHf8QA/zO2tmrxSdVENBgrVV5R94y3Ma/mXN/Tpo/oiG6xIT1sp
 6MOAC7sGeruj7LlN9X9yM7puk7w8pXJHpNPncAv6G7z6qGRpTClIrMa0zAnxDzkZCWC8
 tZYtfyLvcl7ajn7hVPJUIbubBWDjKjZy7Ju9wNIUDrsQ7oLXMWDEiYvrFJ1/fipHqley
 ji7PP2oo5ofGh36fzozsW0tm/Zx4p0AFFSr7m9/DZmAyLGIxmIheF4mAOc+Zo2kYXZxX
 RgAq1baspN5GFH3YV6EOxRAvHDiqFhvN73tcG6iQEJawH1+P33LoHng9ppjNeg8ntW4+
 yIsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1759566060; x=1760170860;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=LpwF9mzfck7q3OrerrTWQqa0dLaq4LnF7ERMaPbLq6M=;
 b=OSMOFEnPLrh/dWB6K5Abma4bOr0Yt9gHT3rlJOM6S4c9+zvktH9w8O8QtjZz+FJnXk
 1bludvXD0OjjizWEjj7pQ2B2XE3MEesM/DDUJzR1X+4Z9lNISi2RLZiMpCGizu3NRD1K
 SWxnIxHOh32OAIu0r3s9wL85EPQKs5DnrrobdjXYFNI0GuePcCAcTYl8eYObT2/q7+/U
 TtlKCGpo+zFyO0F39T2EN9c3k4vp5l2kApaZk/lNjjcrycnu57MQ9cOPZrQp0/ma6f0J
 EPOmI4u0xYmL9Z5y1p68BeG87bIIllSq9PV+A7KMvX3QzuDCNGUUBCf3YI0qcY98OiaU
 4gxQ==
X-Gm-Message-State: AOJu0Yx3s4DxKPEtWkhfOKLzCzPIDWFuqQk87NbeeSHjHOMZHwJd1Nph
 Uyoyv3Fxk+fh1v9E7ElMOXm9xIOUjZLf/0Mdloc5vsC54suYYCKl07WmiAhKng==
X-Gm-Gg: ASbGncucUbckr9nQkPMDRlw2ov4WcoHxumscIr68A2ABmpKpblES7wCWJjnNkfzpXFl
 U4K55j4hQuX5pd5Cb3vSZgRY5gZUbT/wk+216iW0yOMQRao/I4BN+KJbfkNcEaWdaxpEB/B94NZ
 I6QZdcKP06OIyNSLCt1QpJ5L451AqX7wdcyorHkBQIiwSneFKmz+ETvs0zqH0qiN1/nBPpbzL3O
 Qd6DK9qJ5W0N9xMJqSZ6WHbi0ZzKnWaxNXNYiK+Wa8EHPST4Vep9qV0Ql9pR6W8GtexdOL9eZW/
 wv18RGijtWhybnUyCtFNAPsjw6XuHHLClDB8ebH/K3Irr5J5YivlTzR1HmcgjRtxQGijsu2sB97
 EoHC4vLQNqAvR5Wb2SuDDrvwc39BrPWDfQQ==
X-Google-Smtp-Source: AGHT+IGGAQhOh1TSS7ix974UsypmGlWHTZ0mlLxz6oaDqtWJI7evcvYZxsQJErVZ7x2yV1osZutp2w==
X-Received: by 2002:a17:907:1c0a:b0:b3d:b3fe:27ed with SMTP id
 a640c23a62f3a-b49c3f71d55mr834906366b.57.1759566060118; 
 Sat, 04 Oct 2025 01:21:00 -0700 (PDT)
Received: from ars3 ([2a02:8109:8a95:9a00::12a4])
 by smtp.gmail.com with ESMTPSA id
 a640c23a62f3a-b48652ad839sm629876566b.1.2025.10.04.01.20.58
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 04 Oct 2025 01:20:59 -0700 (PDT)
From: Augusto Stoffel <arstoffel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.2.50; Accept list value for bug-reference-url-format
X-Debbugs-Cc: 
Date: Sat, 04 Oct 2025 10:20:58 +0200
Message-ID: <87qzvjulg5.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::633;
 envelope-from=arstoffel@HIDDEN; helo=mail-ej1-x633.google.com
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, 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 (/)

I would like to suggest extending bug-reference-url-format to accept a
list-of-strings value besides the current options, string or function.
The purpose is to cover the most common case where a function is needed.

The logic would be as follows:
- match group 1 of bug-reference-bug-regexp determines the extent of the
  hyperlink, as usual.
- then look for the next regexp group that matched, say N, and use entry
  N-2 of bug-reference-url-format to format the destination URL

As an example, eglot.el could then be simplified as follows:

;; Local Variables:
;; bug-reference-bug-regexp: "\\(bug#\\([0-9]+\\)\\|github#\\([0-9]+\\)\\)"
;; bug-reference-url-format: ("https://debbugs.gnu.org/%s"  "https://github.com/joaotavora/eglot/issues/%s")
;; End:

Let me know if you agree and I will prepare a patch.




Acknowledgement sent to Augusto Stoffel <arstoffel@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#79570; 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: Fri, 24 Oct 2025 15:00:02 UTC

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