From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?J=C3=B6rg?= Sommer Newsgroups: gmane.emacs.bugs Subject: bug#74352: 29.4; emerge-files with tramp + local file fails Date: Sun, 17 Nov 2024 11:10:47 +0100 Message-ID: References: <87ttc78j3n.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mvj6c54xtf7etlmq" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74352@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 17 11:14:27 2024 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 1tCcIU-0008GB-RS for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Nov 2024 11:14:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCcIA-0008H2-3n; Sun, 17 Nov 2024 05:14:06 -0500 Original-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 1tCcI6-0008Go-DF for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 05:14:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCcI5-0002ZQ-Qt for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 05:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:MIME-Version:References:From:Date:To:Subject; bh=Aq0yyXGpZc+BeUa/+/pmZ2wILH+5eSVD/zj/yphy2tE=; b=GEuuVgsj7GKE5wN/FVFjayqxlnGQp84u/aAuaPkAqQqJlA/qC35w01HBSAPZ/dRME5NclPO1sqw7hKM4uG55Khnl2U6u7AyEcEMDFFklX8LgS5gTqDXz4JRfs9NVNihgCHcobLH1CK2yTz+8bhL9qrNXl0WJZNojou29wMCitxkTRH1r8r+xTFCPBNG3wjt0m4YnKw7oGdEla6DbWd6qmXSrsKUE9ZHZj97JYabPxOQZcpVTO+FGge+ERv1f+t4oi45xc/ooGcQzPOjjGfQMB/e84CIJCvgPiyIyIYE/zLg0esw1Kyp84Ln1Yjw+Lh4gbTNHjvGrMX+Fc/MJvnJXxw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCcI5-0001QX-MD for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2024 05:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?J=C3=B6rg?= Sommer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Nov 2024 10:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74352 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 74352-submit@debbugs.gnu.org id=B74352.17318383825401 (code B ref 74352); Sun, 17 Nov 2024 10:14:01 +0000 Original-Received: (at 74352) by debbugs.gnu.org; 17 Nov 2024 10:13:02 +0000 Original-Received: from localhost ([127.0.0.1]:55978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCcH8-0001Ou-3Z for submit@debbugs.gnu.org; Sun, 17 Nov 2024 05:13:02 -0500 Original-Received: from s1.jo-so.de ([37.221.195.157]:45393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCcH6-0001Og-5L for 74352@debbugs.gnu.org; Sun, 17 Nov 2024 05:13:00 -0500 Original-Received: from mail-relay (helo=jo-so.de) by s1.jo-so.de with local-bsmtp (Exim 4.96) (envelope-from ) id 1tCcEx-002HOO-2m; Sun, 17 Nov 2024 11:10:47 +0100 Original-Received: from joerg by zenbook.jo-so.de with local (Exim 4.98) (envelope-from ) id 1tCcEx-00000000kLF-17da; Sun, 17 Nov 2024 11:10:47 +0100 OpenPGP: id=7D2C9A23D1AEA375; url=https://jo-so.de/pgp-key.txt; preference=signencrypt Content-Disposition: inline In-Reply-To: <87ttc78j3n.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295515 Archived-At: --mvj6c54xtf7etlmq Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: bug#74352: 29.4; emerge-files with tramp + local file fails MIME-Version: 1.0 Michael Albinus schrieb am Sa 16. Nov, 13:21 (+0100): > J=F6rg Sommer writes: > > This change solves the problem: > > > > ```diff > > diff --git lisp/vc/emerge.el lisp/vc/emerge.el > > index ca48f2f3c7b..562041e4232 100644 > > --- lisp/vc/emerge.el > > +++ lisp/vc/emerge.el > > @@ -581,6 +581,7 @@ emerge-make-diff-list > > (setq emerge-diff-buffer (get-buffer-create "*emerge-diff*")) > > (with-current-buffer > > emerge-diff-buffer > > + (setq default-directory (file-name-directory file-A)) > > (erase-buffer) > > (shell-command > > (format "%s %s %s %s" > > ``` >=20 > The point is, that emerge calls the 'diff' program for either the file > itself (if local), or a local copy of the file (if remote). A consistent > solution is therefore to set a local default directory, like >=20 > --8<---------------cut here---------------start------------->8--- > (setq default-directory temporary-file-directory) > --8<---------------cut here---------------end--------------->8--- >=20 > instead of your change. Would you like to check? This works. But in the context of *emerge-make-diff-list* it is not very apparent why *temporary-file-directory* is used. Maybe a comment should say that *emerge-files-internal* copied the files there by *file-local-copy*. > However, this won't be a complete solution. There are other places in > emerge.el, where the temporary buffer for calling 'diff' must have a > local default directory. Are you sure? I see only one usage of emerge-diff-program in emerge.el. > I'm not an emerge aficionado Out of curiosity: Is there a better tool? --=20 "The future is here. It's just not widely distributed yet." (William Gibson) --mvj6c54xtf7etlmq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABEIAB0WIQS1pYxd0T/67YejVyF9LJoj0a6jdQUCZznBIgAKCRB9LJoj0a6j de4VAQCYqJbV6E+2Lipx+Piq+O1Q6Ov3p90PyA2GcN9QpvoYtQD+P+cRrqrZU89Z cY++KwKxwhBN5Mp550dpbpBs7ZTQPEY= =CaM1 -----END PGP SIGNATURE----- --mvj6c54xtf7etlmq--