From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74352: 29.4; emerge-files with tramp + local file fails Date: Sat, 16 Nov 2024 13:21:32 +0100 Message-ID: <87ttc78j3n.fsf@gmx.de> References: Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74352@debbugs.gnu.org To: =?UTF-8?Q?J=C3=B6rg?= Sommer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 16 13:22:33 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 1tCHot-0006lD-Dg for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 13:22:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCHoS-0002w3-Nv; Sat, 16 Nov 2024 07:22:04 -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 1tCHoQ-0002vi-Jz for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 07:22:02 -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 1tCHoQ-0002Zl-An for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 07:22:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=8D/6xAgaaSjgFp6lnwRCEDSJoNDP9bHW2p7G7vBI6d8=; b=RE2UaLX1Hn+waW4u8LEU+Yzk5Z2h3OUDtwsODrCOEjvGymHrM/hh8l7bGiQmEXfu8I6ZTDZRVRYU4uNEI2qFzPDTKR3rAWBH7jLReVJ/Qno58yViRNfVMm8M+9BEWtDhwdnbp5K8ugAqaHoenXvpYi65p2QAedm7aLkPkEiTVeKsxut+o2L1ab0B0bLmOlek47G9fPewkvhD7neznCBuSzWA4BQi3hosVar/l3Vg9FAwEGCIPVE3t3QFViLjgQkk0nJ7wDw36rwiYYDLk9pdlP6HYyzUz+RS9mWHSCWUl8rdjeiKGtpcu3kFwgYkqFQVc7ZO/SGJQn+egeRv2Z/KwQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCHoQ-00086L-5s for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 07:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2024 12:22:02 +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.173175970931119 (code B ref 74352); Sat, 16 Nov 2024 12:22:02 +0000 Original-Received: (at 74352) by debbugs.gnu.org; 16 Nov 2024 12:21:49 +0000 Original-Received: from localhost ([127.0.0.1]:52362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCHoD-00085q-63 for submit@debbugs.gnu.org; Sat, 16 Nov 2024 07:21:49 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:42309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCHoA-00085b-MH for 74352@debbugs.gnu.org; Sat, 16 Nov 2024 07:21:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1731759695; x=1732364495; i=michael.albinus@gmx.de; bh=8D/6xAgaaSjgFp6lnwRCEDSJoNDP9bHW2p7G7vBI6d8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=CcizkOHPcqnJ5WVG/HzAq0ePj0NMrb+khmxAGliEhEPimxoC9ngrRfHqi7bLAAX9 9v2c/Dtmy5Nb2LtxXXWHZ3E7ZSaoFXkSN6vbQgv/JIKh98vdNo7cw2qvUUYndGNHn kR4S0gXrtqwIvd+fsxUmWq87zzgbLjYGmpWtaDTaExD3b8lebR4oaynsbeZZnEbex g7G6BiOtAouHegGMhue4G8yXaidheVY/mDr/eE0uTcsz67yFlxFyNhaTRETW1lnnk kEjB/S1NUFtSyiB+VQ5Ylzq/L91igiht1wCZaczlEhrCLXLpcdmm1os9Mvdq2z8Fz AbZV06OXb230iVFUww== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mn2WF-1teV9k146h-00ihi4; Sat, 16 Nov 2024 13:21:35 +0100 In-Reply-To: ("=?UTF-8?Q?J=C3=B6rg?= Sommer"'s message of "Wed, 13 Nov 2024 20:11:10 +0100") X-Provags-ID: V03:K1:WjeZYz8cFDhMVAHa93OHvfDhuXYUT+JSDZLtdS3WEmViE2T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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:295448 Archived-At: J=C3=B6rg Sommer writes: > Hi, Hi J=C3=B6rg, > when running `emerge-files` with `/ssh:remote:file` and `~/local-file` I = get > the buffer `*emerge-diff-errors*` with: > > ``` > diff: /tmp/tramp.wlcRNL: No such file or directory > diff: /home/joerg/local-file: No such file or directory > ``` I can reproduce the problem if file-A is remote, and file-B is local. Also, if both file-A and file-B are remote. If both files are local, or file-A is local and file-B is remote, emerge works as exptected. The crucial point seems to be that file-A is a remote one. > 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" > ``` 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 --8<---------------cut here---------------start------------->8--- (setq default-directory temporary-file-directory) --8<---------------cut here---------------end--------------->8--- instead of your change. Would you like to check? 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. I'm not an emerge aficionado (haven't used it until now). Would you like to produce a complete patch, based on my proposal above? > Regards J=C3=B6rg Best regards, Michael.