From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39380: 26.3: Opening files in vc-dir-mode with differing root and working dir fails Date: Sat, 08 Feb 2020 10:04:23 +0200 Message-ID: <83k14xec8o.fsf@gnu.org> References: <8eea69d2-46ed-0c41-b516-0120251dcc96@gmx.de> <504aedd0-54e5-aa62-b19f-41fbafa9aa17@gmx.de> <09ef5fcb-80b7-3b43-243a-2278b46281ba@yandex.ru> <5c7d9eab-59d1-21c1-c8e5-1c820cb2946b@gmx.de> <25183dd6-10b3-c3c4-0910-262c70434161@gmx.de> <0a8b11c8-1c5c-33ed-e5a1-e7ad5b090929@yandex.ru> <834kw2g1ur.fsf@gnu.org> <38ea415e-9993-806c-3006-85e6e435fbd5@yandex.ru> <83v9oiebu3.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="112061"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39380@debbugs.gnu.org, Wolfgang.Scherer@gmx.de To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 08 09:05:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j0L71-000T3i-PI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 09:05:11 +0100 Original-Received: from localhost ([::1]:38716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0L70-0002vH-OC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Feb 2020 03:05:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47406) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0L6t-0002uz-9G for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:05:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0L6s-0007TC-3e for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:05:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0L6r-0007Se-W9 for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0L6r-0001JB-R8 for bug-gnu-emacs@gnu.org; Sat, 08 Feb 2020 03:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Feb 2020 08:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39380 X-GNU-PR-Package: emacs Original-Received: via spool by 39380-submit@debbugs.gnu.org id=B39380.15811490915010 (code B ref 39380); Sat, 08 Feb 2020 08:05:01 +0000 Original-Received: (at 39380) by debbugs.gnu.org; 8 Feb 2020 08:04:51 +0000 Original-Received: from localhost ([127.0.0.1]:50576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0L6h-0001Ik-AQ for submit@debbugs.gnu.org; Sat, 08 Feb 2020 03:04:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0L6e-0001IU-GQ for 39380@debbugs.gnu.org; Sat, 08 Feb 2020 03:04:49 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0L6Z-0006PL-12; Sat, 08 Feb 2020 03:04:43 -0500 Original-Received: from [176.228.60.248] (port=1577 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j0L6Y-0005Z6-Dq; Sat, 08 Feb 2020 03:04:42 -0500 In-reply-to: (message from Dmitry Gutov on Sat, 8 Feb 2020 04:20:26 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175774 Archived-At: > Cc: 39380@debbugs.gnu.org, Wolfgang.Scherer@gmx.de > From: Dmitry Gutov > Date: Sat, 8 Feb 2020 04:20:26 +0300 > > On 07.02.2020 17:00, Eli Zaretskii wrote: > >> Cc: 39380@debbugs.gnu.org, Wolfgang.Scherer@gmx.de > >> From: Dmitry Gutov > >> Date: Fri, 7 Feb 2020 14:03:21 +0300 > >> > >> On 07.02.2020 12:53, Eli Zaretskii wrote: > >>> I'll have to ask you to walk me through the change and explain how it > >>> solves the original issue. > >> > >> There are two changes: > >> > >> 1. Having the returned file names relative to the working dir instead of > >> the repository root. For that, we change 'hg status' to 'hg status re:'. > > > > Why do we want the file names to be relative? If default-directory of > > the buffer is set correctly, that shouldn't be necessary, and if the > > file names are absolute, then the default-directory doesn't even > > matter much. > > They are already relative, but against the repository root. > > And people want to open vc-dir buffers in any directory, not just in > repository roots. If I say "hg status" in a subdirectory, I by default get file names relative to the root. Wouldn't Mercurial users be surprised that Emacs produces a different display? (I understand that there's a recent tendency to make it easier to produce relative file names, and there's even a config option to make that the default, but I'm asking whether we should force this behavior on users even if their preference is not to.) > We could force the file names to be absolute, and then pipe them through > file-relative-name, but that's just extra work. I'm more bothered by the user-facing changes in this respect than by algorithmic details. Would it work to set the default-directory of the buffer to the repository's root instead? would that solve the original problem? If setting the default-directory could be a solution, I'd prefer doing that on the release branch, so that user-facing behavior is unchanged. We could then make changes on master to offer a defcustom that is parallel to the commands.status.relative config setting, and if that's set to prefer relative names, use your modified code. WDYT? > > This change should be in NEWS, IMO. > > It's a bugfix for an older, unintended change. It's not a new behavior. It changes how files are presented to the user, so I think it has user-visible effects that should be mentioned in NEWS. > > Also, is DIR guaranteed to be the directory where FILES live? > > Yes, see the description of dir-status-files in the top commentary in vc.el. Thanks. What about this question: > you are saying that "C-x v d" in a subdirectory of the root of a > Mercurial repository became broken in Emacs 25.1?