GNU bug report logs - #50572
28.0.50; [PATCH] fix VC to find the responsible backend with the most specific path.

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: Manuel Giraud <manuel@HIDDEN>; Keywords: patch; dated Mon, 13 Sep 2021 15:48:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 50572) by debbugs.gnu.org; 15 Sep 2021 11:22:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 15 07:22:47 2021
Received: from localhost ([127.0.0.1]:51001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQT03-00056h-Kj
	for submit <at> debbugs.gnu.org; Wed, 15 Sep 2021 07:22:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33162)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mQT02-00056W-SM
 for 50572 <at> debbugs.gnu.org; Wed, 15 Sep 2021 07:22:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59828)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mQSzx-0005Gq-9w; Wed, 15 Sep 2021 07:22:41 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1060
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mQSzw-0008MT-LF; Wed, 15 Sep 2021 07:22:41 -0400
Date: Wed, 15 Sep 2021 14:22:38 +0300
Message-Id: <83r1dqaxs1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <143cbf9a-ff56-150a-6610-bfa9f2c05600@HIDDEN> (message from
 Dmitry Gutov on Wed, 15 Sep 2021 13:41:57 +0300)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
 <143cbf9a-ff56-150a-6610-bfa9f2c05600@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <at> debbugs.gnu.org, manuel@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 (---)

> Cc: 50572 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Wed, 15 Sep 2021 13:41:57 +0300
> 
> Now, the change in vc-responsible-backend might seem controversial, as 
> it decreases customizability and performance (a bit), but it was made a 
> year ago, and we've received no substantial complaints. And there have 
> been multiple reports (all linked) about the previous behavior.

That doesn't alleviate my worries, unfortunately.  Many people either
don't use VC or use it very "narrowly", so they never bump into these
rarely-used-but-very-useful features.




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

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


Received: (at 50572) by debbugs.gnu.org; 15 Sep 2021 11:20:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 15 07:20:57 2021
Received: from localhost ([127.0.0.1]:50997 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQSyA-00053X-VO
	for submit <at> debbugs.gnu.org; Wed, 15 Sep 2021 07:20:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60834)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mQSy5-00053F-LU
 for 50572 <at> debbugs.gnu.org; Wed, 15 Sep 2021 07:20:49 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59784)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mQSxz-0003sV-O2; Wed, 15 Sep 2021 07:20:39 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4907
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mQSxw-00088P-To; Wed, 15 Sep 2021 07:20:37 -0400
Date: Wed, 15 Sep 2021 14:20:31 +0300
Message-Id: <83sfy6axvk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <94466e10-fe13-130f-bcb4-cf5e2a9175b7@HIDDEN> (message from
 Dmitry Gutov on Wed, 15 Sep 2021 13:35:14 +0300)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
 <87fsu76vel.fsf@HIDDEN> <838rzzcfg0.fsf@HIDDEN>
 <94466e10-fe13-130f-bcb4-cf5e2a9175b7@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <at> debbugs.gnu.org, manuel@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 (---)

> Cc: 50572 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Wed, 15 Sep 2021 13:35:14 +0300
> 
> On 14.09.2021 19:03, Eli Zaretskii wrote:
> > So maybe this never worked for registering, in which case I think it
> > would be good to add that.  Because the manual says this should work
> > for "C-x v v" in general, not just under some conditions.  And what's
> > the most natural occasion to determine the backend if not when you
> > register a file?
> 
> I don't know what the manual says, but vc-next-section's signature calls 
> the prefix argument's value VERBOSE, and vc-register doesn't have a way 
> to trigger backend-prompting either. So it might be difficult to add 
> that feature in a backward-compatible manner.

We could use a different arg value, for example "C-u" will do one
thing and "C-u C-u" another.  There's precedence for that.




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

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


Received: (at 50572) by debbugs.gnu.org; 15 Sep 2021 10:42:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 15 06:42:08 2021
Received: from localhost ([127.0.0.1]:50972 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQSMh-00044g-TD
	for submit <at> debbugs.gnu.org; Wed, 15 Sep 2021 06:42:08 -0400
Received: from mail-wr1-f43.google.com ([209.85.221.43]:39925)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mQSMg-000444-4f
 for 50572 <at> debbugs.gnu.org; Wed, 15 Sep 2021 06:42:06 -0400
Received: by mail-wr1-f43.google.com with SMTP id u15so3118806wru.6
 for <50572 <at> debbugs.gnu.org>; Wed, 15 Sep 2021 03:42:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=l65JTwMk6Z6/TLIWWf32SQlMBY0KTvsHWzm3oN+9YQw=;
 b=A/yqhdE9h9SoaUOVfy6NBhpW+LCicf826BXrt4nV/nO2CfJJWrYo6rgPeDHegdD9mI
 ZJaVguwGoJ53er0Ppu9MjhgozaffcEcSE20u8m0f/fp/HUyv7xlF9wD+IZGilDcRzC0b
 GuDiy5miV1YwHRk9ZDdQN5C6nz47juU4zkSnatdBcxO7sFQ39tEkRzayL5Z4d4oO6Nuw
 57ZtRMvLU8XygmYVd6E16SiWRt/iCMiH0e69DQ/VKZzgE0kNG+Lrv2X9YZwx3uIHjTWA
 zW7W+NQC2pT30gpWW/wdIThILokmpSqq3k5Qt4INTJ72GKz3mBj1HdQsXYjp5jIvzWqr
 sjGw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=l65JTwMk6Z6/TLIWWf32SQlMBY0KTvsHWzm3oN+9YQw=;
 b=FsVohDsGCxqromnJAhV3aLxTzRM2FwwZ7I89xrJ9GbqUI4auhi/mxlbTuPTwRmwwTS
 0htJa5mWaPjtdkUM/PeTvh3RshrJxZw/Juxmm7rV2VAhczOquH6uHqI8sTwlYjvOccoj
 tEPXxJA8fHqR8CrPGR8y/Gt+MomouSgFpfikl2Cx6psxc4zjyWoeKAr1bAxUCn6Ez48L
 U52QfNaGwAj6HBTtwiaj0b95tka+3vkJnPB3pL0nWj43r9e6dlwIs8tpuvfzQK8xgJuU
 piqeNkm5XZc2aPrmtIRzy0saN4tg+Ijw8bCqSTb/YiS6A347wJUaxa6o47ZF1URr7V0d
 +bQA==
X-Gm-Message-State: AOAM530X63nN0Fg5GQt03os85IGIMrsJYg/BBJU3hACX2Qpw69Hbj7ia
 LZaqM+l47xDdTnocKU9mUVjFX6AUQvA=
X-Google-Smtp-Source: ABdhPJwZelDlBg3C2q/l3Wik3V6HxUZL3PLWQs4pX8p3vxdMj8L1RT7f5yviB1v8EH6rtboudQMavQ==
X-Received: by 2002:adf:e387:: with SMTP id e7mr4317594wrm.199.1631702520249; 
 Wed, 15 Sep 2021 03:42:00 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id u2sm3960273wmj.29.2021.09.15.03.41.58
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 15 Sep 2021 03:41:59 -0700 (PDT)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
To: Eli Zaretskii <eliz@HIDDEN>, Manuel Giraud <manuel@HIDDEN>
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <143cbf9a-ff56-150a-6610-bfa9f2c05600@HIDDEN>
Date: Wed, 15 Sep 2021 13:41:57 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <83h7encrq1.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -0.6 (/)

On 14.09.2021 14:38, Eli Zaretskii wrote:
>> FWIW, I think the most specific should be the default of
>> "C-x v v"
> I'm worried that we are arbitrarily changing the defaults, for the
> sole reason that the new default plays better with someone's
> workflows.  AFAIR, it used to be the case that the order of VCS names
> in vc-handled-backends determined the way the default is sought out
> and set.  This change (and I think the other one Dmitry mentioned in
> his response?) change that in a way that doesn't leave any "fire
> escape" to users who might be setting things up to have a meaningful
> (for them) order in that list.

It's really more of a discussion for bug#42966. Because no matter how 
one feels about that change (I don't have a strong opinion), these two 
pieces of code should follow the same pattern.

Now, the change in vc-responsible-backend might seem controversial, as 
it decreases customizability and performance (a bit), but it was made a 
year ago, and we've received no substantial complaints. And there have 
been multiple reports (all linked) about the previous behavior.




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

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


Received: (at 50572) by debbugs.gnu.org; 15 Sep 2021 10:35:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 15 06:35:25 2021
Received: from localhost ([127.0.0.1]:50960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQSGD-0003uZ-Jv
	for submit <at> debbugs.gnu.org; Wed, 15 Sep 2021 06:35:25 -0400
Received: from mail-wm1-f53.google.com ([209.85.128.53]:41674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mQSGB-0003uN-Qp
 for 50572 <at> debbugs.gnu.org; Wed, 15 Sep 2021 06:35:24 -0400
Received: by mail-wm1-f53.google.com with SMTP id
 g19-20020a1c9d13000000b003075062d4daso1670185wme.0
 for <50572 <at> debbugs.gnu.org>; Wed, 15 Sep 2021 03:35:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=IfKadxHDuAYZsvlPbAyIuAYR4iYcu/iRGhS+6+e0ve0=;
 b=RMD2vF1ZqRPnWJ4/A4F5sWvmabttFBbPkyRxrFjYhSKl5Pv63uD2rzLjd1F1fkjXc0
 Nx+/nkC5K024aWZUhd/habW3L+Puo51cUEZgIj+1ZgEd1GK9HgB47sIglIyuHI09Iatb
 XZrV+2CkxVpP5ydEzvSRAMnsLlJMK874HfIRC7x20UyuOyHTmI4hDLnyxk5HhvbCiADZ
 7soUcAxSrWBkqtZxc8GIHCgU3C3CMYDNCcMxyhxxacLD5jH31fmzQyWd8Tk4fBsUQmLo
 ZEeA/zS9FGRheiV2Lj5tll8xhIhi8tK8mq0sGL79jhNACHQhO/3hBhbvVKk34WPcxUjn
 ydEg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=IfKadxHDuAYZsvlPbAyIuAYR4iYcu/iRGhS+6+e0ve0=;
 b=XKOIcXhrQdYR0DhnoXEbcJT5UG2w+VmrJFAbFirrHrsVa0im1Q/c3BnNkf83fFSSC2
 2k/Q98ATYmINcC2uN743qDHirKgoiLiFj4i3jMOZJ+fBbcs7rpNLyd0uzXPahPfIfu6R
 sOfhiGOqvn8ar+WPQZ3z+1SHvuCJ4CYLKg6cZLrwKFVCbB2YCsBFLIMnlqXcdQqRbkJ7
 2Z+Hj08SEIvKoEGj39ZFwSODdDdfiixJD4NE2p8M+376SwwMapnLSrlGfnuuaAiokl9j
 H2xprVDlxXdwY/JvWHX0erUfP9HEioWxc0PBMxADg1V/tdPCTa0SZvz9tNj72IW3J56a
 Fn1g==
X-Gm-Message-State: AOAM532Se7doKEnz1nLwoRFXDV4klEhm9P3fjfqkcmT2uA9xvcJLmJKY
 1ipLF4iqM2+4y45O1Ovwnnm3aQO82U4=
X-Google-Smtp-Source: ABdhPJytVsZaA73Bx7KHndNB5DTNZbKuAuT4HDnKCaAG3HdN/sP7awHv4J0o+jzPYUhsToJih6jOxA==
X-Received: by 2002:a1c:2c3:: with SMTP id 186mr3708428wmc.43.1631702117891;
 Wed, 15 Sep 2021 03:35:17 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id o26sm3792624wmc.17.2021.09.15.03.35.15
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 15 Sep 2021 03:35:17 -0700 (PDT)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
To: Eli Zaretskii <eliz@HIDDEN>, Manuel Giraud <manuel@HIDDEN>
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
 <87fsu76vel.fsf@HIDDEN> <838rzzcfg0.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <94466e10-fe13-130f-bcb4-cf5e2a9175b7@HIDDEN>
Date: Wed, 15 Sep 2021 13:35:14 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <838rzzcfg0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -0.6 (/)

On 14.09.2021 19:03, Eli Zaretskii wrote:
> So maybe this never worked for registering, in which case I think it
> would be good to add that.  Because the manual says this should work
> for "C-x v v" in general, not just under some conditions.  And what's
> the most natural occasion to determine the backend if not when you
> register a file?

I don't know what the manual says, but vc-next-section's signature calls 
the prefix argument's value VERBOSE, and vc-register doesn't have a way 
to trigger backend-prompting either. So it might be difficult to add 
that feature in a backward-compatible manner.

vc-register doesn't work with C-u at all, though (shows an error), so it 
might be possible to do something in that area.




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

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


Received: (at 50572) by debbugs.gnu.org; 15 Sep 2021 09:18:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 15 05:18:05 2021
Received: from localhost ([127.0.0.1]:50879 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQR3M-0001oR-Pw
	for submit <at> debbugs.gnu.org; Wed, 15 Sep 2021 05:18:04 -0400
Received: from ledu-giraud.fr ([51.159.28.247]:10989)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@HIDDEN>) id 1mQR3J-0001ny-K7
 for 50572 <at> debbugs.gnu.org; Wed, 15 Sep 2021 05:18:02 -0400
Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id effe027a
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Wed, 15 Sep 2021 11:17:59 +0200 (CEST)
From: Manuel Giraud <manuel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
 <87fsu76vel.fsf@HIDDEN> <838rzzcfg0.fsf@HIDDEN>
Date: Wed, 15 Sep 2021 11:17:58 +0200
In-Reply-To: <838rzzcfg0.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 14 Sep
 2021 19:03:27 +0300")
Message-ID: <87sfy65ha1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> So maybe this never worked for registering, in which case I think it
> would be good to add that.  Because the manual says this should work
> for "C-x v v" in general, not just under some conditions.  And what's
> the most natural occasion to determine the backend if not when you
> register a file?

Yes. I'll look into it and open a new bug report when I have
something.

In fact, it seems hard to me to find an example where choosing a backend
for an already registered file (in another backend) is a useful next
action.
-- 
Manuel Giraud




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 16:04:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 12:04:00 2021
Received: from localhost ([127.0.0.1]:50002 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQAue-0003bP-Go
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 12:04:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58692)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mQAuc-0003bC-SU
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 12:03:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58286)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mQAuX-00040P-3w; Tue, 14 Sep 2021 12:03:53 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1359
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mQAuI-0002EP-5C; Tue, 14 Sep 2021 12:03:52 -0400
Date: Tue, 14 Sep 2021 19:03:27 +0300
Message-Id: <838rzzcfg0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Manuel Giraud <manuel@HIDDEN>
In-Reply-To: <87fsu76vel.fsf@HIDDEN> (message from Manuel Giraud on Tue, 
 14 Sep 2021 17:15:14 +0200)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
 <87fsu76vel.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: Manuel Giraud <manuel@HIDDEN>
> Cc: 50572 <at> debbugs.gnu.org
> Date: Tue, 14 Sep 2021 17:15:14 +0200
> 
> > It didn't work for me, either.  Which is a pity, since the manual says
> > it should.  I guess we lost this at some point; patches to fix that
> > are welcome.
> 
> FTR, I don't if it was lost at some point because reading the code it
> seems that prefix is taken into account if the file is already
> registered into some backend… but for unregistered file it seems that
> nothing is done with the prefix.

So maybe this never worked for registering, in which case I think it
would be good to add that.  Because the manual says this should work
for "C-x v v" in general, not just under some conditions.  And what's
the most natural occasion to determine the backend if not when you
register a file?




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 15:15:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 11:15:21 2021
Received: from localhost ([127.0.0.1]:49929 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQA9Z-0002Gt-36
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 11:15:21 -0400
Received: from ledu-giraud.fr ([51.159.28.247]:26318)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@HIDDEN>) id 1mQA9V-0002Gi-7x
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 11:15:19 -0400
Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 28fe367a
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Tue, 14 Sep 2021 17:15:15 +0200 (CEST)
From: Manuel Giraud <manuel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
Date: Tue, 14 Sep 2021 17:15:14 +0200
In-Reply-To: <83h7encrq1.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 14 Sep
 2021 14:38:14 +0300")
Message-ID: <87fsu76vel.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Manuel Giraud <manuel@HIDDEN>
>> Cc: 50572 <at> debbugs.gnu.org
>> Date: Tue, 14 Sep 2021 09:50:22 +0200
>>=20
>> > Isn't that already available with "C-u C-x v v"?
>>=20
>> It does not work for me. It still tries to register in my homedir
>> subversion.
>
> It didn't work for me, either.  Which is a pity, since the manual says
> it should.  I guess we lost this at some point; patches to fix that
> are welcome.

FTR, I don't if it was lost at some point because reading the code it
seems that prefix is taken into account if the file is already
registered into some backend=E2=80=A6 but for unregistered file it seems th=
at
nothing is done with the prefix.
--=20
Manuel Giraud




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 12:57:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 08:57:40 2021
Received: from localhost ([127.0.0.1]:47939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQ80J-0000C7-UY
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 08:57:40 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mQ80H-0000Br-7q
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 08:57:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51964)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mQ80B-000683-5l; Tue, 14 Sep 2021 08:57:31 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1139
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mQ80A-0000lF-Q2; Tue, 14 Sep 2021 08:57:31 -0400
Date: Tue, 14 Sep 2021 15:57:24 +0300
Message-Id: <83czpbco23.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Manuel Giraud <manuel@HIDDEN>
In-Reply-To: <87sfy7tl4r.fsf@HIDDEN> (message from Manuel Giraud on Tue, 
 14 Sep 2021 14:08:36 +0200)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
 <87sfy7tl4r.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: Manuel Giraud <manuel@HIDDEN>
> Cc: 50572 <at> debbugs.gnu.org
> Date: Tue, 14 Sep 2021 14:08:36 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> >> > Isn't that already available with "C-u C-x v v"?
> >> 
> >> It does not work for me. It still tries to register in my homedir
> >> subversion.
> >
> > It didn't work for me, either.  Which is a pity, since the manual says
> > it should.  I guess we lost this at some point; patches to fix that
> > are welcome.
> 
> Ok. I could try to work on this issue then but maybe I should file
> another bug report, no?

Yes, please.

> > I'm worried that we are arbitrarily changing the defaults, for the
> > sole reason that the new default plays better with someone's
> > workflows.
> 
> I think you are right and as you said the "choose the correct backend"
> behaviour is already documented in the manual (in "Advanced Control in
> ‘C-x v v’").
> 
> > AFAIR, it used to be the case that the order of VCS names in
> > vc-handled-backends determined the way the default is sought out and
> > set.  This change (and I think the other one Dmitry mentioned in his
> > response?) change that in a way that doesn't leave any "fire escape"
> > to users who might be setting things up to have a meaningful (for
> > them) order in that list.
> 
> Yes, in "Customizing VC", the manual insists on the order importance of
> the vc-handled-backends list. So maybe, just fixing "C-u C-x v v" and
> remember this customization is enough here.

Let's wait for Dmitry to chime in, as I expect he will have different
opinions.

Thanks




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 12:08:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 08:08:40 2021
Received: from localhost ([127.0.0.1]:47838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQ7Eu-0005E7-GY
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 08:08:40 -0400
Received: from ledu-giraud.fr ([51.159.28.247]:30366)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@HIDDEN>) id 1mQ7Es-0005Dw-LO
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 08:08:39 -0400
Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id cf21b569
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Tue, 14 Sep 2021 14:08:36 +0200 (CEST)
From: Manuel Giraud <manuel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN> <83h7encrq1.fsf@HIDDEN>
Date: Tue, 14 Sep 2021 14:08:36 +0200
In-Reply-To: <83h7encrq1.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 14 Sep
 2021 14:38:14 +0300")
Message-ID: <87sfy7tl4r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Manuel Giraud <manuel@HIDDEN>
>> Cc: 50572 <at> debbugs.gnu.org
>> Date: Tue, 14 Sep 2021 09:50:22 +0200
>>=20
>> > Isn't that already available with "C-u C-x v v"?
>>=20
>> It does not work for me. It still tries to register in my homedir
>> subversion.
>
> It didn't work for me, either.  Which is a pity, since the manual says
> it should.  I guess we lost this at some point; patches to fix that
> are welcome.

Ok. I could try to work on this issue then but maybe I should file
another bug report, no?

>> FWIW, I think the most specific should be the default of
>> "C-x v v"
>
> I'm worried that we are arbitrarily changing the defaults, for the
> sole reason that the new default plays better with someone's
> workflows.

I think you are right and as you said the "choose the correct backend"
behaviour is already documented in the manual (in "Advanced Control in
=E2=80=98C-x v v=E2=80=99").

> AFAIR, it used to be the case that the order of VCS names in
> vc-handled-backends determined the way the default is sought out and
> set.  This change (and I think the other one Dmitry mentioned in his
> response?) change that in a way that doesn't leave any "fire escape"
> to users who might be setting things up to have a meaningful (for
> them) order in that list.

Yes, in "Customizing VC", the manual insists on the order importance of
the vc-handled-backends list. So maybe, just fixing "C-u C-x v v" and
remember this customization is enough here.
--=20
Manuel Giraud




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 11:38:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 07:38:28 2021
Received: from localhost ([127.0.0.1]:47738 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQ6lg-0002Hb-O0
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 07:38:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mQ6lf-0002HO-AF
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 07:38:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48860)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mQ6lZ-0005PA-I5; Tue, 14 Sep 2021 07:38:21 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4132
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mQ6lZ-0007ZM-4s; Tue, 14 Sep 2021 07:38:21 -0400
Date: Tue, 14 Sep 2021 14:38:14 +0300
Message-Id: <83h7encrq1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Manuel Giraud <manuel@HIDDEN>
In-Reply-To: <87mtofvbnl.fsf@HIDDEN> (message from Manuel Giraud on Tue, 
 14 Sep 2021 09:50:22 +0200)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <87mtofvbnl.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: Manuel Giraud <manuel@HIDDEN>
> Cc: 50572 <at> debbugs.gnu.org
> Date: Tue, 14 Sep 2021 09:50:22 +0200
> 
> > Isn't that already available with "C-u C-x v v"?
> 
> It does not work for me. It still tries to register in my homedir
> subversion.

It didn't work for me, either.  Which is a pity, since the manual says
it should.  I guess we lost this at some point; patches to fix that
are welcome.

> FWIW, I think the most specific should be the default of
> "C-x v v"

I'm worried that we are arbitrarily changing the defaults, for the
sole reason that the new default plays better with someone's
workflows.  AFAIR, it used to be the case that the order of VCS names
in vc-handled-backends determined the way the default is sought out
and set.  This change (and I think the other one Dmitry mentioned in
his response?) change that in a way that doesn't leave any "fire
escape" to users who might be setting things up to have a meaningful
(for them) order in that list.




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 07:57:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 03:57:30 2021
Received: from localhost ([127.0.0.1]:47414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQ3Jq-0002bK-Ha
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 03:57:30 -0400
Received: from ledu-giraud.fr ([51.159.28.247]:44504)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@HIDDEN>) id 1mQ3Jo-0002bC-VS
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 03:57:29 -0400
Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 84214147
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Tue, 14 Sep 2021 09:57:27 +0200 (CEST)
From: Manuel Giraud <manuel@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <fd9f306b-758a-834d-5425-7afab2de6db2@HIDDEN>
Date: Tue, 14 Sep 2021 09:57:27 +0200
In-Reply-To: <fd9f306b-758a-834d-5425-7afab2de6db2@HIDDEN> (Dmitry Gutov's
 message of "Tue, 14 Sep 2021 02:48:11 +0300")
Message-ID: <87ilz3vbbs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <at> debbugs.gnu.org, Eli Zaretskii <eliz@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 (-)

Dmitry Gutov <dgutov@HIDDEN> writes:

> On 13.09.2021 19:10, Eli Zaretskii wrote:
>>> From: Manuel Giraud<manuel@HIDDEN>
>>> Date: Mon, 13 Sep 2021 17:47:19 +0200
>>>
>>> When calling 'vc-next-action' on an unregistered file, VC could choose a
>>> backend that is very far above this file in the directory hierarchy.
>>>
>>> In my case, it chooses SVN as backend (because I have one in my homedir)
>>> but I wanted it to choose the Git backend of the directory this file
>>> resides.
>>>
>>> This patch solves this issue by selecting the backend with the most
>>> specific (in fact, the longest string) path to the file.
>> Isn't that already available with "C-u C-x v v"?
>
> A better default is an improvement anyway.
>
> I think the patch is a good idea, especially given that
> vc-responsible-backend has only recently been changed in the same way
> (commit 2697123933).

I see: this is the same functionality. Should I package this selection
into a function then?
-- 
Manuel Giraud




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 07:50:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 14 03:50:26 2021
Received: from localhost ([127.0.0.1]:47410 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mQ3Cz-0002PT-P1
	for submit <at> debbugs.gnu.org; Tue, 14 Sep 2021 03:50:25 -0400
Received: from ledu-giraud.fr ([51.159.28.247]:33603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@HIDDEN>) id 1mQ3Cy-0002PL-Qh
 for 50572 <at> debbugs.gnu.org; Tue, 14 Sep 2021 03:50:25 -0400
Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id ec888590
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); 
 Tue, 14 Sep 2021 09:50:23 +0200 (CEST)
From: Manuel Giraud <manuel@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
Date: Tue, 14 Sep 2021 09:50:22 +0200
In-Reply-To: <83y280cv8g.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 13 Sep
 2021 19:10:07 +0300")
Message-ID: <87mtofvbnl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> From: Manuel Giraud <manuel@HIDDEN>
>> Date: Mon, 13 Sep 2021 17:47:19 +0200
>> 
>> When calling 'vc-next-action' on an unregistered file, VC could choose a
>> backend that is very far above this file in the directory hierarchy.
>> 
>> In my case, it chooses SVN as backend (because I have one in my homedir)
>> but I wanted it to choose the Git backend of the directory this file
>> resides.
>> 
>> This patch solves this issue by selecting the backend with the most
>> specific (in fact, the longest string) path to the file.
>
> Isn't that already available with "C-u C-x v v"?

It does not work for me. It still tries to register in my homedir
subversion. FWIW, I think the most specific should be the default of
"C-x v v" and maybe I could try to get the least specific for "C-u C-x v
v"
-- 
Manuel Giraud




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

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


Received: (at 50572) by debbugs.gnu.org; 14 Sep 2021 02:28:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 22:28:21 2021
Received: from localhost ([127.0.0.1]:47131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPyBJ-0000i5-Mn
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 22:28:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56008)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mPyBE-0000hp-5u
 for 50572 <at> debbugs.gnu.org; Mon, 13 Sep 2021 22:28:20 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34532)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mPyB8-00030b-2l; Mon, 13 Sep 2021 22:28:10 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2477
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mPyB7-0006J4-MP; Mon, 13 Sep 2021 22:28:10 -0400
Date: Tue, 14 Sep 2021 05:28:01 +0300
Message-Id: <83mtofdh72.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <fd9f306b-758a-834d-5425-7afab2de6db2@HIDDEN> (message from
 Dmitry Gutov on Tue, 14 Sep 2021 02:48:11 +0300)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
 <fd9f306b-758a-834d-5425-7afab2de6db2@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <at> debbugs.gnu.org, manuel@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 (---)

> Cc: 50572 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Tue, 14 Sep 2021 02:48:11 +0300
> 
> >> This patch solves this issue by selecting the backend with the most
> >> specific (in fact, the longest string) path to the file.
> > Isn't that already available with "C-u C-x v v"?
> 
> A better default is an improvement anyway.

But it looks like we've lost that feature of "C-x v v" somehow,
because it doesn't seem to work here.  Which is too bad.




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

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


Received: (at 50572) by debbugs.gnu.org; 13 Sep 2021 23:48:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 19:48:22 2021
Received: from localhost ([127.0.0.1]:47076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPvgT-0005Od-QR
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 19:48:21 -0400
Received: from mail-wm1-f45.google.com ([209.85.128.45]:44749)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mPvgR-0005OP-NK
 for 50572 <at> debbugs.gnu.org; Mon, 13 Sep 2021 19:48:20 -0400
Received: by mail-wm1-f45.google.com with SMTP id
 l7-20020a1c2507000000b002e6be5d86b3so1107271wml.3
 for <50572 <at> debbugs.gnu.org>; Mon, 13 Sep 2021 16:48:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=vwOmL9CEVlsi3hGujmxOWr6ozZVe40LMYqQleGPSuI0=;
 b=NRvphawq/BmRsOiYokzbLHu0XIuYCwmn2pLHyjarchiaq7fgS3EQADkkXFd9ae/Q+F
 NCeCP9Pzx1wK1wsEa/07hZJmEi9+XKaZU4/xE71zX+1jS1vZnzUcxnW59qXd8kBWxBEW
 46uPWO5PtXTNC2SsdsxgbiNSPM/oHhARQrZCNmeP5oeA5KE2F0E3VjELI2KQ3xVmZeMq
 ynD0MJoq1XDFQ3oDjEDmcDU18pyc6p8RA+CnjgzKCmE9LoNu5/HEPnNaQAQEZ+89VSx/
 2RM8rWJquHchPYnjyrek6xHFULr0vR28As2yvaIr6tUGUMn9txc+ge5Ls+alhzZKrVh3
 3Hgg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=vwOmL9CEVlsi3hGujmxOWr6ozZVe40LMYqQleGPSuI0=;
 b=AUP8KpQxrHPoxo4Rn25naIlMQ47NF3gSxQWw78A25uZ1mXi50XUhSHYI1x/X8pvBfo
 BobcbxrOALi+zZehpJM8VFesB/lBgdFR89X1IyqUWDns1pWmXVN/FnSbX7q17mzt+7GV
 5Dd6P6KaTGpH40hIcipYkDFy3Ggmrt08HWOajXVqI9vzgu6sgtmziZtyNdokdu3bWBWo
 tgpKNVfpC3Tdzg6AwBvssghCJxxafBcZE6Q6o5P9FdjBcBpHMk4LGgEei5EHNXqHir+r
 f2a1Ea5+Cxi/9LCFxObaZCR4lDh/MUNuefAqSylrd1yp2EXu/7wvB6sd1a/VFogRHFWJ
 80Xw==
X-Gm-Message-State: AOAM5334Ds2NJDkNERlQh3DLFfWumGJioceD3lZHbghtoJEKM/yqUliy
 lOeO8t3/8dYAAOQrLGbxCAtjvrGIt/Q=
X-Google-Smtp-Source: ABdhPJw/BJ+lEuSYzVULLl0Nl6B0VpOzcCfOP1xXBmRz5Z6mN3nB2gomljPZPehRJejLiN3KwAeEYA==
X-Received: by 2002:a1c:7e8a:: with SMTP id z132mr13375073wmc.75.1631576894008; 
 Mon, 13 Sep 2021 16:48:14 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id v18sm1984973wml.44.2021.09.13.16.48.13
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 13 Sep 2021 16:48:13 -0700 (PDT)
Subject: Re: bug#50572: 28.0.50; [PATCH] fix VC to find the responsible
 backend with the most specific path.
To: Eli Zaretskii <eliz@HIDDEN>, Manuel Giraud <manuel@HIDDEN>
References: <877dfkxyt4.fsf@HIDDEN> <83y280cv8g.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <fd9f306b-758a-834d-5425-7afab2de6db2@HIDDEN>
Date: Tue, 14 Sep 2021 02:48:11 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <83y280cv8g.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: -0.6 (/)

On 13.09.2021 19:10, Eli Zaretskii wrote:
>> From: Manuel Giraud<manuel@HIDDEN>
>> Date: Mon, 13 Sep 2021 17:47:19 +0200
>>
>> When calling 'vc-next-action' on an unregistered file, VC could choose a
>> backend that is very far above this file in the directory hierarchy.
>>
>> In my case, it chooses SVN as backend (because I have one in my homedir)
>> but I wanted it to choose the Git backend of the directory this file
>> resides.
>>
>> This patch solves this issue by selecting the backend with the most
>> specific (in fact, the longest string) path to the file.
> Isn't that already available with "C-u C-x v v"?

A better default is an improvement anyway.

I think the patch is a good idea, especially given that 
vc-responsible-backend has only recently been changed in the same way 
(commit 2697123933).




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

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


Received: (at 50572) by debbugs.gnu.org; 13 Sep 2021 16:10:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 12:10:22 2021
Received: from localhost ([127.0.0.1]:46711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPoXG-0002r1-93
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 12:10:22 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mPoXF-0002qo-0w
 for 50572 <at> debbugs.gnu.org; Mon, 13 Sep 2021 12:10:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43504)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mPoX8-0006r9-T0; Mon, 13 Sep 2021 12:10:14 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4315
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mPoX8-00072o-2k; Mon, 13 Sep 2021 12:10:14 -0400
Date: Mon, 13 Sep 2021 19:10:07 +0300
Message-Id: <83y280cv8g.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Manuel Giraud <manuel@HIDDEN>
In-Reply-To: <877dfkxyt4.fsf@HIDDEN> (message from Manuel Giraud on Mon, 
 13 Sep 2021 17:47:19 +0200)
Subject: Re: bug#50572: 28.0.50;
 [PATCH] fix VC to find the responsible backend with the most specific
 path.
References: <877dfkxyt4.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50572
Cc: 50572 <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: Manuel Giraud <manuel@HIDDEN>
> Date: Mon, 13 Sep 2021 17:47:19 +0200
> 
> When calling 'vc-next-action' on an unregistered file, VC could choose a
> backend that is very far above this file in the directory hierarchy.
> 
> In my case, it chooses SVN as backend (because I have one in my homedir)
> but I wanted it to choose the Git backend of the directory this file
> resides.
> 
> This patch solves this issue by selecting the backend with the most
> specific (in fact, the longest string) path to the file.

Isn't that already available with "C-u C-x v v"?




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

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


Received: (at submit) by debbugs.gnu.org; 13 Sep 2021 15:47:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 13 11:47:31 2021
Received: from localhost ([127.0.0.1]:46665 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mPoB8-0002E8-JL
	for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 11:47:31 -0400
Received: from lists.gnu.org ([209.51.188.17]:54578)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <manuel@HIDDEN>) id 1mPoB6-0002E1-Tt
 for submit <at> debbugs.gnu.org; Mon, 13 Sep 2021 11:47:29 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:54330)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <manuel@HIDDEN>)
 id 1mPoB6-0002m9-7D
 for bug-gnu-emacs@HIDDEN; Mon, 13 Sep 2021 11:47:28 -0400
Received: from ledu-giraud.fr ([51.159.28.247]:16005)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <manuel@HIDDEN>)
 id 1mPoB2-0007Xa-DP
 for bug-gnu-emacs@HIDDEN; Mon, 13 Sep 2021 11:47:27 -0400
Received: from elite.giraud (<unknown> [10.1.1.1])
 by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 020e3410
 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <bug-gnu-emacs@HIDDEN>;
 Mon, 13 Sep 2021 17:47:20 +0200 (CEST)
From: Manuel Giraud <manuel@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; [PATCH] fix VC to find the responsible backend with the
 most specific path.
Date: Mon, 13 Sep 2021 17:47:19 +0200
Message-ID: <877dfkxyt4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@HIDDEN;
 helo=ledu-giraud.fr
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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: -2.4 (--)

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


When calling 'vc-next-action' on an unregistered file, VC could choose a
backend that is very far above this file in the directory hierarchy.

In my case, it chooses SVN as backend (because I have one in my homedir)
but I wanted it to choose the Git backend of the directory this file
resides.

This patch solves this issue by selecting the backend with the most
specific (in fact, the longest string) path to the file.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-let-VC-find-a-responsible-backend-with-the-most-spec.patch

From 9e673edc28f84a75f3bf0f53e7fba01c2f50e51c Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@HIDDEN>
Date: Mon, 13 Sep 2021 17:31:31 +0200
Subject: [PATCH] let VC find a responsible backend with the most specific
 path.

---
 lisp/vc/vc.el | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 4fcba65ab4..7160c98820 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -937,11 +937,16 @@ vc-backend-for-registration
 use."
   (catch 'found
     ;; First try: find a responsible backend, it must be a backend
-    ;; under which FILE is not yet registered.
-    (dolist (backend vc-handled-backends)
-      (and (not (vc-call-backend backend 'registered file))
-	   (vc-call-backend backend 'responsible-p file)
-	   (throw 'found backend)))
+    ;; under which FILE is not yet registered and with the most
+    ;; specific path to FILE.
+    (let ((max 0) bk)
+      (dolist (backend vc-handled-backends)
+        (when (not (vc-call-backend backend 'registered file))
+          (let* ((path (vc-call-backend backend 'responsible-p file))
+                 (len (length path)))
+            (when (and len (> len max))
+              (setq max len bk backend)))))
+      (when bk (throw 'found bk)))
     ;; no responsible backend
     (let* ((possible-backends
 	    (let (pos)
-- 
2.33.0


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



In GNU Emacs 28.0.50 (build 1, x86_64-unknown-openbsd7.0, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)
 of 2021-09-13 built on elite.giraud
Repository revision: 5ee05fa75d517fdd13c9795aa78e12489140e388
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: OpenBSD elite.giraud 7.0 GENERIC.MP#211 amd64

Configured using:
 'configure --prefix=/home/manuel/emacs --bindir=/home/manuel/bin
 --with-x-toolkit=athena --without-sound --without-json
 CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2
LIBOTF LIBXML2 M17N_FLT MODULES NOTIFY KQUEUE PDUMPER PNG RSVG THREADS
TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Outline

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  bug-reference-mode: t
  show-paren-mode: t
  icomplete-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  windmove-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: do-auto-fill
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/manuel/.el/google-maps.el/google-maps hides /home/manuel/.el/google-maps
/home/manuel/.emacs.d/elpa/magit-20210909.434/magit-section-pkg hides /home/manuel/.emacs.d/elpa/magit-section-20210829.1849/magit-section-pkg
/home/manuel/.emacs.d/elpa/transient-20210819.2118/transient hides /home/manuel/emacs/share/emacs/28.0.50/lisp/transient

Features:
(shadow sort bbdb-message mail-extr gnus-msg emacsbug magit-extras
face-remap magit-submodule magit-obsolete magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func imenu magit-diff smerge-mode diff git-commit rx log-edit
pcvs-util add-log magit-core magit-autorevert autorevert filenotify
magit-margin magit-transient magit-process magit-mode transient
magit-git magit-section misearch multi-isearch bug-reference cl-print
debug backtrace dabbrev pulse vc-annotate vc-filewise eieio-opt speedbar
ezimage dframe shortdoc help-fns radix-tree vc-mtn vc-hg vc-git
diff-mode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc-dir ewoc vc
vc-dispatcher gnus-dired with-editor em-unix em-term term ehelp
em-script em-prompt em-ls em-hist em-pred em-glob em-cmpl em-dirs
esh-var em-basic em-banner em-alias esh-mode eshell esh-cmd esh-ext
esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
magit-utils dash cl-extra help-mode paredit paren icomplete time battery
cus-load exwm-randr xcb-randr exwm-config exwm exwm-input xcb-keysyms
exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xkb xcb-xproto
xcb-types xcb-debug server modus-operandi-theme modus-themes pcase
google-maps google-maps-static google-maps-geocode google-maps-base
osm-mode url-cache gnuplot info-look transmission color calc-bin
calc-ext calc calc-loaddefs rect calc-macs w3m-load mu4e mu4e-org
mu4e-main mu4e-view mu4e-view-gnus gnus-art mm-uu mml2015 mm-view
mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus
dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec
gnus-int gnus-range gnus-win gnus nnheader wid-edit mu4e-view-common
mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions ido
rfc2368 smtpmail sendmail mu4e-mark mu4e-proc mu4e-utils doc-view
jka-compr image-mode exif mu4e-lists mu4e-message shr kinsoku svg xml
dom flow-fill mule-util hl-line mu4e-vars message rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mail-utils gmm-utils mailheader
mu4e-meta supercite regi bbdb-anniv diary-lib diary-loaddefs bbdb-mua
bbdb-com crm mailabbrev bbdb bbdb-site timezone org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp
ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs
find-func cal-menu calendar cal-loaddefs visual-basic-mode web-mode
disp-table erlang-start smart-tabs-mode skeleton cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
movitz-slime cl slime-asdf grep slime-tramp tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat shell pcomplete
parse-time iso8601 time-date ls-lisp format-spec slime-fancy
slime-indentation slime-cl-indent cl-indent slime-trace-dialog
slime-fontifying-fu slime-package-fu slime-references
slime-compiler-notes-tree advice slime-scratch slime-presentations
bridge slime-macrostep macrostep slime-mdot-fu slime-enclosing-context
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-repl slime-parse slime
compile text-property-search etags fileloop generator xref project
arc-mode archive-mode noutline outline pp comint ansi-color ring
hyperspec thingatpt slime-autoloads dired-aux dired-x dired
dired-loaddefs edmacro kmacro windmove easy-mmode tex-site info package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind kqueue lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 612471 87337)
 (symbols 48 53625 7)
 (strings 32 170780 9764)
 (string-bytes 1 5553540)
 (vectors 16 88025)
 (vector-slots 8 1152335 56459)
 (floats 8 545 390)
 (intervals 56 4332 940)
 (buffers 992 33))

-- 
Manuel Giraud

--=-=-=--




Acknowledgement sent to Manuel Giraud <manuel@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#50572; 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: Wed, 15 Sep 2021 11:30:02 UTC

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