From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Aug 2025 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 79276@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.175568140328631 (code B ref -1); Wed, 20 Aug 2025 09:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Aug 2025 09:16:43 +0000 Received: from localhost ([127.0.0.1]:56077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uoevy-0007Rj-Is for submit@debbugs.gnu.org; Wed, 20 Aug 2025 05:16:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:52590) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uoevv-0007RQ-18 for submit@debbugs.gnu.org; Wed, 20 Aug 2025 05:16:40 -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 ) id 1uoevp-0002Hy-1J for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2025 05:16:33 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoevn-0008Q9-C1 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2025 05:16:32 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-55ce5097493so6099789e87.0 for ; Wed, 20 Aug 2025 02:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755681389; x=1756286189; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=459Qgr8LKObGQ88Ab/SHnHrHq/ckAYXRK9OKbUL5fNE=; b=BI2QsLunwvcsjE2ewR0FNatcAJJTSRIPgfEq24oyxbAtCcBHAf94HNlir5xO7WOaIe JRTeKMjw/SswA2prNq0XozOT1nurSsEn+WcDWOBiPMzz6KYZRHoTWuIPAHscnn2NiYQ/ DN4Y3La2jR9VhT+LIF0sSvFqqrKr9Q6h11A9EPE0Nzq5ushpTMc6YAeKd4dZy5NtEM6/ d9AQaQyPlyPTZ6ZBGtrCd1tzDJ0hiGyHNbq+Unn05ntcNPU8YLcJEWJAGsEYPJ0D/oEi QuVOD5nawooPNMK80mQGrO71Foe2gEspOtkiPCCvhA4frvE3fV8uU0Kw6ty0go3Oxoes KbKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755681389; x=1756286189; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=459Qgr8LKObGQ88Ab/SHnHrHq/ckAYXRK9OKbUL5fNE=; b=jJVr1jr3z/zSTbcQj9mOm8wSHvbEOMdq+gL/9QgUlRjSNwo51716iq3ZM+hIru4oaD exTkaeHSJlfhT2LSAquD+N0kxnleo65S0yfsA4xL0OJ2IwAg3Qvqs89wzg3ofrc5+OIm edYE2PqZIEtF8sb1egKCO3UFiYgG0waDY2/AmNScehrJlrehTdPnNMUkOKLhatxOu0vS 8QYXZ4ZAUQdqXAgU++VYHVjueitgfoO7plaFYddtnJE1/VSk4ZFXTniOoXl4QqUpaciy dWJ4OYx41Ya0sz5OodtSYFOEOMWdHj2+8aNPvtldpgkgRQnCMqIbcIbFyWIipRpO2n6V baaA== X-Gm-Message-State: AOJu0YzWbBDWg8VW3BGY+al80euqwmDyVKh7ABzJrgyeM5g//dXmW9fC /2/XPkcZvpf/fHNWf5zuuxEWBvSAlc4BSUo1cO+QPLbZA9RQD1j1c9KDfD9MmGh6 X-Gm-Gg: ASbGncv7qbrG4BaU+cWOXLhcI3XE7Mzquvk0AJIqmRQGxY0dbqe/SraFUTPfn8tZM2R n17Uw1e9H2ZwINr+GX3CBeEY647/J4BQHxL6DK+ZSf5LjLlghXBYg2ZNqXSUqUlMX1eQ/ICSn3Z lwha+GdM5p2vHW3q/RqLDQ72vzjfmf5hSlgZd2GJvNP52ztFWOpTRMUJComlWUHZwWfW6qiHUDb 2ayipbnhxb7gD7RKb0c+/rbW38123X1bM74bUaLo+PnqZcTo01Yr7yU8psAE3htZnDvVSZXlvGe /m2vNyrP3TQdfJSq37ZimXZgZUWNP5RkD19SW/sNVxC08E0bPDM8xX3f29jFY5I57vcpZMQC5Fd VOL/xj4My2iLW7gziaMozuh5JILp65rRDW0CEJT5Fgzui7em4Lbo= X-Google-Smtp-Source: AGHT+IEZPFPGYJAO5md93vcm+nOt8lFya7sjYm2tbku9rqCdlnysG/+kSPVZ80AC+NehrQqKcuOB+Q== X-Received: by 2002:a05:6512:131c:b0:55c:edb3:22a8 with SMTP id 2adb3069b0e04-55e06b3ad08mr551122e87.18.1755681388675; Wed, 20 Aug 2025 02:16:28 -0700 (PDT) Received: from vivobook (85-253-172-112.ip.elisa.ee. [85.253.172.112]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-55cef3ffb19sm2505357e87.134.2025.08.20.02.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Aug 2025 02:16:27 -0700 (PDT) From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Date: Wed, 20 Aug 2025 12:16:26 +0300 Message-ID: <87ms7umjyt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=andremegafone@gmail.com; helo=mail-lf1-x133.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch Hi, I investigated why bug-reference-mode's automatic setup wasn't doing what I expected for some git repositories when the mode is enabled on Magit buffers. It turned out that, unsurprisingly, the inference mechanism requires one of the remotes to the called "upstream" or "origin" (since this condition didn't hold for the aforementioned repositories, the conclusion follows). Please find a trivial patch attached that makes this condition clearer. It would make sense for Tassilo Horn or Basil L. Contovounesios to take a look at the patch since they have touched on this functionality recently. Thank you. --=20 Andr=C3=A9 A. Gomes "You cannot even find the ruins..." --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Pass-remote-name-explicitly-in-bug-reference-try-set.patch >From aff9e615689ec4b277deedfb4c6de8a60ef2f82e Mon Sep 17 00:00:00 2001 From: "Andre A. Gomes" Date: Wed, 20 Aug 2025 11:48:40 +0300 Subject: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc. * lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist): The call to vc-call-backend resolves to vc-git-repository-url, which takes REMOTE-NAME as an optional argument. Its default value is "origin" so let's pass it explicitly for clarity. --- lisp/progmodes/bug-reference.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 5c03c949049..02acac154ee 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc (ignore-errors (vc-call-backend backend 'repository-url file-or-dir remote))) - '("upstream" nil)))) + '("upstream" "origin")))) (seq-some (lambda (config) (apply #'bug-reference-maybe-setup-from-vc url config)) (append bug-reference-setup-from-vc-alist -- 2.48.1 --=-=-=-- From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Aug 2025 10:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Cc: "Basil L. Contovounesios" , 79276@debbugs.gnu.org, Tassilo Horn Received: via spool by 79276-submit@debbugs.gnu.org id=B79276.175568719114962 (code B ref 79276); Wed, 20 Aug 2025 10:54:02 +0000 Received: (at 79276) by debbugs.gnu.org; 20 Aug 2025 10:53:11 +0000 Received: from localhost ([127.0.0.1]:56225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uogRK-0003tF-I1 for submit@debbugs.gnu.org; Wed, 20 Aug 2025 06:53:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]:36289) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uogRE-0003sa-Bz for 79276@debbugs.gnu.org; Wed, 20 Aug 2025 06:53:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 14254240028 for <79276@debbugs.gnu.org>; Wed, 20 Aug 2025 12:52:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017; t=1755687178; bh=CdeY+g+jAPP5xqU2ig0ByqIKodGUk3FBUSjPUM177GA=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=fUkDwF+Sg3SbHhJXStlK9tNrMC9tYwxatRlT5+xDC32VoAm83pJUFOow3Iv5V/r+d V4S0dioDxaixX4/lj1eUzLxbwfYGjRbCEXkLJyaKfmKLpj0QiJq1Ra955zkSRx0eZ4 LV5yl5nl5Jk8C7VtUJRJ7nD8ntY/RkxRx7Q9Hf36L6p6BPgVaIsefx6HD7qF5z4ors jCFAdv6nl4JYV+AZc+f2XzA6n/orj0MHA4AkVogAuWaEa76UhHnuVzOBzj0eqxldcF fAhinp1IHQOV0Ev4H0yojrT4/OpYCVqCuKdPbKY94oowMijp6I9nUZJYWxRIAxJKar /IuT91llzpddg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4c6NZx1K5bz6tsb; Wed, 20 Aug 2025 12:52:57 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87ms7umjyt.fsf@gmail.com> References: <87ms7umjyt.fsf@gmail.com> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Wed, 20 Aug 2025 10:52:57 +0000 Message-ID: <875xeinu2g.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Andr=C3=A9 A. Gomes writes: > Tags: patch > > Hi, > > I investigated why bug-reference-mode's automatic setup wasn't doing > what I expected for some git repositories when the mode is enabled on > Magit buffers. It turned out that, unsurprisingly, the inference > mechanism requires one of the remotes to the called "upstream" or > "origin" (since this condition didn't hold for the aforementioned > repositories, the conclusion follows). > > Please find a trivial patch attached that makes this condition clearer. > > It would make sense for Tassilo Horn or Basil L. Contovounesios to take > a look at the patch since they have touched on this functionality > recently. I have CC'ed them to bring their attention to the bug. You can so do too in the future by adding a "X-Debuggs-CC" header when composing a bug report :) > Thank you. > > > --=20 > Andr=C3=A9 A. Gomes > "You cannot even find the ruins..." > > From aff9e615689ec4b277deedfb4c6de8a60ef2f82e Mon Sep 17 00:00:00 2001 > From: "Andre A. Gomes" > Date: Wed, 20 Aug 2025 11:48:40 +0300 > Subject: [PATCH] Pass remote name explicitly in > bug-reference-try-setup-from-vc. > > * lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist): > The call to vc-call-backend resolves to vc-git-repository-url, which > takes REMOTE-NAME as an optional argument. Its default value is > "origin" so let's pass it explicitly for clarity. > --- > lisp/progmodes/bug-reference.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-referen= ce.el > index 5c03c949049..02acac154ee 100644 > --- a/lisp/progmodes/bug-reference.el > +++ b/lisp/progmodes/bug-reference.el > @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc > (ignore-errors > (vc-call-backend backend 'repository-url > file-or-dir remote))) > - '("upstream" nil)))) > + '("upstream" "origin")))) > (seq-some (lambda (config) > (apply #'bug-reference-maybe-setup-from-vc url config)) > (append bug-reference-setup-from-vc-alist From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Aug 2025 11:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Andr=C3=A9?= A. Gomes , Tassilo Horn , Basil L. Contovounesios Cc: 79276@debbugs.gnu.org Received: via spool by 79276-submit@debbugs.gnu.org id=B79276.175568871130517 (code B ref 79276); Wed, 20 Aug 2025 11:19:02 +0000 Received: (at 79276) by debbugs.gnu.org; 20 Aug 2025 11:18:31 +0000 Received: from localhost ([127.0.0.1]:56268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uogpr-0007w9-C0 for submit@debbugs.gnu.org; Wed, 20 Aug 2025 07:18:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39722) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uogpp-0007vo-Jz for 79276@debbugs.gnu.org; Wed, 20 Aug 2025 07:18:30 -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 ) id 1uogpj-0001MN-Pj; Wed, 20 Aug 2025 07:18:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=5ClEBTtEYRngISPqh5EaeP/8balO0FM96tiSZZWj6cc=; b=HKMj2fdUAXxJZUS5fEqN Y7DWmtXBQ3jxX5PmWBRBya9qkQgKoQvFuJj2BrBAKhHWDZ93dkHVntuqF/olbwX5ZVLLRCEWMs2d5 NeO5jrHXnUJai3GOCnChDh9Q2Y6Z+IcZVX8zmZ3K2ptgPpc/uwK5FuTC30M90bXlthBTPZHDqToel wkVBdIpmek8GP7TkpyMYulKnkZABxED1fiErcQ+uc3CNYboNuW+RryRA7Rquu3sa1//y/CqA34Vlm 3IHdWahUy8Wp1vFl/AF/T17MlruJO5g8eJ5A09NlQI+PxUX5p4Nt8/wBT4ARE4FSq0VErzqUnCeOQ siiCHm7yDKeUVw==; Date: Wed, 20 Aug 2025 14:18:18 +0300 Message-Id: <86ms7ufdhh.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ms7umjyt.fsf@gmail.com> (message from =?UTF-8?Q?Andr=C3=A9?= A. Gomes on Wed, 20 Aug 2025 12:16:26 +0300) References: <87ms7umjyt.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: André A. Gomes > Date: Wed, 20 Aug 2025 12:16:26 +0300 > > Tags: patch > > Hi, > > I investigated why bug-reference-mode's automatic setup wasn't doing > what I expected for some git repositories when the mode is enabled on > Magit buffers. It turned out that, unsurprisingly, the inference > mechanism requires one of the remotes to the called "upstream" or > "origin" (since this condition didn't hold for the aforementioned > repositories, the conclusion follows). > > Please find a trivial patch attached that makes this condition clearer. > > It would make sense for Tassilo Horn or Basil L. Contovounesios to take > a look at the patch since they have touched on this functionality > recently. Adding Tassilo and Basil to the discussion. > >From aff9e615689ec4b277deedfb4c6de8a60ef2f82e Mon Sep 17 00:00:00 2001 > From: "Andre A. Gomes" > Date: Wed, 20 Aug 2025 11:48:40 +0300 > > * lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist): > The call to vc-call-backend resolves to vc-git-repository-url, which > takes REMOTE-NAME as an optional argument. Its default value is > "origin" so let's pass it explicitly for clarity. > --- > lisp/progmodes/bug-reference.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el > index 5c03c949049..02acac154ee 100644 > --- a/lisp/progmodes/bug-reference.el > +++ b/lisp/progmodes/bug-reference.el > @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc > (ignore-errors > (vc-call-backend backend 'repository-url > file-or-dir remote))) > - '("upstream" nil)))) > + '("upstream" "origin")))) > (seq-some (lambda (config) > (apply #'bug-reference-maybe-setup-from-vc url config)) > (append bug-reference-setup-from-vc-alist > -- > 2.48.1 > From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Aug 2025 12:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: "=?UTF-8?Q?Andr=C3=A9?= A. Gomes" , Philip Kaludercic , "Basil L. Contovounesios" , 79276@debbugs.gnu.org Received: via spool by 79276-submit@debbugs.gnu.org id=B79276.175569249120962 (code B ref 79276); Wed, 20 Aug 2025 12:22:01 +0000 Received: (at 79276) by debbugs.gnu.org; 20 Aug 2025 12:21:31 +0000 Received: from localhost ([127.0.0.1]:56385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uohoo-0005S2-Gm for submit@debbugs.gnu.org; Wed, 20 Aug 2025 08:21:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54794) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uohok-0005Rj-Ru for 79276@debbugs.gnu.org; Wed, 20 Aug 2025 08:21:28 -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 ) id 1uohoe-0001mC-Vz; Wed, 20 Aug 2025 08:21:21 -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=YmAHlJhFQO/JeK3pGYKSxuUfDVv4BA3mdOwlUrAH90o=; b=VNdQvAP40z7zXsz33p5E z3JBSqbEUs4MsbItcw9dxUy0xAGRHXnGiNBO+JQLhYbX4uqsBZ3QcSzu5euicUJOn/UVnPjKY9P1W WgwaRAe6JBTuOwyvtFns81UzJ5DER/W+0Fwn5/EGRn5HOT/N4D+o/DUHYIZUuVG8V0fuVqmLNcPjg uEwSYLMgIyaeBFE1/ZG+0VYw4L7OBmNM5ayZJFXCMQ0F9euiCw7Jc/GiEwJVTk3dEZz4836R0/WZR bfsDCjZ15pIk969X7Z9yrZFqLsQiraEzRWNsyWhn/j+wmAz2cg6VVF61k5IogTJkg6U74m/q+eUpw zkzVsqXYHu/bbg==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduheekfeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve ffudelkeegffdtteeffeehveeigfejvedugeekhedvuedujeefudfgueelfffhnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmhdpnhgspghrtghpth htohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhhihhlihhpkhesphho shhtvghordhnvghtpdhrtghpthhtohepjeelvdejieesuggvsggsuhhgshdrghhnuhdroh hrghdprhgtphhtthhopegsrghsihhlsegtohhnthhovhhouhdrnhgvthdprhgtphhtthho pegrnhgurhgvmhgvghgrfhhonhgvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlih iisehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail From: Tassilo Horn In-Reply-To: <86ms7ufdhh.fsf@gnu.org> References: <87ms7umjyt.fsf@gmail.com> <86ms7ufdhh.fsf@gnu.org> User-Agent: mu4e 1.12.12; emacs 31.0.50 Date: Wed, 20 Aug 2025 14:20:48 +0200 Message-ID: <87y0rechgf.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: Hi Andr=C3=A9, >> I investigated why bug-reference-mode's automatic setup wasn't doing >> what I expected for some git repositories when the mode is enabled on >> Magit buffers. It turned out that, unsurprisingly, the inference >> mechanism requires one of the remotes to the called "upstream" or >> "origin" (since this condition didn't hold for the aforementioned >> repositories, the conclusion follows). >>=20 >> Please find a trivial patch attached that makes this condition >> clearer. >>=20 >> It would make sense for Tassilo Horn or Basil L. Contovounesios to >> take a look at the patch since they have touched on this >> functionality recently. > > Adding Tassilo and Basil to the discussion. I don't think that's appropriate because bug-reference calls the generic `vc-call-backend' function but "origin" is a Git-specific name. Other version control systems might name it differently. For example, in mercurial the default remote is called "default", see vc-hg.el, so you'd change semantics here. But I get the point that "origin" is good name for "the remote which is probably the central one that also hosts the bug-tracker". Why not make the patch > diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-referen= ce.el > index 5c03c949049..02acac154ee 100644 > --- a/lisp/progmodes/bug-reference.el > +++ b/lisp/progmodes/bug-reference.el > @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc > (ignore-errors > (vc-call-backend backend 'repository-url > file-or-dir remote))) > - '("upstream" nil)))) > + '("upstream" "origin" nil)))) > (seq-some (lambda (config) > (apply #'bug-reference-maybe-setup-from-vc url config)) > (append bug-reference-setup-from-vc-alist so that we ask for likely remote names first and then the default remote name as defined by the VCS? That would make things work fine also for hg where the "default" remote is my own clone and the upstream is either called "upstream" or "origin". The downside is that in the Git case, we basically ask for "origin" twice, once explicitly, once as default value for the optional argument. But a "git config ..." call is not expensive so why bother. Bye, Tassilo From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Aug 2025 07:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tassilo Horn Cc: Philip Kaludercic , Eli Zaretskii , "Basil L. Contovounesios" , 79276@debbugs.gnu.org Received: via spool by 79276-submit@debbugs.gnu.org id=B79276.175575998610135 (code B ref 79276); Thu, 21 Aug 2025 07:07:02 +0000 Received: (at 79276) by debbugs.gnu.org; 21 Aug 2025 07:06:26 +0000 Received: from localhost ([127.0.0.1]:58747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uozNR-0002dP-DU for submit@debbugs.gnu.org; Thu, 21 Aug 2025 03:06:25 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:51508) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uozNH-0002cw-CM for 79276@debbugs.gnu.org; Thu, 21 Aug 2025 03:06:18 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-333f92cb94eso5666621fa.3 for <79276@debbugs.gnu.org>; Thu, 21 Aug 2025 00:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755759968; x=1756364768; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AD6j+978MlSfijiagh57jKrOp4AwRV2/jydKnFtNl0Y=; b=hkgZuUsCfVs4IvbLfFNZVGNHA2aTPZQKpNY22u7FKBHOSgJDQ/S3z1BWI935O3DDWR 4XQnKnqK3pNeoX94UF148dkS5csp66s6hS+JLORdxvAAfpd51qlWUSyp9IhZN+0XvSnw wPRs1Bm9OTNKhctBk4FQsO5Tdw1R7bIApK7Mo9LNC4ZTn/juH7BZcOZe7vJ6C3ZnYvH2 5EwOyxalqwVp2E4rWtQGOeUJa0RcIZ5GOAwQkSWrnkPasN8O8NRpU7zwAzy2G+UGYUji bgNFFH3Tcthp+bsjxVyCiQvPZmYyZNxFFidNcY0v4owBi+nCfqbiJp2u+IQfCax2XSbu Wx0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755759968; x=1756364768; h=content-transfer-encoding:mime-version:user-agent: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=AD6j+978MlSfijiagh57jKrOp4AwRV2/jydKnFtNl0Y=; b=Cjqfc+yeucfXg4h/6ihZLhGzYrSvel3IuD4VOw6CONR8ZezO3JHdALpAb074Sqarxk spqgwqCzSC/f4Crmp0TaGQpOqmk4nwv1dzc65axTiP/+3nlVrMODU+ZPgESMaBafTjyI vDPnMQ5FhETl+FJRX/roLxvmFZ/BJta6fqIF0tDLJ8AhWAt9fX8WxrZnYyl4HaWSl16F +WdrudY30hePEmFeC/UPkU0dHuXRQbpk7YD/xkYllItWagpLk2TmF2wSTNRi5naFcEat 5LUf//pYEKyLAuqdtGaaJLAwHFqMtwcASm8tnIRxUQycPVA2wYZ6tXO6RPUMsJXZuqg/ L0UQ== X-Forwarded-Encrypted: i=1; AJvYcCUMxxS7KeI+Kkq4A/KN2SyqiXXUzOHbpYk0PR9Psk/chmHeiJlZR2RxMJsml/US6EY562Ao7A==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyAfYXpInYuFTi/Zkv4M2GxkrSIEocqc2JL1HTiq9mbUZP7c/89 VcvKn8d9vr2SwMu89Xp23sCXX18u+FwB/jNL2L6elTZBNvRkPhj6sZccq5rDVEgLiqU= X-Gm-Gg: ASbGncuiC6/2rVAbYt/CWZ/qb5SpVhTqO/+Gf0qWsoyk4l0MAXUDJzWlmNzIpTbeXr3 bFxrFXf7w7YVzOHS8aAEv46EB/Yc0bWnhs2BpY7pjvjxSKkSF/zysidJbdKFEXOi4BF+xZEw8Dg Sr33S/UCbb81RWXlLbc+01GmbMMwpo5kkdowSOUPvYDINeVvrvi389peQeZn6EEA4PqJkhYvA4M tttgXOnj7M/Og7fvl2PImjmNdJn6wZVnR56+hjo5vsrTDKpfkKwC6ryTxaz7ztQokZECY1tSLgf XJ+jKYQRTvzEXWMUef5u5VBUsJt4l4GVz+jsYQHj1L3MdZLWrGvcUGQEjhlxiZ+gF6flQP7LrxN RaxdseFsATJ2A8L8Yzzq2lCvxZrbOm9/MGjrk/IPcMKllTC6i6/k= X-Google-Smtp-Source: AGHT+IE634cmdZije+yD/AoB/rxPojk8YjOc9nhpnLb/Rbqc4M3GJ51OxVc0YGHgrpzM8r4siZr5Uw== X-Received: by 2002:a2e:b8c8:0:b0:334:97:10ef with SMTP id 38308e7fff4ca-33549e3f145mr4152001fa.9.1755759967476; Thu, 21 Aug 2025 00:06:07 -0700 (PDT) Received: from vivobook (85-253-172-112.ip.elisa.ee. [85.253.172.112]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-55cef3517f7sm2989001e87.31.2025.08.21.00.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Aug 2025 00:06:06 -0700 (PDT) From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes In-Reply-To: <87y0rechgf.fsf@gnu.org> (Tassilo Horn's message of "Wed, 20 Aug 2025 14:20:48 +0200") References: <87ms7umjyt.fsf@gmail.com> <86ms7ufdhh.fsf@gnu.org> <87y0rechgf.fsf@gnu.org> Date: Thu, 21 Aug 2025 10:06:04 +0300 Message-ID: <87frdlm9wj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Tassilo Horn writes: > I don't think that's appropriate because bug-reference calls the generic > `vc-call-backend' function but "origin" is a Git-specific name. Other > version control systems might name it differently. For example, in > mercurial the default remote is called "default", see vc-hg.el, so you'd > change semantics here. Good observation, I didn't take that into account. > But I get the point that "origin" is good name for "the remote which is > probably the central one that also hosts the bug-tracker". Why not make > the patch > >> diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-refere= nce.el >> index 5c03c949049..02acac154ee 100644 >> --- a/lisp/progmodes/bug-reference.el >> +++ b/lisp/progmodes/bug-reference.el >> @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc >> (ignore-errors >> (vc-call-backend backend 'repository-u= rl >> file-or-dir remote))) >> - '("upstream" nil)))) >> + '("upstream" "origin" nil)))) >> (seq-some (lambda (config) >> (apply #'bug-reference-maybe-setup-from-vc url config)) >> (append bug-reference-setup-from-vc-alist > > so that we ask for likely remote names first and then the default remote > name as defined by the VCS? That sounds reasonable to me. Perhaps a comment above that line explaining the meaning of nil would be sensible. I'll just wait for some feedback from Basil as well and refactor the patch. > The downside is that in the Git case, we basically ask for "origin" > twice, once explicitly, once as default value for the optional argument. > But a "git config ..." call is not expensive so why bother. seq-some stops once a predicate returns non-nil, so I don't think that would be an issue. Regardless, the call is inexpensive indeed. Thanks. --=20 Andr=C3=A9 A. Gomes "You cannot even find the ruins..." From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Aug 2025 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Cc: Philip Kaludercic , Eli Zaretskii , "Basil L. Contovounesios" , 79276@debbugs.gnu.org Received: via spool by 79276-submit@debbugs.gnu.org id=B79276.175580235123013 (code B ref 79276); Thu, 21 Aug 2025 18:53:02 +0000 Received: (at 79276) by debbugs.gnu.org; 21 Aug 2025 18:52:31 +0000 Received: from localhost ([127.0.0.1]:32984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upAOk-0005z7-Je for submit@debbugs.gnu.org; Thu, 21 Aug 2025 14:52:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46588) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upAOh-0005yt-KS for 79276@debbugs.gnu.org; Thu, 21 Aug 2025 14:52:28 -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 ) id 1upAOb-0003Gq-Vc; Thu, 21 Aug 2025 14:52:21 -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=8bMwCU/m9TOL1dT8u7O788vk1hADqg2StXvJVjQO6Wg=; b=DT1h7dAnJ9AMCKLVVwDx vUftm4WlfTYJCao/ajsaJMwQFFps/N0U3vQaBH0B0u2Zigam9XmLyfhD1jy0KBhdsGUEAeYUa8ZCd wvpls1Rmdxn4T+ySCiNymNFxMwkAGFvVTJZT5LrlzS5xHF+IqBOo/BpieIeD5tc4UoG+7a1faySP3 vlxbXaVhu6FATJYWIPoBAOmK8Xg0DhRduKqjpcperKRcEbkwzO20ffmHS7AYUMD2XuIu4fZoMyMVW PD/vYfOP+4dyQp9SiUlfWQtFN67jR3zUxLhMUqSpyK8ScwRMr/vm+6o0VCs7jPbtxBJNOY7SlUAtC oG7RNBpc0ux6ig==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduiedvtddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve ffudelkeegffdtteeffeehveeigfejvedugeekhedvuedujeefudfgueelfffhnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmhdpnhgspghrtghpth htohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhhihhlihhpkhesphho shhtvghordhnvghtpdhrtghpthhtohepjeelvdejieesuggvsggsuhhgshdrghhnuhdroh hrghdprhgtphhtthhopegsrghsihhlsegtohhnthhovhhouhdrnhgvthdprhgtphhtthho pegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopegrnhgurhgvmhgvghgrfhhonhgvse hgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail From: Tassilo Horn In-Reply-To: <87frdlm9wj.fsf@gmail.com> References: <87ms7umjyt.fsf@gmail.com> <86ms7ufdhh.fsf@gnu.org> <87y0rechgf.fsf@gnu.org> <87frdlm9wj.fsf@gmail.com> User-Agent: mu4e 1.12.12; emacs 31.0.50 Date: Thu, 21 Aug 2025 20:51:25 +0200 Message-ID: <87h5y0fqz6.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Andr=C3=A9 A. Gomes writes: Hi Andr=C3=A9, >> I don't think that's appropriate because bug-reference calls the >> generic `vc-call-backend' function but "origin" is a Git-specific >> name. Other version control systems might name it differently. For >> example, in mercurial the default remote is called "default", see >> vc-hg.el, so you'd change semantics here. > > Good observation, I didn't take that into account. I have my bright moments. ;-) >> But I get the point that "origin" is good name for "the remote which is >> probably the central one that also hosts the bug-tracker". Why not make >> the patch >> >>> diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-refer= ence.el >>> index 5c03c949049..02acac154ee 100644 >>> --- a/lisp/progmodes/bug-reference.el >>> +++ b/lisp/progmodes/bug-reference.el >>> @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc >>> (ignore-errors >>> (vc-call-backend backend 'repository-= url >>> file-or-dir remote))) >>> - '("upstream" nil)))) >>> + '("upstream" "origin" nil)))) >>> (seq-some (lambda (config) >>> (apply #'bug-reference-maybe-setup-from-vc url config)) >>> (append bug-reference-setup-from-vc-alist >> >> so that we ask for likely remote names first and then the default remote >> name as defined by the VCS? > > That sounds reasonable to me. Perhaps a comment above that line > explaining the meaning of nil would be sensible. Yes, a comment would be utmost welcome. > I'll just wait for some feedback from Basil as well and refactor the > patch. I don't think you need to wait. He basically just changed two or-ed vc-call-backend calls to the current seq-some version, so more a technical refactoring. >> The downside is that in the Git case, we basically ask for "origin" >> twice, once explicitly, once as default value for the optional >> argument. But a "git config ..." call is not expensive so why >> bother. > > seq-some stops once a predicate returns non-nil, so I don't think that > would be an issue. Ah, right. So just twice the cost in the case where there's neither upstream nor origin. > Regardless, the call is inexpensive indeed. Right. Thanks, Tassilo From unknown Fri Sep 12 15:16:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Resent-From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Aug 2025 12:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79276 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Tassilo Horn Cc: Philip Kaludercic , Eli Zaretskii , "Basil L. Contovounesios" , 79276@debbugs.gnu.org Received: via spool by 79276-submit@debbugs.gnu.org id=B79276.17561247363933 (code B ref 79276); Mon, 25 Aug 2025 12:26:02 +0000 Received: (at 79276) by debbugs.gnu.org; 25 Aug 2025 12:25:36 +0000 Received: from localhost ([127.0.0.1]:48882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uqWGU-00011E-R5 for submit@debbugs.gnu.org; Mon, 25 Aug 2025 08:25:36 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:51253) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uqWGN-00010P-Dy for 79276@debbugs.gnu.org; Mon, 25 Aug 2025 08:25:28 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-55f49f96f42so328778e87.2 for <79276@debbugs.gnu.org>; Mon, 25 Aug 2025 05:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756124720; x=1756729520; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=JUzT2TsE7HsfJBPoVJfgLPppmzXbqYe+LfMQsiTxA+s=; b=K2vLqDaI+wSbu6QVbw8xMv8pxLhQxs6rQewH/NJU8NXwYCVFKMA4UjqP2USiIUOjD9 H7F5mNsxXkU2AqbMEbpRup4BRlqZRlvvrELGR2CuK8oIdDiZYZybOmnCa9OS4UCClQqo ctezukmlidyxni4b29Dzv3Bu6HKv3cLl6J+I/BuIL8PXuVOfNwf9P0JTiuHUJBKdxK/L /+Xx4+e7FCYa05pkxvh/q7GiA/ytrRMwJ82SVUMjWGqmTzPLeisdx5p3nodCTgM6F5xH 90WE91p9HaMnHVU3qKvmlq8PRq1lCwofV6daZ0m6PB7F4px7yVua1vuwMuLYwOqTp4SI O6Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756124720; x=1756729520; h=mime-version:user-agent: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=JUzT2TsE7HsfJBPoVJfgLPppmzXbqYe+LfMQsiTxA+s=; b=k9Zir9dG5QETJod+wjUCpEQhzdJfXwHtvhQN16HaGRlMaKBBpk51FNp5aeSIzK7pXL iwRJXw+mTNNJ1+GWBFTglxwzuvuJZ3vaDstSMdQX7J+xmouDAiftfHVXyG0ENFeyHt5r ivF1brL4Y+7xm6IVVgvXRAc/XI78EZsCdGCZO10oIgchi/I5ePilAVR93tLaKKdigaNZ HY0HanBjtvHaIvKSoOJh6kjbiOFS085cDkYUFYKPiM+61u/N8MpAfpiRj0ifdQ7u95A4 NqTWyZYzph20Gzx3vV9XrMYDH7Fgqz5xm7cE5RKQspE1VxscKuCALkazdnOGj5by+6uf EF5Q== X-Forwarded-Encrypted: i=1; AJvYcCVdTe3ENfS1v4RAVLLGLeDkjIAkQ1G030WEVTteNbwA2Dd3ybbXWyQOeffpkO3woi79PRcTtA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzE13h6X8NJhIYj91SfnmyWhGdjeHRgF9xmtZsMnZFU1+jLb5Kh pkzjdSj0i+ujkFMHhiYPxskYvLFFUkhrlhVKtNwqlVzoUk1SZtxxlFaP X-Gm-Gg: ASbGncuVzJFAVT/IM/Z8Mt6C5y3c5N1G34+T8J8FseIAfkhSEnUl3D0mAlgJeuvf8kP OWfdNZ33L0VWRVwRlCPB68Y14h5f/rgEyCrCXzGNaey2fDI0umNWFk6RfAp6Sr/nA0asoPEhatM kFXeeuZeYfDaVv4tI/GdAo+D2IGKgfzArDvWsdTwVNVVMdxJ8Yk33mOrt6wDEq8xuf2ldL13QrO 2jbOsiK4S3Pb/MzAL4O0Je2UQiXF/I4vayZttY58EfEoWjUErsNuAJTf+Vx8kyGKd+rDto845Af ixB4uL6y6i+IOTr8toNiArNsneKS2izqrPC3uHWV6DrdCZlLI99zofXxEdnWZuxP+40ge06++4s toAvDnQS0CIbTCsVBstG0wvVPucJ+efEfh7DJXMeVdGAjC0H8UQE= X-Google-Smtp-Source: AGHT+IHeqV0kQT/LWO061EBmTAtLJmKZFYfBZEl9V4Z/8tx5qvzdwEVO+DfIdZ1dPHs2IQ8/I9383g== X-Received: by 2002:a05:6512:3f1d:b0:55c:e806:6508 with SMTP id 2adb3069b0e04-55f0ccf9ee1mr3944168e87.43.1756124719636; Mon, 25 Aug 2025 05:25:19 -0700 (PDT) Received: from vivobook (85-253-172-112.ip.elisa.ee. [85.253.172.112]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-55f35c0223fsm1581250e87.5.2025.08.25.05.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Aug 2025 05:25:18 -0700 (PDT) From: =?UTF-8?Q?Andr=C3=A9?= A. Gomes In-Reply-To: <87h5y0fqz6.fsf@gnu.org> (Tassilo Horn's message of "Thu, 21 Aug 2025 20:51:25 +0200") References: <87ms7umjyt.fsf@gmail.com> <86ms7ufdhh.fsf@gnu.org> <87y0rechgf.fsf@gnu.org> <87frdlm9wj.fsf@gmail.com> <87h5y0fqz6.fsf@gnu.org> Date: Mon, 25 Aug 2025 15:25:13 +0300 Message-ID: <87qzwzfv12.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tassilo Horn writes: >> That sounds reasonable to me. Perhaps a comment above that line >> explaining the meaning of nil would be sensible. > > Yes, a comment would be utmost welcome. Tassilo, I'm attaching a new version of the patch. It should be ready to be pushed. Thank you. --=20 Andr=C3=A9 A. Gomes "You cannot even find the ruins..." --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Pass-remote-name-explicitly-in-bug-reference-try-set.patch >From 8572d6b70f22ebefc6309df3da8034cc717f3572 Mon Sep 17 00:00:00 2001 From: "Andre A. Gomes" Date: Mon, 25 Aug 2025 15:14:14 +0300 Subject: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc. * lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist): Add comment explaining the meaning of the nil argument when calling vc-call-backend. Even though "origin" and nil are equivalent when using the git backend, it is more intelligible to see "upstream" and "origin" passed explicitly. --- lisp/progmodes/bug-reference.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 5c03c949049..13089b47514 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -393,7 +393,9 @@ bug-reference-try-setup-from-vc (ignore-errors (vc-call-backend backend 'repository-url file-or-dir remote))) - '("upstream" nil)))) + ;; The nil value refers to the default + ;; remote name for each vc remote. + '("upstream" "origin" nil)))) (seq-some (lambda (config) (apply #'bug-reference-maybe-setup-from-vc url config)) (append bug-reference-setup-from-vc-alist -- 2.48.1 --=-=-=-- From unknown Fri Sep 12 15:16:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?Andr=C3=A9?= A. Gomes Subject: bug#79276: closed (Re: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc) Message-ID: References: <87y0r7trp9.fsf@gnu.org> <87ms7umjyt.fsf@gmail.com> X-Gnu-PR-Message: they-closed 79276 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 79276@debbugs.gnu.org Date: Mon, 25 Aug 2025 14:14:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1756131242-4819-1" This is a multi-part message in MIME format... ------------=_1756131242-4819-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from= -vc which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 79276@debbugs.gnu.org. --=20 79276: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79276 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1756131242-4819-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79276-done) by debbugs.gnu.org; 25 Aug 2025 14:13:43 +0000 Received: from localhost ([127.0.0.1]:50588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uqXx9-0001Eu-0N for submit@debbugs.gnu.org; Mon, 25 Aug 2025 10:13:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45072) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uqXx3-0001ES-6j for 79276-done@debbugs.gnu.org; Mon, 25 Aug 2025 10:13:38 -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 ) id 1uqXwu-0007as-G8; Mon, 25 Aug 2025 10:13:28 -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=euzPkzEy+1cMZ0k/Axma3SDKeU7IK7dS2ZwLf8FGey0=; b=Z01RJeEGPdXosrtOJS4H THiz7AxLrodPBqvbCBht2dIbojadQHQS+/VJT7yZQhFhFrUQplqs8HDTjp46x/7QcDzYPx0CBMFoW 4DlleNKd3w+RfFjxATnFGPNALUM2+j9PIN08mtohg6YEAJR5gvpj9n//VpXHGDBHDzuHStLTZXPnV +OJQdsTJtaD3TfknstygSXQUd12t6XwstiJrLlTvZr/b3viAg7vsvMN9VcbE9mB5uEpxsu/y1xsp6 JgEeKms6PrFv9orzrXD21HuXoXoCAvUiiBTcxMA0h/CzsooqPx6+VBFSUQvK48BCXQGBku+obitM7 yRzudnRlFOpkcw==; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddujedviedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve ffudelkeegffdtteeffeehveeigfejvedugeekhedvuedujeefudfgueelfffhnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmhdpnhgspghrtghpth htohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhhihhlihhpkhesphho shhtvghordhnvghtpdhrtghpthhtohepjeelvdejiedqughonhgvseguvggssghughhsrd hgnhhurdhorhhgpdhrtghpthhtohepsggrshhilhestghonhhtohhvohhurdhnvghtpdhr tghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtoheprghnughrvghmvghgrg hfohhnvgesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail From: Tassilo Horn To: =?utf-8?Q?Andr=C3=A9?= A. Gomes Subject: Re: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc In-Reply-To: <87qzwzfv12.fsf@gmail.com> References: <87ms7umjyt.fsf@gmail.com> <86ms7ufdhh.fsf@gnu.org> <87y0rechgf.fsf@gnu.org> <87frdlm9wj.fsf@gmail.com> <87h5y0fqz6.fsf@gnu.org> <87qzwzfv12.fsf@gmail.com> User-Agent: mu4e 1.12.12; emacs 31.0.50 Date: Mon, 25 Aug 2025 16:13:22 +0200 Message-ID: <87y0r7trp9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79276-done Cc: Philip Kaludercic , Eli Zaretskii , "Basil L. Contovounesios" , 79276-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Andr=C3=A9 A. Gomes writes: Hi Andr=C3=A9, >>> That sounds reasonable to me. Perhaps a comment above that line >>> explaining the meaning of nil would be sensible. >> >> Yes, a comment would be utmost welcome. > > Tassilo, I'm attaching a new version of the patch. It should be ready > to be pushed. Thank you. Yes, it's fine. I took your commit but amended it slightly so that your commit message also references this bug report and I extended the new comment in bug-reference.el a bit. Pushed to master. I'm closing this issue. Thanks a lot! Tassilo ------------=_1756131242-4819-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Aug 2025 09:16:43 +0000 Received: from localhost ([127.0.0.1]:56077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uoevy-0007Rj-Is for submit@debbugs.gnu.org; Wed, 20 Aug 2025 05:16:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:52590) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uoevv-0007RQ-18 for submit@debbugs.gnu.org; Wed, 20 Aug 2025 05:16:40 -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 ) id 1uoevp-0002Hy-1J for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2025 05:16:33 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoevn-0008Q9-C1 for bug-gnu-emacs@gnu.org; Wed, 20 Aug 2025 05:16:32 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-55ce5097493so6099789e87.0 for ; Wed, 20 Aug 2025 02:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755681389; x=1756286189; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=459Qgr8LKObGQ88Ab/SHnHrHq/ckAYXRK9OKbUL5fNE=; b=BI2QsLunwvcsjE2ewR0FNatcAJJTSRIPgfEq24oyxbAtCcBHAf94HNlir5xO7WOaIe JRTeKMjw/SswA2prNq0XozOT1nurSsEn+WcDWOBiPMzz6KYZRHoTWuIPAHscnn2NiYQ/ DN4Y3La2jR9VhT+LIF0sSvFqqrKr9Q6h11A9EPE0Nzq5ushpTMc6YAeKd4dZy5NtEM6/ d9AQaQyPlyPTZ6ZBGtrCd1tzDJ0hiGyHNbq+Unn05ntcNPU8YLcJEWJAGsEYPJ0D/oEi QuVOD5nawooPNMK80mQGrO71Foe2gEspOtkiPCCvhA4frvE3fV8uU0Kw6ty0go3Oxoes KbKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755681389; x=1756286189; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=459Qgr8LKObGQ88Ab/SHnHrHq/ckAYXRK9OKbUL5fNE=; b=jJVr1jr3z/zSTbcQj9mOm8wSHvbEOMdq+gL/9QgUlRjSNwo51716iq3ZM+hIru4oaD exTkaeHSJlfhT2LSAquD+N0kxnleo65S0yfsA4xL0OJ2IwAg3Qvqs89wzg3ofrc5+OIm edYE2PqZIEtF8sb1egKCO3UFiYgG0waDY2/AmNScehrJlrehTdPnNMUkOKLhatxOu0vS 8QYXZ4ZAUQdqXAgU++VYHVjueitgfoO7plaFYddtnJE1/VSk4ZFXTniOoXl4QqUpaciy dWJ4OYx41Ya0sz5OodtSYFOEOMWdHj2+8aNPvtldpgkgRQnCMqIbcIbFyWIipRpO2n6V baaA== X-Gm-Message-State: AOJu0YzWbBDWg8VW3BGY+al80euqwmDyVKh7ABzJrgyeM5g//dXmW9fC /2/XPkcZvpf/fHNWf5zuuxEWBvSAlc4BSUo1cO+QPLbZA9RQD1j1c9KDfD9MmGh6 X-Gm-Gg: ASbGncv7qbrG4BaU+cWOXLhcI3XE7Mzquvk0AJIqmRQGxY0dbqe/SraFUTPfn8tZM2R n17Uw1e9H2ZwINr+GX3CBeEY647/J4BQHxL6DK+ZSf5LjLlghXBYg2ZNqXSUqUlMX1eQ/ICSn3Z lwha+GdM5p2vHW3q/RqLDQ72vzjfmf5hSlgZd2GJvNP52ztFWOpTRMUJComlWUHZwWfW6qiHUDb 2ayipbnhxb7gD7RKb0c+/rbW38123X1bM74bUaLo+PnqZcTo01Yr7yU8psAE3htZnDvVSZXlvGe /m2vNyrP3TQdfJSq37ZimXZgZUWNP5RkD19SW/sNVxC08E0bPDM8xX3f29jFY5I57vcpZMQC5Fd VOL/xj4My2iLW7gziaMozuh5JILp65rRDW0CEJT5Fgzui7em4Lbo= X-Google-Smtp-Source: AGHT+IEZPFPGYJAO5md93vcm+nOt8lFya7sjYm2tbku9rqCdlnysG/+kSPVZ80AC+NehrQqKcuOB+Q== X-Received: by 2002:a05:6512:131c:b0:55c:edb3:22a8 with SMTP id 2adb3069b0e04-55e06b3ad08mr551122e87.18.1755681388675; Wed, 20 Aug 2025 02:16:28 -0700 (PDT) Received: from vivobook (85-253-172-112.ip.elisa.ee. [85.253.172.112]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-55cef3ffb19sm2505357e87.134.2025.08.20.02.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Aug 2025 02:16:27 -0700 (PDT) From: =?utf-8?Q?Andr=C3=A9_A=2E_Gomes?= To: bug-gnu-emacs@gnu.org Subject: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc Date: Wed, 20 Aug 2025 12:16:26 +0300 Message-ID: <87ms7umjyt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=andremegafone@gmail.com; helo=mail-lf1-x133.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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch Hi, I investigated why bug-reference-mode's automatic setup wasn't doing what I expected for some git repositories when the mode is enabled on Magit buffers. It turned out that, unsurprisingly, the inference mechanism requires one of the remotes to the called "upstream" or "origin" (since this condition didn't hold for the aforementioned repositories, the conclusion follows). Please find a trivial patch attached that makes this condition clearer. It would make sense for Tassilo Horn or Basil L. Contovounesios to take a look at the patch since they have touched on this functionality recently. Thank you. --=20 Andr=C3=A9 A. Gomes "You cannot even find the ruins..." --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Pass-remote-name-explicitly-in-bug-reference-try-set.patch >From aff9e615689ec4b277deedfb4c6de8a60ef2f82e Mon Sep 17 00:00:00 2001 From: "Andre A. Gomes" Date: Wed, 20 Aug 2025 11:48:40 +0300 Subject: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc. * lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist): The call to vc-call-backend resolves to vc-git-repository-url, which takes REMOTE-NAME as an optional argument. Its default value is "origin" so let's pass it explicitly for clarity. --- lisp/progmodes/bug-reference.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el index 5c03c949049..02acac154ee 100644 --- a/lisp/progmodes/bug-reference.el +++ b/lisp/progmodes/bug-reference.el @@ -393,7 +393,7 @@ bug-reference-try-setup-from-vc (ignore-errors (vc-call-backend backend 'repository-url file-or-dir remote))) - '("upstream" nil)))) + '("upstream" "origin")))) (seq-some (lambda (config) (apply #'bug-reference-maybe-setup-from-vc url config)) (append bug-reference-setup-from-vc-alist -- 2.48.1 --=-=-=-- ------------=_1756131242-4819-1--