From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 07 04:28:37 2024 Received: (at submit) by debbugs.gnu.org; 7 Mar 2024 09:28:37 +0000 Received: from localhost ([127.0.0.1]:52548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riA3I-0004SL-U4 for submit@debbugs.gnu.org; Thu, 07 Mar 2024 04:28:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:41124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riA3H-0004SA-3a for submit@debbugs.gnu.org; Thu, 07 Mar 2024 04:28:35 -0500 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 1riA2f-0006wv-BR for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 04:28:00 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riA2Z-00061W-4z for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 04:27:54 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 34AC0240103 for ; Thu, 7 Mar 2024 10:27:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709803669; bh=HnNh2pytH0OZUnDpO/81kiV8SxG6+RFZbbd+OT1LOp0=; h=From:To:Subject:OpenPGP:Date:Message-ID:MIME-Version:Content-Type: From; b=p9yBiwoRUk20k04P6/QZQbPWviOqq1XkjsgNZ3s+fIWE1fW2L8p6fS13Dod1j/tZP btSyt12QjKcx79hfe5Erqc/Bq708FxbSaOdHVG/5CYnCkPBTAQh70UA3pTlkZLDwD4 Nw2OvCtLSWMcV8fZlqWFdhRYC2H9wx+YKEM3KqxJu6R6hyH6SuOcVdh/Pmt9bZjPKm C17aZdgH4r6jccUOb2K1a7wOiY9YZVHbvQetOQnf2hq8IKoLt65sN6tyC02b0UBadS 4UOE4PrTjmw7IjBqdvexWjIqo7tT2zflIIJvDqh8awo1NFYaOmPVdJcR3u8Tucbf1E r0a4KTuhBAL4g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Tr3qm5mYPz9rxP for ; Thu, 7 Mar 2024 10:27:48 +0100 (CET) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] Ensure default-directory exists when generating diff OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 07 Mar 2024 09:27:48 +0000 Message-ID: <87v85yo0h7.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) --=-=-= Content-Type: text/plain When I generate a diff in some directory that I would afterwards delete, the diff buffer appears to remain in the now non-existent directory (according to `default-directory'), even if I want to generate a diff for some other file. The issue now is that make-process complains that it cannot set the CWD when starting "diff", and instead fails with a slightly confusing error message: start-process: Setting current directory: No such file or directory, /some/directory/that/doesnt/exist/anymore This would fix the issue, but I don't think the solution is ideal: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Ensure-default-directory-exists-when-generating-di.patch Content-Description: [PATCH] Ensure default-directory exists when generating diff >From 73a93310a9f38b15a7a849b75b4ea2b3805041ad Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 7 Mar 2024 10:06:48 +0100 Subject: [PATCH] Ensure default-directory exists when generating diff * lisp/vc/diff.el (diff-no-select): Fall back to the users home directory if default-directory is not a valid path. --- lisp/vc/diff.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index a64fbc47853..47566dbc40b 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -188,7 +188,9 @@ diff-no-select (list (or old-alt old) (or new-alt new))))) " ")) - (thisdir default-directory)) + (thisdir (if (file-exists-p default-directory) + default-directory + (expand-file-name "~")))) (with-current-buffer buf (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) -- 2.44.0 --=-=-= Content-Type: text/plain Any other ideas? Perhaps we should always set the default directory to that -- Philip Kaludercic on peregrine --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 07 05:19:53 2024 Received: (at 69606) by debbugs.gnu.org; 7 Mar 2024 10:19:53 +0000 Received: from localhost ([127.0.0.1]:52623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riAqv-0002xC-1d for submit@debbugs.gnu.org; Thu, 07 Mar 2024 05:19:53 -0500 Received: from mout.gmx.net ([212.227.15.15]:50021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riAqr-0002wu-Bc for 69606@debbugs.gnu.org; Thu, 07 Mar 2024 05:19:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1709806751; x=1710411551; i=michael.albinus@gmx.de; bh=kggf56Mf3dYjOZv4MaGb/hFkLg7Bi5UBKW3v6hHE684=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=FrQTRwtRsDlIlCax3eQm0xJ7hRo3UBmn9GxFAanWvBnRuE5seNbJOYsxuiADWq/J s7N84BDYrd1kPkPc1SyoPqzV+9SobNNNEcbGdpIAPE2pV/DPgQ6WMMww62epx+s9R HApbXSD4aNWEVFUD+lcIwu4ddEi0/XMQdfxBoMA94ew33fbyAYdCYioMBDfvkeNaG IJmauVwF3/bUn7yfore7k6yWDOUjYyf0Kswvz0j+XBo2uQuN9mTuGLQ/ZwGF7BuAM RcFCM+8loC2D6X+pPOHp5pULj0qXucFii8K+kxexUQkbiyOsKd8+SOjQB8Xb7B3P4 FtzUczCvd+FVLTQ02g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.16]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mv2xO-1qrJAl0BdY-00qxi4; Thu, 07 Mar 2024 11:19:11 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87v85yo0h7.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 07 Mar 2024 09:27:48 +0000") References: <87v85yo0h7.fsf@posteo.net> Date: Thu, 07 Mar 2024 11:19:10 +0100 Message-ID: <87bk7q2vkx.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:CWWIlHDs20E/K51oMmNPlzDf+dzQN+esKlnYU/EpySaWA1IQR/z hPsLKJrWtC4BauNwRyP3MjRw1dH3kOvRWi4gBdvr69s5mG+9yX41L25EhmnKRHT7XHBpIFB jvDUg0ztZcQHE5fPkSG6qyWBEwYP8/lnPv05Pk5/jnw4cR13aSsDg9yt88qu/NX6/Bd3NNR 6I3N8vcUdxrbkmUKzDbcw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:OE7KZlw7M2I=;jI7TJKSOOzavIo22LjKJQW7KWi/ VTosB2ComUjJI+/Wl0+C3kyXWHZNGX79nSMuxwkjER1zRGGmEUHNiyTPdoQlWznu3HuYj/9Yw 9khrxNNo9D3H8HLjV4WmqtnsSaJcSXlxXPu4NfvJkI6f00VNwcX4+b/CA6ccMBXSxjiiZXoim dXc4NJXvuDfTLOv9eH9o5qQlB2rvKcBhHQPUUuqx0ZeKK2ZkZUepEKSMFQOtUeIfgHO69Ofel WqN3JG5I081A5FV7eH63z1e/cAjtO0ioQvULUXvCeKbZ/k1wTCJMQirQ95fSZbg5VwWSx1uMa jRoYxFf2bLTTvii1AFwZVf6eEIF61AqdTP+WF0Y5jjxgONS/6OAXCW8ZyZ4AkgUnvRHLiL14P JrOyhDCtrA6EpChVNoZErVxnaLzZ7xki2jjLSU2fBe+Nt5LT4/pvKUHp7C7ewBd1sHubOwUcs PZ/vHhKU+6095TYwjnWErVWzwDNzflIRAol79n1UP+EcfB/emqNWOHiZk8sO59DdQK4Nvk9Ms ZwkxknpgiGTQYLLvhhLsdK/IsmyvFN+T2rx1m/GeiWt3p0B93TuOH3KDILcRbZg2TQ0acA6tu 3iQkMHeWUjV8OX7fReJRKnOOO8grY/8QOyOwKGTKr9xpT1gZMCMo4j6+F0ldErRyCiVSoBK9r Zfx4+M2idAfs6GFtcFt6SydYwWrvoLJsJZIx4OdxU61efqRJsBu/FekPrEvZ/3gSPtVBY8Sq7 c2LoDnfQU+UZQL1/EdzC/DYOlsg0IUr7mRbEdssnUXzW47LGATd/TsDdKMbEAHycg89NiQecX EOqEbZ5WNxLLgJ6xdKsIwCbLNMvqv6Dlz1lvhDp3CCS50+qAGVuSxVRBtGfKGTa+pv Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Philip Kaludercic writes: Hi Philip, > diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el > index a64fbc47853..47566dbc40b 100644 > --- a/lisp/vc/diff.el > +++ b/lisp/vc/diff.el > @@ -188,7 +188,9 @@ diff-no-select > (list (or old-alt old) > [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.39.16 listed in zen.spamhaus.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [212.227.15.15 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 69606 Cc: 69606@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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Philip Kaludercic writes: Hi Philip, > diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el > index a64fbc47853..47566dbc40b 100644 > --- a/lisp/vc/diff.el > +++ b/lisp/vc/diff.el > @@ -188,7 +188,9 @@ diff-no-select > (list (or old-alt old) > [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [212.227.15.15 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.39.16 listed in zen.spamhaus.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Philip Kaludercic writes: Hi Philip, > diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el > index a64fbc47853..47566dbc40b 100644 > --- a/lisp/vc/diff.el > +++ b/lisp/vc/diff.el > @@ -188,7 +188,9 @@ diff-no-select > (list (or old-alt old) > (or new-alt new))))) > " ")) > - (thisdir default-directory)) > + (thisdir (if (file-exists-p default-directory) > + default-directory > + (expand-file-name "~")))) > (with-current-buffer buf > (setq buffer-read-only t) > (buffer-disable-undo (current-buffer)) I would use temporary-file-directory (or even small-temporary-file-directory). Spamming the home directory with (temporary) diff files doesn't sound like a good idea. > Any other ideas? Perhaps we should always set the default directory to > that Perhaps, but I don't know whether there are undesired side effects, for example when using relative file names. OTOH, if default-directory is remote or unwritable, we might have problems anyway. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 02:48:11 2024 Received: (at 69606) by debbugs.gnu.org; 8 Mar 2024 07:48:11 +0000 Received: from localhost ([127.0.0.1]:56265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riUxe-0001Ae-Vg for submit@debbugs.gnu.org; Fri, 08 Mar 2024 02:48:11 -0500 Received: from mout02.posteo.de ([185.67.36.66]:59101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riUxc-0001AP-4q for 69606@debbugs.gnu.org; Fri, 08 Mar 2024 02:48:09 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 173B0240103 for <69606@debbugs.gnu.org>; Fri, 8 Mar 2024 08:47:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709884050; bh=oiiFDjLVHWIFLZt0dvWaFiNGbVDmRC8y8tFppLIieJQ=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=B99oQYoHSFEqDROUH03H2liTLT51k/werBlcV2sQC/n0kXGIhP4O9G8Bmi/iXDQBR ymYxZo1nGIgd/l+Rba4dOGLY/t3TFUdiq70XYS7cfUt3OfUEmq3hTlJu1Va2IldGDG eTLuA7XU/w92Z6bOSrRAQpwDAVE6XhHsYzdWZf97sAX/vrI5J7iaic0P9LPe6XcdWB TNtfGBldU7WK5Sy/eUB4672wseZkvi6Cml60IPxar8p8ZkpjYFSiOrFffFK00VhfZk +lpDvar/QDvxdxKs23OiQc4smR8ldwlfiYo8Gr6jkKi7Q5VCEdp+XGsl1PMtuKVros UGuemxOYSlNFA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TrdYY3ltPz9rxF; Fri, 8 Mar 2024 08:47:29 +0100 (CET) From: Philip Kaludercic To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87bk7q2vkx.fsf@gmx.de> (Michael Albinus's message of "Thu, 07 Mar 2024 11:19:10 +0100") References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Fri, 08 Mar 2024 07:47:29 +0000 Message-ID: <87sf115fn2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69606 Cc: 69606@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 (---) Michael Albinus writes: > Philip Kaludercic writes: > > Hi Philip, > >> diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el >> index a64fbc47853..47566dbc40b 100644 >> --- a/lisp/vc/diff.el >> +++ b/lisp/vc/diff.el >> @@ -188,7 +188,9 @@ diff-no-select >> (list (or old-alt old) >> (or new-alt new))))) >> " ")) >> - (thisdir default-directory)) >> + (thisdir (if (file-exists-p default-directory) >> + default-directory >> + (expand-file-name "~")))) >> (with-current-buffer buf >> (setq buffer-read-only t) >> (buffer-disable-undo (current-buffer)) > > I would use temporary-file-directory (or even > small-temporary-file-directory). Spamming the home directory with > (temporary) diff files doesn't sound like a good idea. If I am not mistaken, the command does not create any files, the output of diff is written directly into the *diff* buffer. >> Any other ideas? Perhaps we should always set the default directory to >> that > > Perhaps, but I don't know whether there are undesired side effects, for > example when using relative file names. OTOH, if default-directory is > remote or unwritable, we might have problems anyway. I don't quite understand how, but it seems that some specific sequence of commands can start diff in a directory I just deleted, without this being necessary. The reason I was thinking about a more general solution, is that something like --8<---------------cut here---------------start------------->8--- (let ((default-directory "/this/does/not/exists")) (make-process :command '("true"))) --8<---------------cut here---------------end--------------->8--- will always fail, even though "true" doesn't use the current working directory. I think it would be useful to have some :fallback option for these situations, to ensure that if `default-directory' doesn't exist, any other directory should be used instead. > Best regards, Michael. -- Philip Kaludercic on peregrine From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 09 11:46:39 2024 Received: (at 69606) by debbugs.gnu.org; 9 Mar 2024 16:46:40 +0000 Received: from localhost ([127.0.0.1]:34700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rizqJ-0003W2-Ki for submit@debbugs.gnu.org; Sat, 09 Mar 2024 11:46:39 -0500 Received: from mout.gmx.net ([212.227.15.15]:38469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rizqG-0003Vf-Q2 for 69606@debbugs.gnu.org; Sat, 09 Mar 2024 11:46:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1710002757; x=1710607557; i=michael.albinus@gmx.de; bh=tkQb+HCXPXi3oh/Vmwr73luKiHTIdiCIE8dPoQfujaw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=E1E2uVAblfgql9Ocz8gizECLYsEnO0c+e3H32eoQpbLwWQoxN351uUSYHi72d+SC Q7Q6J4RN+6pDdo6rT6gy3uD08oKjIgDQkXk1V3lh7vPY2cqTY80i9D9z/OwURQoUB eG2MOCD6uKvAgson39DkKD323QELLCfeHNW+psUHKx1r2zWQ1rub95i3PK4gWQjUm yMDuEW0kw9zCTZuBnFrrOWh1/8aKSi7kiMm8TSNII3lx8POzcqt5f2c2r0/thvYc5 yKh9pDe+J2Xd0z0VxGAV98XvOUnfG7qo5D7f55S0lGomopcnVxucchvswieV6j4xC PAxB0+3Nz/NYg+bqGg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.16]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M9nxn-1rmYjo1Xlt-005mYd; Sat, 09 Mar 2024 17:45:57 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87sf115fn2.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 08 Mar 2024 07:47:29 +0000") References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> Date: Sat, 09 Mar 2024 17:45:56 +0100 Message-ID: <8734szz73v.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:UwUF1KxMH9GNmQY2Lg9P2lP+mjWXVllr6M/FqEFxFeSvGNJddbf 0ciE6M5GRShS0MORwOPiGm0HoRuY4naaWucIoHEyE4VOPgRMOqXQChlrd5do7HSvn2QCSwg rFWYHRnSNqNwviQ04z8xGrD668lMsGUGFmyqzrk7yWXlD548SSq9VkLUgCXi0IewLel6v8w 9NWN4Zm/kQiCnUoz9ywTg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ryLRTJuttls=;IhpNrN2s0akAIv0tVWozEJ+e96x XECgmRmq1MF8NaDWFRRWfnD40jS2kDtZfrDrM0wqn7WfqoS7jnHvv5dJXO475jEEvff7ojQxA RHYcp1R90Ob46KTKfFA6KAi8tGuPkr0OPJrqfsXRKuzDPo3vQkxPbZRmwKdl4vV1GefamiFMi gZPym1L1VQ2rXEryTILHYAklGn3jcXqdd0C+XlVmNhbxwhxJ4GyqHMjtPkRD4GDqjt8b7rBo9 U8BE6IS/ZgiQ49EkNyYAo0Yt6BbK2kaSrmHCQxiZK3ubQM7nveRv0+LrIFVnAIHBJ2sRU1cMG pPzG2xURHW+1yyAlh3q/2k0tMvOKmEffPvqqshCTW8Z8WvH7GdjZJGkAdluE/Usb2Yime/lUM ewvSK6Jrrwyo7+cEJhg8qyLsdaVSKDWeHGiPNm5gPQ4CgP+Xz8UViKORM0fvj2KHUgjC0efF3 brB8gi+XPshrkJ/e7k7uDBWpyq8NeihoMWaCnB8kHlgtzkkZcUqdNYFtlQoZEj9YCfppcvHo7 anebt1EkxWgAN0vpXD7VmvwyhQkeTJgJORma6ei879X73tAwXWDPHFJSLeKxwh0lPbHGxgq8C o70nFWtGneQpGs5beMCRbRhCiCtFrsYKPPPvUSWTBZ9SoE/E8klR4panXnW3Cmq9SyRGPweJE F/dcpsGdpDCo394oFYqmM0Voe3zxLUWfRPFlPAWw5LBdyIgfjweRfJVzp7B+zJXkIP/EIjIEb ENz6ZjmhlLKUl9wSKtU6OFjKrib/Jw9/aJ3krq9rhuypQZAeLiE2NUfIAXT5iUMPgcrvq9o2d wRSPLNpDo9nGDFq6D758Hp2pfihXmKN3+dHLQ9EnU1X+B24UzIBG+vpqeXP2SYOm5V X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Philip Kaludercic writes: Hi Philip, > The reason I was thinking about a more general solution, is that > something like > > (let ((default-directory "/this/does/not/exists")) > (make-process :command '("true"))) > > will always fail, ev [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.39.16 listed in zen.spamhaus.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.227.15.15 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 69606 Cc: 69606@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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Philip Kaludercic writes: Hi Philip, > The reason I was thinking about a more general solution, is that > something like > > (let ((default-directory "/this/does/not/exists")) > (make-process :command '("true"))) > > will always fail, ev [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [212.227.15.15 listed in wl.mailspike.net] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.39.16 listed in zen.spamhaus.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Philip Kaludercic writes: Hi Philip, > The reason I was thinking about a more general solution, is that > something like > > (let ((default-directory "/this/does/not/exists")) > (make-process :command '("true"))) > > will always fail, even though "true" doesn't use the current working > directory. I think it would be useful to have some :fallback option for > these situations, to ensure that if `default-directory' doesn't exist, > any other directory should be used instead. This is a more general request than just make it work for "diff". Well, there is a reason that `default-directory' isn't set to something else behind your back, if it doesn't exist. Processes can use relative file names as arguments, and it is always better to fail with an error message instead of doing something unexpected you even don't know about. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 11 22:34:17 2025 Received: (at 69606) by debbugs.gnu.org; 12 Feb 2025 03:34:17 +0000 Received: from localhost ([127.0.0.1]:59976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ti3Vx-0004lh-A1 for submit@debbugs.gnu.org; Tue, 11 Feb 2025 22:34:17 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:44525) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ti3Vu-0004lP-M8 for 69606@debbugs.gnu.org; Tue, 11 Feb 2025 22:34:15 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5de63846e56so7258079a12.1 for <69606@debbugs.gnu.org>; Tue, 11 Feb 2025 19:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739331248; x=1739936048; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=S4p/l2uDwWRKWErF2X+AWxPdc206w5opzbVSawBzTKo=; b=kZYl6ZEfLcx1Awk6+5eWadYKSUWGqwYqiDimVgssZ6rsNO9mTikM7ayDwlhc1STD2q JRFnstKOY7YkimTuTef9zGk09cs1f+KcptYt8lPLx7iH4F23jxdHsaWSKI8nwDMTMCBd Tyc29aH8cEauswwRhxTvorqEHkNhEVGmSsjMDlrBhJABDsMv0ICfCfxcDJDPkJKqBwPo +FaBNNZfrARPeOmqpASz2FwLZAFy6KGHr0uMxlIEmNBxiLUg2k/2lnjmQ5C3UKADHILG VSh6uEy+amg41QXjD0XqZzoa1Y/ow5m9yw3EYujNbEoe44bK8S9Sa77pumESkcDRFR17 GxbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739331248; x=1739936048; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S4p/l2uDwWRKWErF2X+AWxPdc206w5opzbVSawBzTKo=; b=U0PX2A1nf1t8eFcn0OBqN2jQBFCQFI8HfY5P7oNyxYZMfbaupczsdFHqkgpNRyAj4H vGAc+Lej7unDo0EsDzTkjEXFEvYs2+L+eRgqriIUUmT4jlmx7Gj23gQIeAzw3+gIRbl+ xk/DFymojX075bw78aRlEhO7XGBO3u6wMZFqL2PszfSfoV6zKKUmOg6q3EDgocW8HVdD 3V5wxg/GiMISQf2214NV7PgXOSRIa2jk/7uSc7FYviUlhmMGJO+L61CxUYgmP04rAMYi twoParx4opkQnBpXKDBlIeIEXqKHCSRbxscjxAIAJag90fAVDCCBaYYCiiuhUrXhkIMh 3g4A== X-Forwarded-Encrypted: i=1; AJvYcCWbmi68VOv4UcsaWtMKDTqejoU5mH0wAQvFCxQxt2qmo4cTmd9Ct9VT15Qpn2OfYeuJqcA4Lw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzZqxwvetKJJ69E56oHyHlRjAkB3//CeZ7Rb6MsymbKiB0gtG+f 3AsNEb5qDGhc6HpNGSjdCOP+Qx2InGJmXb2674S69TqjwKVexvtmEMaqEgWsehDeYVvs3l8mokT YITfPYCPRADZ2FXpwGzyDI4NwFJQ= X-Gm-Gg: ASbGncv3lze4NEypjTnbXG39INGMBhpRYFxHjDfE1NpEv/cqYZXx8HmqEJiksNL88vb C+31tbmNEw8n8dZ46bbW5HinhsKzHD3/TpSmTwnwBFuvuqsKwinJdsNHLNEciBuf6w/YFryP/ X-Google-Smtp-Source: AGHT+IFUQiuSpLfK5dv/JNKWMooxtFiYPtZGvarpr5lLtSLBQFRONErXwbqR2nnb52faqfoq/QIDhnn2kp1Hp4vkJ2A= X-Received: by 2002:a05:6402:518e:b0:5de:4add:d52f with SMTP id 4fb4d7f45d1cf-5deb0bfbe76mr719860a12.32.1739331248260; Tue, 11 Feb 2025 19:34:08 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Feb 2025 19:34:07 -0800 From: Stefan Kangas In-Reply-To: <8734szz73v.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> MIME-Version: 1.0 Date: Tue, 11 Feb 2025 19:34:07 -0800 X-Gm-Features: AWEUYZlx0WluYsu9nu_DfQF-ymNc37iK1mE0MqMBJdss8KQETl3-LFhJi1kXBXo Message-ID: Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff To: Michael Albinus Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69606 Cc: Philip Kaludercic , 69606@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: -1.0 (-) Michael Albinus writes: > Philip Kaludercic writes: > > Hi Philip, > >> The reason I was thinking about a more general solution, is that >> something like >> >> (let ((default-directory "/this/does/not/exists")) >> (make-process :command '("true"))) >> >> will always fail, even though "true" doesn't use the current working >> directory. I think it would be useful to have some :fallback option for >> these situations, to ensure that if `default-directory' doesn't exist, >> any other directory should be used instead. > > This is a more general request than just make it work for "diff". > > Well, there is a reason that `default-directory' isn't set to something > else behind your back, if it doesn't exist. Processes can use relative > file names as arguments, and it is always better to fail with an error > message instead of doing something unexpected you even don't know about. I tend to agree with Michael that we shouldn't make our fundamentals to DWIMy. But this bug fix is clearly useful, though I'd also agree that we might as well use a temporary directory for this instead. I'd also set the file mode to 600 so that we don't inadvertently leak user data to random places on the file system. Philip, could you update your patch along these lines and install? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 09:07:50 2025 Received: (at 69606) by debbugs.gnu.org; 16 Feb 2025 14:07:50 +0000 Received: from localhost ([127.0.0.1]:32946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjfJG-0005Ts-6X for submit@debbugs.gnu.org; Sun, 16 Feb 2025 09:07:50 -0500 Received: from mout01.posteo.de ([185.67.36.65]:45737) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjfJB-0005TW-Hn for 69606@debbugs.gnu.org; Sun, 16 Feb 2025 09:07:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 21712240027 for <69606@debbugs.gnu.org>; Sun, 16 Feb 2025 15:07:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739714859; bh=m4Vny/hRc9wIHgq0LZutvwj3sRoxsfdJpLFqc34NBYk=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=JfiQPxmBKzoLkinEWGTfiYRh3M9hDD3mf4/z7IuD2m0vaQDGINwVFky/XkoABIkWM Xdb0t8FJn2rihbr1saMAhxwoEQwaI1deHJUh8hVs/Ey892lx4sbqPxPLUd/I84k05Y ftUpqE+dSoykQLXvgHx9kI5fbzKwfMBxzEbDf810jUP6CeOaz9rCuEmJ7DqXzisfWI vXR2FIFNK2dKxjfbGcSlIhDVJjUYq0fPUmQ0Q7SB20+tEcFDYKKDbYwTuaJYY89qSD LYJ292sfNJxUkd7i2ZChwe5iHrAl+rfd3mlBLsmSUpu7nMb2gMPsR4YsCunYmvhgy7 R1+8PLcqBfzKA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Ywnfy0VRjz6twf; Sun, 16 Feb 2025 15:07:36 +0100 (CET) From: Philip Kaludercic To: Stefan Kangas Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> 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: Sun, 16 Feb 2025 14:07:36 +0000 Message-ID: <87ikpac79z.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69606 Cc: Michael Albinus , 69606@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 (---) --=-=-= Content-Type: text/plain Stefan Kangas writes: > Michael Albinus writes: > >> Philip Kaludercic writes: >> >> Hi Philip, >> >>> The reason I was thinking about a more general solution, is that >>> something like >>> >>> (let ((default-directory "/this/does/not/exists")) >>> (make-process :command '("true"))) >>> >>> will always fail, even though "true" doesn't use the current working >>> directory. I think it would be useful to have some :fallback option for >>> these situations, to ensure that if `default-directory' doesn't exist, >>> any other directory should be used instead. >> >> This is a more general request than just make it work for "diff". >> >> Well, there is a reason that `default-directory' isn't set to something >> else behind your back, if it doesn't exist. Processes can use relative >> file names as arguments, and it is always better to fail with an error >> message instead of doing something unexpected you even don't know about. > > I tend to agree with Michael that we shouldn't make our fundamentals to > DWIMy. > > But this bug fix is clearly useful, though I'd also agree that we might > as well use a temporary directory for this instead. I'd also set the > file mode to 600 so that we don't inadvertently leak user data to random > places on the file system. Temporary directories are 700 by default anyway, so I don't think we need any additional provisions (especially seeing as if I am not mistaken, diffing doesn't create any files), which would just bloat up the patch. > Philip, could you update your patch along these lines and install? Sure, hope this is OK? If so, I'll push it: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Ensure-default-directory-exists-when-generating-diff.patch >From 761ee105380c60bcf410e3f3f6e15af8073b1549 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 7 Mar 2024 10:06:48 +0100 Subject: [PATCH] Ensure default-directory exists when generating diff * lisp/vc/diff.el (diff-no-select): Fall back to a fresh temporary directory if 'default-directory' points to an invalid path. --- lisp/vc/diff.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 70497a97d56..1aa4f87d1ea 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -188,7 +188,9 @@ diff-no-select (list (or old-alt old) (or new-alt new))))) " ")) - (thisdir default-directory)) + (thisdir (if (file-exists-p default-directory) + default-directory + (make-temp-file "emacs-diff" t)))) (with-current-buffer buf (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) -- 2.47.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 09:21:33 2025 Received: (at 69606) by debbugs.gnu.org; 16 Feb 2025 14:21:33 +0000 Received: from localhost ([127.0.0.1]:32987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjfWT-0000jR-Ua for submit@debbugs.gnu.org; Sun, 16 Feb 2025 09:21:33 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:56570) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tjfWR-0000j9-1g for 69606@debbugs.gnu.org; Sun, 16 Feb 2025 09:21:28 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5e02eba02e8so2050545a12.0 for <69606@debbugs.gnu.org>; Sun, 16 Feb 2025 06:21:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739715680; x=1740320480; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=FIRPcrU3QHtQgbJmzHidQEgLlCmdnSyU+b7lo15/5uM=; b=WKhW5wjlur5EC93QanT8jMSjRa0BvDwLhq68ip9cn9wHsnUDz1mkEJg0EohBPZ4AVZ ESElieoYzLEt0M5rsq0IhJofbqXmxrSLVzMuFg/vMPCTSdVoC5e4tC8iYmKMZFuFeNdA i4IO16wNt6Fnd9cxVtnrieKO0ujc75FqYKi/4ytCTJQ7TG4itfwuxgbgeV97N4amBrkL TjpTcU/ksAapdWqyJ6AGuo9Vm2TIfOftKSI8GiEOFqNKc0Byw7WEmyjat+PSHTZ7lfgF lMs1nFWnP7cjVNt3zFpksIeEnwnLLooABRs0QLZYkhnAu0qGJ86D/9lr96guwX9278Nt /P0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739715680; x=1740320480; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FIRPcrU3QHtQgbJmzHidQEgLlCmdnSyU+b7lo15/5uM=; b=mftKAcKvI+ap4vLImjfuxGWtdl2c0WUSAPBz+NdpOgLhlKs3rEkyhQPMc1nVr60V9H ikzYqWdC7/0J4ql7FyvoVKlifA3jeEKSTgGksTkNTMPYySsOpOWB76f2OwZhksZMqB4L luc+gg5WNpwltM3CW4edOQRHKIg2EGt47lkGSzzxey7cGqkP/sEOUGTNA0Fn64DWMA8i bT6aSZ4jPOSl5PniBJbIfWI2xQPn8Za2TrrxYJ7xIi3eMqvDQsGsE94o1IjZs7qMx7jI IcvEDOH8ix3pi6RMKzrAvr1sOYrKtJzumqgk7tO9zoTeyJmn/eH1sjCz1vh0MVp+lUHx 1Uig== X-Forwarded-Encrypted: i=1; AJvYcCUBed2KoZ2QQr3NFqiUEsm9Ga5f7dNqvz7bD6n2dcJWBOlNcw1MlXGn9LkEhRMYaX+e226vsw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxpVlk+orR402IuJ0ch2AOtl0NFJt5M/pARTlvtik5G5DX/L2Yd Rl3F+Cc7iUHWUQj6c88j/HWPUROiEDUUl+Pis47WmYuAnpLrUle8DcQ6tYEa2mOyVvKLHCLIDXS xlrAyq1fEzuyykyeFh+Rat8P3vus= X-Gm-Gg: ASbGncvytaEYuHqxkbeSmYiVfCz0wBcf6XDm6lizENvpRCYw98TGW/Fk0c9oRStGWpb Ok3H8w9huFO6XV1lwNnkaV8mcFSmgU4QWrr7jR5CWYrcKcIY3VJN5xz7HgbeGtQ+y3KiTAh0kMM Q= X-Google-Smtp-Source: AGHT+IG0tR8j+bTXsw0h5sK367UonF268CMhtpPzGsOxXd5NgPF9I2q5Z7q5KVztMdsL2Z+v5nXlhfzNvTikPNotJls= X-Received: by 2002:a05:6402:5246:b0:5dc:ad49:ba1a with SMTP id 4fb4d7f45d1cf-5e035f2631bmr7940702a12.0.1739715680015; Sun, 16 Feb 2025 06:21:20 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 16 Feb 2025 14:21:19 +0000 From: Stefan Kangas In-Reply-To: <87ikpac79z.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> MIME-Version: 1.0 Date: Sun, 16 Feb 2025 14:21:19 +0000 X-Gm-Features: AWEUYZk4Zgw6r4KZChqqIwC6OyGPvEMcZbYvCdBjqaKCCP2tvR5zVoGjkPOT7uc Message-ID: Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff To: Philip Kaludercic Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69606 Cc: Michael Albinus , 69606@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: -1.0 (-) Philip Kaludercic writes: > From 761ee105380c60bcf410e3f3f6e15af8073b1549 Mon Sep 17 00:00:00 2001 > From: Philip Kaludercic > Date: Thu, 7 Mar 2024 10:06:48 +0100 > Subject: [PATCH] Ensure default-directory exists when generating diff > > * lisp/vc/diff.el (diff-no-select): Fall back to a fresh temporary > directory if 'default-directory' points to an invalid path. > --- > lisp/vc/diff.el | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el > index 70497a97d56..1aa4f87d1ea 100644 > --- a/lisp/vc/diff.el > +++ b/lisp/vc/diff.el > @@ -188,7 +188,9 @@ diff-no-select > (list (or old-alt old) > (or new-alt new))))) > " ")) > - (thisdir default-directory)) > + (thisdir (if (file-exists-p default-directory) > + default-directory > + (make-temp-file "emacs-diff" t)))) > (with-current-buffer buf > (setq buffer-read-only t) > (buffer-disable-undo (current-buffer)) > -- > 2.47.2 Can we please also remove the temporary directory when we're done? From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 11:18:12 2025 Received: (at 69606) by debbugs.gnu.org; 16 Feb 2025 16:18:12 +0000 Received: from localhost ([127.0.0.1]:36494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjhLP-0001c7-TZ for submit@debbugs.gnu.org; Sun, 16 Feb 2025 11:18:12 -0500 Received: from mout01.posteo.de ([185.67.36.65]:57623) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjhLL-0001bV-Mu for 69606@debbugs.gnu.org; Sun, 16 Feb 2025 11:18:09 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B87E4240027 for <69606@debbugs.gnu.org>; Sun, 16 Feb 2025 17:18:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739722680; bh=FkROoUG4ZfiNjd4KKjMV8myJLX60hHUeT7hQ0S5LgL4=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=NeFVxx3C72zM+b9QwbIVM4QTRyvGzgWXQiRWtGs3JRayn8f3xN5HftcwF5dShagP2 H/YUy8uu0pS4uzQwG2mqFyaU3G2FCPqjmeVBf0/VCpV1wbDzJpejdyG21WcsOqZCxs OnGm5vysFt+AIyXhwHui+N8mEgPq2oVvnsLQhH8QTjGZ2J3XoPcWa+GhvTkwnxjeL+ 8LqOfvKstnEW47wIXxiFNcmSSeL5mWj9/2Zqbj56pJwWBXeUXyoJwm7lLr0cu2V+ai e6QTm9KZGFfI6abmejIs5S4PvGFrdAZ0nfDUXpNWKfrz1LhXGkZJhkWchJSkm/IpYE 47FJzsQLjFxuw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YwrYM6zyFz9rxK; Sun, 16 Feb 2025 17:17:59 +0100 (CET) From: Philip Kaludercic To: Stefan Kangas Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> 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: Sun, 16 Feb 2025 16:17:58 +0000 Message-ID: <875xl9dft5.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 69606 Cc: Michael Albinus , 69606@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: -4.3 (----) --=-=-= Content-Type: text/plain Stefan Kangas writes: > Philip Kaludercic writes: > >> From 761ee105380c60bcf410e3f3f6e15af8073b1549 Mon Sep 17 00:00:00 2001 >> From: Philip Kaludercic >> Date: Thu, 7 Mar 2024 10:06:48 +0100 >> Subject: [PATCH] Ensure default-directory exists when generating diff >> >> * lisp/vc/diff.el (diff-no-select): Fall back to a fresh temporary >> directory if 'default-directory' points to an invalid path. >> --- >> lisp/vc/diff.el | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el >> index 70497a97d56..1aa4f87d1ea 100644 >> --- a/lisp/vc/diff.el >> +++ b/lisp/vc/diff.el >> @@ -188,7 +188,9 @@ diff-no-select >> (list (or old-alt old) >> (or new-alt new))))) >> " ")) >> - (thisdir default-directory)) >> + (thisdir (if (file-exists-p default-directory) >> + default-directory >> + (make-temp-file "emacs-diff" t)))) >> (with-current-buffer buf >> (setq buffer-read-only t) >> (buffer-disable-undo (current-buffer)) >> -- >> 2.47.2 > > Can we please also remove the temporary directory when we're done? Sure, this should do the job: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 1aa4f87d1ea..bb509d0d4e3 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -188,9 +188,10 @@ diff-no-select (list (or old-alt old) (or new-alt new))))) " ")) - (thisdir (if (file-exists-p default-directory) - default-directory - (make-temp-file "emacs-diff" t)))) + (use-temp-dir (not (file-exists-p default-directory))) + (thisdir (if use-temp-dir + (make-temp-file "emacs-diff" t) + default-directory))) (with-current-buffer buf (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) @@ -220,6 +221,8 @@ diff-no-select (call-process shell-file-name nil buf nil shell-command-switch command) old-alt new-alt)))) + (when use-temp-dir + (delete-directory thisdir t)) buf)) (defun diff-process-filter (proc string) --=-=-= Content-Type: text/plain Or would it be better to keep the directory around and re-use it? --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 13:31:36 2025 Received: (at 69606) by debbugs.gnu.org; 16 Feb 2025 18:31:36 +0000 Received: from localhost ([127.0.0.1]:37249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjjQV-0005Qt-QJ for submit@debbugs.gnu.org; Sun, 16 Feb 2025 13:31:36 -0500 Received: from mout.gmx.net ([212.227.17.22]:33607) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjjQS-0005QR-OT for 69606@debbugs.gnu.org; Sun, 16 Feb 2025 13:31:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1739730684; x=1740335484; i=michael.albinus@gmx.de; bh=GzM3gyKOpmB924biq8G3fiyrUUS6mC3OUaBjpF8Q82s=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=Yjtq37Hnxn2v3AtMGExUx3c5Jax+3kWeEM6r3gevTPzygwQeyXxtb7vpaDVRE6sW QDrF9khD0USrcT4MwLuGzy2+10DrDAcsCiDGAypsppyv3FWaHFUd5g1crpkqBIoGc fmL/tqK2rzNw0A6/u0ZQO6eCoRzTnYtuIobeT04b3hhRNLfudQEv/XVULXLVMlkB0 s+vXkHUKFIRuxeEa97rXRxnoNIDsq1I1pMiWZ5iczm7X6c2NUHkDPSSbbI+EiMQcG ZDq8noye0929cQXQJtSdJH0oGSpu6AaLw0dSHI1lE/ZGkFZ8BM1Z/iqbx9/jOWZxG rr9FdC3FHrICHBmHfQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mnpru-1sz5r419J4-00bxk5; Sun, 16 Feb 2025 19:31:24 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <875xl9dft5.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> Date: Sun, 16 Feb 2025 19:31:23 +0100 Message-ID: <874j0tg2ro.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:8NlUFelTH+lXxtBG59j2sG8LXE7uznWc4kpU3hk9W0u15dtyoB5 otrS5+tJW6OGkBxYlEdN7d9lMaY4JSU4rvvX2z1cxRSGIemugP+a8UXxZqjL/S6UdUD8oJG gzzJ8dDvNzmDThmwqR4Pl5m0d6alVHONbbkeMHGat1v7OlaS5TXgvOvuZp8BnoaGnqmaJww AdrQnmR862GZNwfRJRn6w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:MBUna0E9cVE=;9ENiSznM6BG6ohC5DerGC85F5QB BTK7h0nTzd/MB5kYK7/OYYRi2lHf2Vyx9LXm5oejgunGDMQpxkq+BqpXRqDKn/5BzB4s4WrcJ kiU5X87b/4kfrbM1M4ccJt7qEhBXQNDkO4EFA6ts556CrJa3RDaDdTXrKsymJbadpRUd3a83S NXPBqddCqmMXdZvxUvnaNhRj7+rX4WCNr/tRb8A4xluASXpRqrg/PNIATAyB56MPsZxQfGog9 WrU33d3B/raiDUpe3O+jC8F1/kH6okgplJEMsSjSPKhC3d/0Zm/JcjrJMRzVwRNrJMSssn7uG l63cjNBtElsUzYg6UOrA82jrOPHTElULerm2/fSbBJ0QiLOmO6oORcTFiVI2CkA/aOdE+Q9mW uUze4uDmqjD6dqsp40lOKngI8Vr6eMVqe3UaHUnR1f/bzR98A0eYsqL7Iulvs26CeBoej9Snr Wi6pdfLUtC2La2XrPl83TjGR2j9JeOf8ZGJqxUQKrtBlUBuLmlX3FCkI00nSRLGMixl1JF/m/ RbHddXVaI5q7OYyTfn0gsj7FGwNUkyye3khv5BCLlTg25ts8VnVMtcvoDiplpKY+Eg5PN6f0I OKFJ1UQWjehrIDwkISrmVUiKuGqXLeCksZV3YnoR0t712zYshWI/8ke2g0GF0jo41fMYW4XeY 2O6uS7VJNXdIIzFQWrOoT1GFvLZ3A0CacPK2Bqp4QGA9NaHyB6p8RBIZRpwQvE/yNQSblMK/y LiIwnk4sWCEaKXURDkskGFzHzFhZKEY1rdyCXmOHo7pAAjbYZ/Pj+QJZ7+WLbuuZGiYE0fSp1 fTgLv5frzkGJK9Vgd9at8z768a1i8//7DT24zHr9z22GTt3aLjtrSHciHcx1QJCH8HEe3kD6Z Nta2S4kWBTgyBQOF7hLWq53vLi4e8VMjUp14SugPbV3W1dsjXetjLvG/aUJib5JMEZlwHr26q pWvcxzX5tizp1wQ/2hDwHg+4jedB0tI8LOV4bdsECDBqTR/AwXCvcP/Qvpm3R2gTK6ISRpiYD byuzZNGPJ7+qtjkZovMZuEig7h9JM17tUQka9eG7Ekj6UhAj1qBLmoRJSTfNGIBA5SFdIhvhS 5DeMycC3ZUTE+JzGA/t0h3Rv+qNGvQkJdrADmjxXYyZxAEu2b9a3Sd60EATAcBh85srIlk+UK iLLpHW3zmvOFQxcUjnQMxs/op/5gwAFUF7a72v6hNjJaRLd4Y3KfgigEvOeQdTFayEzTXfgRV N5r2i5hQADQjU7W1vfysy7DvPw2dNnJBa/Ymko2OGfhLkuET+LYfFXQinQ+zuWdghihzKpcBR /eHTYlKFHMy6gAY/n3YzYS3F4+JDA/IHvk0kVmvi9ksQp2wv32JUXT3NJnNgvLOiOfl0jpa2u Wb3YtQrsLtYLJPgYLrCvL66FSA+X/aQlp5NB3agIS2154Z5bnjMsMG4hIJ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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: -1.7 (-) Philip Kaludercic writes: > Or would it be better to keep the directory around and re-use it? Pls don't. I don't understand why you can't use temporary-file-directory. Did I miss this point in the discussion? Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 16 16:18:58 2025 Received: (at 69606) by debbugs.gnu.org; 16 Feb 2025 21:18:58 +0000 Received: from localhost ([127.0.0.1]:38195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjm2T-0001g2-M2 for submit@debbugs.gnu.org; Sun, 16 Feb 2025 16:18:58 -0500 Received: from mout02.posteo.de ([185.67.36.66]:46025) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjm2Q-0001fT-Tb for 69606@debbugs.gnu.org; Sun, 16 Feb 2025 16:18:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 09BD7240101 for <69606@debbugs.gnu.org>; Sun, 16 Feb 2025 22:18:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739740727; bh=pAk0R+DVkapllfOjUJIrauCYMeAdzV1cT8jsSe1pA/E=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=SoI/d+RGhnVtRsIjOFykdoJpRmNRBKZsh+hfnAYTxNzJWd84NmItCFKyMqLITUZwS ilXbcvRpi0v17Q/2gxZSRJYXSOoGcC33OeIHwDORf4Sq4GOk1oyekGC+kxWU5jz4X9 LBYZ14/zWs2+UiKVwfzItTBmhTj9T/HZrWAKMSuPO/3fe+LjAbgw709Xi6E3EngWQX n2NBkgAO3ZX/jiwVE9ce3W4SWMmKtBl1TRzuR01OBe/l6iK8VeS4+mWR6Qp3zArJJb DzB4CnbNEa6BNeWGLS44MLqcUMCE1YyjBO52938vEwnHtFRYJdNKgv+D180aeNqZjj mNDlYnrmBBQBg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YwzDQ1zBBz6tn4; Sun, 16 Feb 2025 22:18:46 +0100 (CET) From: Philip Kaludercic To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <874j0tg2ro.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> 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: Sun, 16 Feb 2025 21:18:45 +0000 Message-ID: <87pljhbnbe.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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 (---) --=-=-= Content-Type: text/plain Michael Albinus writes: > Philip Kaludercic writes: > >> Or would it be better to keep the directory around and re-use it? > > Pls don't. > > I don't understand why you can't use temporary-file-directory. Did I > miss this point in the discussion? > > Best regards, Michael. No, you are absolutely right, that is the better idea! --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Ensure-default-directory-exists-when-generating-diff.patch >From 9793f34698a7245c7a83d6d49b6afc54aa3c0e01 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 7 Mar 2024 10:06:48 +0100 Subject: [PATCH] Ensure default-directory exists when generating diff * lisp/vc/diff.el (diff-no-select): Fall back to a fresh temporary directory if 'default-directory' points to an invalid path. --- lisp/vc/diff.el | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 70497a97d56..cd4dc472c01 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -188,7 +188,9 @@ diff-no-select (list (or old-alt old) (or new-alt new))))) " ")) - (thisdir default-directory)) + (thisdir (if (file-exists-p default-directory) + default-directory + temporary-file-directory))) (with-current-buffer buf (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) @@ -203,21 +205,22 @@ diff-no-select (setq diff-default-directory default-directory) (let ((inhibit-read-only t)) (insert command "\n")) - (if (and (not no-async) (fboundp 'make-process)) - (let ((proc (start-process "Diff" buf shell-file-name - shell-command-switch command))) - (set-process-filter proc #'diff-process-filter) - (set-process-sentinel - proc (lambda (proc _msg) - (with-current-buffer (process-buffer proc) - (diff-sentinel (process-exit-status proc) - old-alt new-alt))))) - ;; Async processes aren't available. - (let ((inhibit-read-only t)) - (diff-sentinel - (call-process shell-file-name nil buf nil - shell-command-switch command) - old-alt new-alt)))) + (with-file-modes #o600 + (if (and (not no-async) (fboundp 'make-process)) + (let ((proc (start-process "Diff" buf shell-file-name + shell-command-switch command))) + (set-process-filter proc #'diff-process-filter) + (set-process-sentinel + proc (lambda (proc _msg) + (with-current-buffer (process-buffer proc) + (diff-sentinel (process-exit-status proc) + old-alt new-alt))))) + ;; Async processes aren't available. + (let ((inhibit-read-only t)) + (diff-sentinel + (call-process shell-file-name nil buf nil + shell-command-switch command) + old-alt new-alt))))) buf)) (defun diff-process-filter (proc string) -- 2.47.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 17 06:03:05 2025 Received: (at 69606) by debbugs.gnu.org; 17 Feb 2025 11:03:05 +0000 Received: from localhost ([127.0.0.1]:43705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjyu0-0006Zj-Vf for submit@debbugs.gnu.org; Mon, 17 Feb 2025 06:03:05 -0500 Received: from mout.gmx.net ([212.227.15.15]:59687) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjytx-0006YO-EP for 69606@debbugs.gnu.org; Mon, 17 Feb 2025 06:03:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1739790173; x=1740394973; i=michael.albinus@gmx.de; bh=2/MEErA3Gn+aWtaGkJ0oAz3+YuitaNK95ICGGOK3TrI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=hJV53cpCld5dxyFCJ7usqLixLIHqCPhnSYRa2SH1htTVN/eZE04X/Nuq7BXhxnFQ Lk8haw/UHKomc0xm5rD97VDWsOXe3XJmXlB90R3IwUAD+Wq9oToGBVDOnnaWrk1aZ dO7eZ62I2wY8u+zWQ0WYfHJBuJ5U+8ML5xRJ5ZYB3mvz6Z+a5VDKrbSWWy2edfvNI Hda0H6Ks+U/Fwnr6o9vTFc8JNIKJYOw1ZisuW4TadbpMcc0WlDlW3HWYtYQbVrHlw QffdPlcKtEflynE1aWQ1Gwr0snrEkQLQ+YV9+b7paTeZaApRY0vmMP4daRyFkpuQz 8YpRboBP7gP3n+5TcQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbAcs-1tD87R3Uk4-00hQLt; Mon, 17 Feb 2025 12:02:53 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87pljhbnbe.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> Date: Mon, 17 Feb 2025 12:02:53 +0100 Message-ID: <87pljgesv6.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:L4Uv4sdyeCQUkt3xIcKjlFFxAZBJapLwpJH0YEUA5BD26C4qGgu ArMzHgfvxHecrIczBPrLKI2pgItGFqgO+t3/apnpV9DdX5+ZkbA37lF33sA2EriDVDY5Zvq Su1iOed+u0AqkFxTBttvSSigcTO8qFZKuuU+e9AH+Vnx8e/FahORlf76ls0aPy0+CXN7ooa yufkb/gPuJ7B5+rerrauw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:WFt5oi8Jxk8=;ky58KCo1a/GFnvPeVDv5eyevYr/ Vbb5cx1IgmSrS3EJevOiRhGaIjqfijqdA4NaYixjPIsxzD0pu9X4hJV+o1tEZvjKEdpGGphT6 QRdtT7oyboocgeKbndJddrQcqUwHiaGqjKhbCGMfqfw6wEzHo9IY1NMXesTKmRDrMkqnZW/Ji sUdDsKoyp4zdoz25tkUVTMFMEBFgf2nsscoMoobedQiLKPHZzAUAn6vkzmCwAYsxswxDLOwrf p19atTwYXhNKj3BiM2/wwkvxDP48yYj+63npx4V9PIYl3mqnNi3qWQM1DAYmaXCIyB4hq3YI2 u+XXzswoVfsHC85H07ZmFfjHhT4XdgnqM5loX/l9xjkY9w5+hRsGdWFMdmEOcbZT8GoJ1122i dRETrLLFX+xS+Yhz+E94ljQdGBFZOBYZM1quH9ptSRl1wMBo8Ue6FHIEaRMZG07ZkCJynLBYV WvPZ1Nu+BNUIZ8ArzwV4+9PcjVBrynDpdnd3H9izgnJ+mTiUyaC715l5GwFKwbRWVyQRxrl70 BbeebOfUeF6CKz/jtloK3JSRPBV1BxYItwVusOTBfXxAj2MBy9VRbOz8p9P7IZqlF3E8TUDXO +oTYd7ivoetUurLIHR7L4JHajVR9ebrbXoVyg2drOMmo1f3mXBHHmp4twqd19+mkuT6E4WEZ/ fWaudxfKYCg7pqd/HnOLxmwwxTDTIkngDdPXOU73iTs7mtEebsXFadLmGTvjlODVkfhh/Tclc 1zmtQnVQgymnXjFL1E61i5R+TYvokC3pfFS0gu52gNuXFdwPQTI5gb5+JJrRxduLEGONGWGg8 /LG27SpekiqNWsuPKajqoKhhQulMvvUAx/it7/a19pjzxPIHs0SS8Q7vOX4Nkd3vtvD4IuKVv 6tP1/VolBByGtw7kVSqlvtIiTDNYYfJO7dVM3LqKeEM8InmEm+oI0njt+c/gbgPWvhab/UCE6 /C9K/xTXsnA57U1CNNK03ewRLiVl2TlW4erCrYBuB6Kt7gxOb5y56AkyPy3KoB+4ythfYcxTc aPo25xXH5v4AQPM/oE4BqJx1Xs/8rT6l0wPtbLN9jNaAboi5csNeJNsGQHn3KlTaQHQeWyjSo mXnNf31YHdZO5weE1sjtotwkCNQOImx1aOdKMJLHzPY5TNCuPhXavgrFwA00Hhqp3gkrBplsp cjdQdZqjGLHWl0YTj0sXa4bnyNtosXglHft5VmNWpHnpuMc9uLx3xcmwJlL/8OTnz3R7r7oGf JrF/qFo6iHJiyDEPfsRbTrnPwDUGZyBcWI9+25cLtYP86VwG6j60Aq/tKO8v/bJicTNSmmfaA G2WDeKvrCTPxIH0crNRnriMm4DHlmezz5Dn8NquTkRqU3c4sQ1FGAVnwHQgk6yALuh54eNDaH dUHgUL0Kc+X78X974nLn91m3v+Aia21KlXYEQVgJ4zruqJgZ1RB+5bMh+D X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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: -1.7 (-) --=-=-= Content-Type: text/plain Philip Kaludercic writes: Hi Philipp, >> I don't understand why you can't use temporary-file-directory. Did I >> miss this point in the discussion? > > No, you are absolutely right, that is the better idea! Thanks. However, why not do it more simple, like appended? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 70497a97d56..875deb68724 100644 =2D-- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -187,8 +187,7 @@ diff-no-select (prin1-to-string new)))) (list (or old-alt old) (or new-alt new))))) - " ")) - (thisdir default-directory)) + " "))) (with-current-buffer buf (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) @@ -199,25 +198,26 @@ diff-no-select (setq-local revert-buffer-function (lambda (_ignore-auto _noconfirm) (diff-no-select old new switches no-async (current-bu= ffer)))) - (setq default-directory thisdir) + (setq default-directory temporary-file-directory) (setq diff-default-directory default-directory) (let ((inhibit-read-only t)) (insert command "\n")) - (if (and (not no-async) (fboundp 'make-process)) - (let ((proc (start-process "Diff" buf shell-file-name - shell-command-switch command))) - (set-process-filter proc #'diff-process-filter) - (set-process-sentinel - proc (lambda (proc _msg) - (with-current-buffer (process-buffer proc) - (diff-sentinel (process-exit-status proc) - old-alt new-alt))))) - ;; Async processes aren't available. - (let ((inhibit-read-only t)) - (diff-sentinel - (call-process shell-file-name nil buf nil - shell-command-switch command) - old-alt new-alt)))) + (with-file-modes #o600 + (if (and (not no-async) (fboundp 'make-process)) + (let ((proc (start-process "Diff" buf shell-file-name + shell-command-switch command))) + (set-process-filter proc #'diff-process-filter) + (set-process-sentinel + proc (lambda (proc _msg) + (with-current-buffer (process-buffer proc) + (diff-sentinel (process-exit-status proc) + old-alt new-alt))))) + ;; Async processes aren't available. + (let ((inhibit-read-only t)) + (diff-sentinel + (call-process shell-file-name nil buf nil + shell-command-switch command) + old-alt new-alt))))) buf)) (defun diff-process-filter (proc string) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 17 16:00:54 2025 Received: (at 69606) by debbugs.gnu.org; 17 Feb 2025 21:00:54 +0000 Received: from localhost ([127.0.0.1]:50028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tk8EX-00009u-1h for submit@debbugs.gnu.org; Mon, 17 Feb 2025 16:00:54 -0500 Received: from mout01.posteo.de ([185.67.36.65]:47239) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tk8ES-000091-4s for 69606@debbugs.gnu.org; Mon, 17 Feb 2025 16:00:50 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BBE1B240027 for <69606@debbugs.gnu.org>; Mon, 17 Feb 2025 22:00:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739826038; bh=tXH4trdBtDx/+BmNPW7Gvd+Er04Y8+wg1JJ7CLeGN5k=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=EoLL4u8xEsrObDbX3B5EOMwqPitm0YEFfkt32UOEFg7oGztxU3mKCMftvLhSLQpkE 2tIDFcwXFzEqbeg5nxB5rftjFLn2UVJ3pf+motHZP3kcnfFz4H24RswPKodNjSEYJ4 z+O6ltg94EWt3woRS4u9pT8mdqy7A2moLickzLaU2ADHtxO92fIzyzA3//PF86sE0F 1WpoEUwQsgsgdYRx0jLDN+UYg4uD5yAhs8cK0nM+k59DYrd1HlNd0K9iOIZsW/n9oY Lj7zXo6irxluWygmrTU82DQB/i/XX2zEelMLWKwW4J5XjkdVr/NsUO7USZnucqNgYZ hjgieCGIAuy6w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YxZn04J70z6tsg; Mon, 17 Feb 2025 22:00:36 +0100 (CET) From: Philip Kaludercic To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87pljgesv6.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> 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: Mon, 17 Feb 2025 21:00:35 +0000 Message-ID: <87cyfgb824.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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 (---) Michael Albinus writes: > Philip Kaludercic writes: > > Hi Philipp, > >>> I don't understand why you can't use temporary-file-directory. Did I >>> miss this point in the discussion? >> >> No, you are absolutely right, that is the better idea! > > Thanks. However, why not do it more simple, like appended? Is it safe to always use a temporary directory? I would have expected there to be edge-cases when using TRAMP where that might matter, and we should only fall back if really necessary? > Best regards, Michael. > > diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el > index 70497a97d56..875deb68724 100644 > --- a/lisp/vc/diff.el > +++ b/lisp/vc/diff.el > @@ -187,8 +187,7 @@ diff-no-select > (prin1-to-string new)))) > (list (or old-alt old) > (or new-alt new))))) > - " ")) > - (thisdir default-directory)) > + " "))) > (with-current-buffer buf > (setq buffer-read-only t) > (buffer-disable-undo (current-buffer)) > @@ -199,25 +198,26 @@ diff-no-select > (setq-local revert-buffer-function > (lambda (_ignore-auto _noconfirm) > (diff-no-select old new switches no-async (current-buffer)))) > - (setq default-directory thisdir) > + (setq default-directory temporary-file-directory) > (setq diff-default-directory default-directory) > (let ((inhibit-read-only t)) > (insert command "\n")) > - (if (and (not no-async) (fboundp 'make-process)) > - (let ((proc (start-process "Diff" buf shell-file-name > - shell-command-switch command))) > - (set-process-filter proc #'diff-process-filter) > - (set-process-sentinel > - proc (lambda (proc _msg) > - (with-current-buffer (process-buffer proc) > - (diff-sentinel (process-exit-status proc) > - old-alt new-alt))))) > - ;; Async processes aren't available. > - (let ((inhibit-read-only t)) > - (diff-sentinel > - (call-process shell-file-name nil buf nil > - shell-command-switch command) > - old-alt new-alt)))) > + (with-file-modes #o600 > + (if (and (not no-async) (fboundp 'make-process)) > + (let ((proc (start-process "Diff" buf shell-file-name > + shell-command-switch command))) > + (set-process-filter proc #'diff-process-filter) > + (set-process-sentinel > + proc (lambda (proc _msg) > + (with-current-buffer (process-buffer proc) > + (diff-sentinel (process-exit-status proc) > + old-alt new-alt))))) > + ;; Async processes aren't available. > + (let ((inhibit-read-only t)) > + (diff-sentinel > + (call-process shell-file-name nil buf nil > + shell-command-switch command) > + old-alt new-alt))))) > buf)) > > (defun diff-process-filter (proc string) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 18 02:11:56 2025 Received: (at 69606) by debbugs.gnu.org; 18 Feb 2025 07:11:56 +0000 Received: from localhost ([127.0.0.1]:53955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tkHlr-00059J-Tf for submit@debbugs.gnu.org; Tue, 18 Feb 2025 02:11:56 -0500 Received: from mout.gmx.net ([212.227.17.21]:38859) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tkHlo-00058X-P1 for 69606@debbugs.gnu.org; Tue, 18 Feb 2025 02:11:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1739862706; x=1740467506; i=michael.albinus@gmx.de; bh=L90p1dbB2Ix9vhiiboEqMEfOSxetB+aOVwkAWxeSKJw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=BrwZqKYTgRn6ONaoPlbUHBX/9AaOh0o/5s2z53Tc4x6i8ln9xS8EZoBx6ZaDXRom oJ438XEudVQr/WNzYNLEAFY6d+itwyqrT8CzhKxdvrbxhejC4kInrZq56l1pkXvHw dk4q4GEXgsuqxuXps7jZYsjcy+CxDrQ1Zd00ycZdUK3BuDdYmUjDoU/Yo45d9XdRM WFtgzMDYzt/FWvrX63fVJdomhnKxvOL/okVpRIZwe2CGeEQ7EZy3nbXvqoHDOWcKz R+v4WPtoVcQZQ27MtuoA+nAYQDqWn0mrnyGaTL3pQk9ugq6w8XSsvZmy19C4Le90j jm2hY0o2MxfsHe/nXg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdNY8-1tBE013wZs-00jnql; Tue, 18 Feb 2025 08:11:46 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87cyfgb824.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> Date: Tue, 18 Feb 2025 08:11:45 +0100 Message-ID: <87frkbengu.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ym3NR6mytbZtlBXBQ13apqUD8oFLV4Pa7N/o86gfC1m6cS3x6wK vy45nQMjec3vI/4165Bzr2AIG8HgMCiCoHqYlvz1x+p8ORaBTbRYzHPMpgyaUYSCRYEXhj3 EW0dGT3li2jo792EET8HttURTPCbJAnL+OUPZK5i2nwTsb7bVwiabK18TytrjiwZrYikeAS Ka2J+2n85Ou0HQeF8gEkg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:PIOzapmnnDA=;tUVD1pbLbjvt39cEaCwOwVbWV+y p4vtjhmqQZJqCh8cQSc8jb6oSlelmG3niIECHe2Use7absij5JbsXnSWqLvPb9V5sd0psk3tR JpT7Om5rVng9Z97O/QPGFIzyXhJ6VwBnQFfqeVVYi0UP+/XSntx/5FSlY7Aat+wKUrqP67puk LRhv60q32v4uHrLfshEN21HM+iipG/wv4CnOaiheehz6xiIwd33ohP7wJxvT01oJKRXMJFc73 OO7817nK3vf0fkGRUMR+BXaMLL3PgAGsaW+pneCmwGcdRtOTDBv8zHx0EiH6RsK4gxwHRJsiw 9duo8F5QTTtDoyO0PgLEtmXuKYLYQn8vDZJtZPoVPlhJ6Q6ZAqCinpxf0z7XE2hjGidjM/19V a5UXppm6eWTMD7v5Ja0x3yAj1UEGkQjICL2AKlbKz0Ta8YKwmZk+D9ZzNEnmjAmX50KIeyMTn 2nc6+3WaY2zvnJ1PkZv7TIdkzrVYsMYWwbGorXssUCPolF4UhbjjZaRF5CsNi7jzh76rljRLd C4mHj+QHeiLRs+NgZuYnEcyiuhv9s1DaF/W093Am5V50hWg87HUva5hOOUMPsj6THt71vRIXR VkSTLYW2SAGOjVDge52lHKD6iyeiqFMiUWJq5/RAkoyXb+Y1faTQeC1p0+5+wzH2Fg+SUbsVC 4OtMGi8WbB6kRjSDFSRwm4bnxKmV9XSsAZ0VNGA1cqDrMBn9IoHalVzb8N07zBE1WOz+9yAEo WRoA5pD/c7+xV5RCxbDOzbGDJCtehf0S4QKnh0B1g8xljtro9zRGAIb/jdbYOuFp4KpRpyoKW Dv+0GyWhyrPdrGoyjYES5s3tRkSNgW3T2mtTTGW3xzO0F7Jv1Jd9IrYEksIGRYwtZ48b6y3N3 x46DP9NyIQmarqQpx7JPemp35LdXfR+vzumCSDDQxAV63wjlYEJWNEhlcrtoHQygN40dcw239 uZE9ZaoAdLxngNqXh7ZeXozKj66rdjpCtyGm1P/4CdDXygou4WJNIXR24C56cRqZEumLG/s7f YqlwHcG9cbjV0XGi6dUubhvIPXQHUumrFu0LphDXcSnMPREv6tGkjmG1JLcWiZjQVKpu4j1KA mqR65o8Ezn3glSCh9Fcm9aHcn5ud3z8tLrDIH0c0WHx9eIcf+Ara0RLytINRgV2mO2QEiPa3f oKmMNPjdzFLdm0ELYJ8OzRD0NxU3h77YubFjvFmYz69PKTvThjXSV95IgBsLCyH+cBvZyRuz5 zx+fyc8ld1hE+SleBDiFKkxU+CcRsEqFjmaZS6Pj2dtgT8a5m8uWK+Tq+XgTKDaH+9JaQRusw rY5CgoqRf/Oi/wSWbQUmWgMXbRCz13JaHMpccRFfRCCUmh9y7ZE0pNRJQKlxzIHWMWuIfaJJv +af10gOyUCbZb41E4NICphqYU7MllSorybI3Iqqg5hgROcRRrKJxcDWFMJ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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: -1.7 (-) Philip Kaludercic writes: Hi Philipp, > Is it safe to always use a temporary directory? I would have expected > there to be edge-cases when using TRAMP where that might matter, and we > should only fall back if really necessary? There is no problem wrt temporary-file-directory and Tramp. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 20 15:30:40 2025 Received: (at 69606) by debbugs.gnu.org; 20 Feb 2025 20:30:40 +0000 Received: from localhost ([127.0.0.1]:42267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlDBv-0006mH-D3 for submit@debbugs.gnu.org; Thu, 20 Feb 2025 15:30:40 -0500 Received: from mout02.posteo.de ([185.67.36.66]:53847) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tlDBs-0006jm-9W for 69606@debbugs.gnu.org; Thu, 20 Feb 2025 15:30:37 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2A139240101 for <69606@debbugs.gnu.org>; Thu, 20 Feb 2025 21:30:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1740083430; bh=P+svV0GYLty73htHgWOFp0V88QZEuHfERC5GG2o7KPc=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=oCVX3PBewxiSDDN9bbBBssXasYkPBGUv528wJd8/WJluyJAzEBzydFpYRc9PlJxKt Kydy4w1roO/uN3i4AQ/5RPXrr26Po5I+z88zdCruhK361kKR7Mja6zeaPbBlwel2XM L11bvDpIIbJNgUiujFXRqxtKuR1kHq35csCDgfG0YZ/cKJIlR0fIEDJxcPq2UJNE8Y v2GFisx92AzATAmAAgQUpHVqzsCryQk3on9LpK9X1R0kxTttbLfibmFHuIWydP9Vgw 9AUVsJgiBr+R1BENqIhMBk7tYSK6FRLZAzy8PYw13UXSEQ1Pso1XsjuLIAcFIoglZe sWLozoIDvcAmg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YzPys3nSRz6twj; Thu, 20 Feb 2025 21:30:29 +0100 (CET) From: Philip Kaludercic To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87frkbengu.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> 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: Thu, 20 Feb 2025 20:30:28 +0000 Message-ID: <87tt8onyu3.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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 (---) Michael Albinus writes: > Philip Kaludercic writes: > > Hi Philipp, > >> Is it safe to always use a temporary directory? I would have expected >> there to be edge-cases when using TRAMP where that might matter, and we >> should only fall back if really necessary? > > There is no problem wrt temporary-file-directory and Tramp. Then we should go with that approach. Do you want to push the change? > Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 06:19:10 2025 Received: (at 69606) by debbugs.gnu.org; 21 Feb 2025 11:19:10 +0000 Received: from localhost ([127.0.0.1]:55078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlR3l-0005bj-RL for submit@debbugs.gnu.org; Fri, 21 Feb 2025 06:19:10 -0500 Received: from mout.gmx.net ([212.227.15.15]:57181) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tlR3i-0005aD-Nl for 69606@debbugs.gnu.org; Fri, 21 Feb 2025 06:19:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1740136739; x=1740741539; i=michael.albinus@gmx.de; bh=yrIdYNZtqLcpo/O51jUopiKk8a9c5e3hMn7xmz//OY8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=AR4p7nHiOrBWmbKPRi/IA6FGEDc/tGkQ/tF2OO2a+yE2dOdBdUslfnfPAEAIDou/ mzQ7Heac0FaeHsFeExjHyCGqeOtrUG0xQcW3MtT7bwC1f8ThMEbfmstIYZNU7jD8I IjH6l52CwnbyNUBeA0Dr4m3tv7SewUivAyxlINqY29RnMtqtXPFJ1Iu419FHZcQ+g lMrG+x34SQQEVn4FCVWt0ivgwN5HxTrzcO9hWxtMhLpT4l4geV1bE58zVwCosEZ2F 7HpV/px3P8731F0htptK1S+YuObO5oyCJ072lxUDBwHfYb7FCfkcY4EsxsmbnIzUR qVosX4PzlYXj7r7x8Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MRCOE-1tzggx1MX6-00LXxA; Fri, 21 Feb 2025 12:18:59 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87tt8onyu3.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> Date: Fri, 21 Feb 2025 12:18:56 +0100 Message-ID: <87frk7y28v.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zioOmeIB47BqMrf3IBxrVhraQUf7E6rVE7DPEcXVuTd9hna/0vW MnqhwiKFiBpH89nC0YaPXBXEkgXLP6waCixIZk4IJSDbwnQS9DMBsz/TIZ2WHcpjWq54dou AK9XaYrBHfWAuADtTuCSl4iXryaFY6GLK/Y9iAaXPA0CnrN8QX2Y1yYt+VdtGUqUS8fM6gh qtyc1zuC7nagGteR4P+Qg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ffh4xUy51oI=;j2e4v5hCFM7g9akGCrUXqEHyTma JlCSn++TH9uc1jZtSx4Yg+VTTlEKQlhUqdByPZxS+EDAPnj+VMMT6U0viIaaAFz6T7QWmEjLn 2Bt3Okw85g/8s1LSG6hTtbHTbCv+Mj6QAbH1rUZxmsGMiQDbX8SfI0M1P2eLarxTz8NQ+jVNR d2OUJfJbCQ8owfEy6KYakas19cxmwcY0Bj4eSWb7w7YdQ86UdDbW5DPOv4EENXz/6p28Tb+4a uhGuJl4qTDyljHj1ty40TOj/1DeLrZit5GH8W3b8OrkDbaM1TnTCnNqsUGkwZJvk1xr03PT9H nRSegr4/YuwitW9sSex233HsCEPSXPfBgCEawOHHhJVCW3mlDCbKG5khwSOZWWoQ0yLqhILsc Na7YoD1bTt16MK3OJg2ufEU9IhpKqy3A7cKgkUKdgwzt5Xu1NhLp/m8VwvmDxkoepK/G7Lcun H7yC9/y5UHgW+7HJSDC2EAGPPKrxjO/MNKEXoYX4sj7kWzVC/STIi3nRLFk7ZjSP8ZLczZO2N CJe6kPkna+ciwmiJwi2uotd7BSt9EGdEXsYQXS8VvoGH9rFiL3wXcLGzfWaU0BqJ5cZsWUkM2 bO8Eb1+ardr+KHxOd5ob5VVlrOGhoOAS0lXgeES8nBa3BZ6lFPfoCcxbjqGqvQ9J4S3Z2k8/b Iajb0M+SI2difdjz8pJTJn0fYNqEnXGyB5d3UrlzDrpxFGdbjiMnFcLNgGWL6dPbQ3fX5Sd1F 5z+rZyTvgVK6/2TsRV8Zi76bCjHIpx6ytAKCa1EK79okxY70tVBkz/EoGIObZ5QdS3MXbbSei d0pES6vOxMfII5E52K3a0abNWLLB5EkBvqRH4NXWEZ8gqRI/6SXue+rp39qdCZcSfQWxCWu5c e5jtedd8NFKMMqvUnxZVdyNSb1W4Jpb0Qr7lSSD2wGQfoh0w260W5NnGZjdNguHcuq5nIwAUB e0OwGedE5Wa3xxE1KV5AvulBzd8D6scVRVpP+sCG3uYf4EhGQd9yOdGbpcViTz8FQC8IiWX1/ xqCYhf20zwfJCdanuxqPZe4ZGaGmVYBjRoQPJSFqjwArndo8oOEt51g7C7Wmff0/fbO4c8vFe D8jxrSESJ80KpgaKA3MmYNBTZggwiwXUtNg/A6OkTPGjzKcDHcdMe2P3GBPJJ9T2V8HArbj3l O3K9+Ta5NG3CMrtCiLmT4pnrX7vfbhbTZgUP4d8qnYhqYkxV42hGkF5WxK6BafiAP9Zw2Kx7D asIf5ORZbXo6ncR0pFjP9vvztkzb74hB9gXXKWI+jt7zZJ8Rfxt9lzHsry9FhJjHkQExHZGt2 COO4cF325vQ0Ewa8Oh2gmE58O0BJ6neEUcloxxZmdtCEZIGu4CUvWt4wNPZ7FTDqqXWVt+IpH 1BlVE0URPeKyurCw15Hh7BWw0E4E+wQ5WJHA1spi3KPcIMWwv9RCRb1hnF X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@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: -1.7 (-) Philip Kaludercic writes: Hi Philipp, >> >>> Is it safe to always use a temporary directory? I would have expected >>> there to be edge-cases when using TRAMP where that might matter, and we >>> should only fall back if really necessary? >> >> There is no problem wrt temporary-file-directory and Tramp. > > Then we should go with that approach. Do you want to push the change? I thought you do :-) But no problem, I can do it. The question is how we bring it to Emacs 30. Pushing to the emacs-30 branch (perhaps too late due to the release candidate). Or pushing to master, and ask Srefan to add this to the to-be-merged-from-master-after-the-release-list. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 06:31:53 2025 Received: (at 69606) by debbugs.gnu.org; 21 Feb 2025 11:31:53 +0000 Received: from localhost ([127.0.0.1]:55262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlRG4-00012t-88 for submit@debbugs.gnu.org; Fri, 21 Feb 2025 06:31:53 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:50287) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tlRG1-0000pV-9s for 69606@debbugs.gnu.org; Fri, 21 Feb 2025 06:31:50 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5e04064af07so2090890a12.0 for <69606@debbugs.gnu.org>; Fri, 21 Feb 2025 03:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740137502; x=1740742302; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=VvMWQ8Rq199iyoOb2r2yUYc7841Cd15GLU7FTcCDIwM=; b=FouKt7raT7UagfPldE0Ae9xrZXPZGSZu6ygShMMphUHcwSXMbHE+doGddTkl4HFvQ4 g9Q8klNU9tL/4YTsC8jA9cYKMbg5e6Q6PfJb1eaHFJ/w7QLbevR6ZUaCl8N7nkF22c0h fcHn9UjZ0WwadZ30UgFrYM85IwzXZw/jSEATF5IiHChVSQmOS2YaYARFxGXTSWi27pl+ k8RC/WQTLYPe04RfxFy20pZUI2KrVtviVOHS61PSE4i+ZiQhUim0k9ybnK5GANFllqtB Ed+ItWJH5GTVF7C9HVqTGGdpIoBjCncKBiByZgeOMoUP+VWPvDfRHBt56ONuGv6ls0UJ XOuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740137502; x=1740742302; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VvMWQ8Rq199iyoOb2r2yUYc7841Cd15GLU7FTcCDIwM=; b=W6jlzN5pj6zvYhI0L1eAI4QC/EV+x7xFWwaouxw84FrevvMyPEet65knBM2/Nx53mF 30GKOP0LEdkzlf32phiX0NNm87AA2pX8Rle2AVWCck3I8GiRwxpDwNjo/1UtBppPHwvz cWYSnNY7KskZXCUX42BNdg9zgdS6Kgy+cEzAidYR/gIJ5o056jcOiDFMyuDFjvMqz138 bflG87VfAY4MxY4RK7p7LyN3vd7lLhnkHv9Fxj8Fdm9gzEhw3KWciOV3umeqqZDl14Yg 7lJmkAXy25EvFv8n7osWGXjJIqBRhGvNhxcM94SiNS0LY7gNS+4N5KdJ+3v1dVpUUZyB oghQ== X-Gm-Message-State: AOJu0Yy/Ldt2VKb3ZDuJAu6d4LhjWcQx6pAyugHF9ed+72R+RXhNqQ2o B/AWgJgHAk8RB4kGyLdndCu12YET2tN2jGTZOM3WLEIhyF/HVxoBCPK6KPNSxmA+aUhtPwHGHH8 Rgacgqy9+ra0XWCt7nkihQfKjJj0= X-Gm-Gg: ASbGncteETKsKpeIXFUnckqsT34m+SaBpH1v0YB0hK8cCalKaXuy1etzfvzU3UTP/0v q3gXRzOApnfFnW/Z7z1GrmQuymFnyDeRMzOceYrzRLsNaYtX5/Otwu3osVa3bDd1+8XyOODQFy5 VZSzpaA444uA== X-Google-Smtp-Source: AGHT+IGFiOIfqLV9ZHJlZIfCX5SpHK8caVIREgIEuz8MaUu+g0pjdENtaEG1F4dLS5faMfg3m325uN3MN3D7yatlHgE= X-Received: by 2002:a05:6402:4617:b0:5de:aa54:dc30 with SMTP id 4fb4d7f45d1cf-5e0b70d11demr2242817a12.5.1740137500907; Fri, 21 Feb 2025 03:31:40 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 21 Feb 2025 11:31:40 +0000 From: Stefan Kangas In-Reply-To: <87frk7y28v.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> MIME-Version: 1.0 Date: Fri, 21 Feb 2025 11:31:40 +0000 X-Gm-Features: AWEUYZnOZkyb4yBLQw7iY1P2SnnFzPvTldKJfl0dhNGxCpMiBJ4uvK6oNchGqyA Message-ID: Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff To: Michael Albinus , Philip Kaludercic Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69606 Cc: 69606@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: -1.0 (-) Michael Albinus writes: > The question is how we bring it to Emacs 30. Pushing to the emacs-30 > branch (perhaps too late due to the release candidate). Or pushing to > master, and ask Srefan to add this to the to-be-merged-from-master-after-the-release-list. The latter is probably best at this point, thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 08:49:28 2025 Received: (at 69606-done) by debbugs.gnu.org; 21 Feb 2025 13:49:28 +0000 Received: from localhost ([127.0.0.1]:57351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlTPD-0006dW-LA for submit@debbugs.gnu.org; Fri, 21 Feb 2025 08:49:28 -0500 Received: from mout.gmx.net ([212.227.15.18]:42687) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tlTPB-0006cG-3h for 69606-done@debbugs.gnu.org; Fri, 21 Feb 2025 08:49:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1740145758; x=1740750558; i=michael.albinus@gmx.de; bh=vC3PjPxC4idhWa9ALx3zjHYLAS5pzoC+wEg/27LmD58=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=KfckVfN8AF6t+U+feGrxHfC+zOOBDmRvmD4LgBiA1TSUhAR33WdM0bam7PkUnJYN pYinoQvBe9NRc9wbvlSmHpwackwHyFnwwV8zE49KRzF+4UYP1RV4zrkbEWLNLXZyb snpqwF7TMMH3BaV6FvWS+l7R7SFBY6wb8HBF8/lKkmQZj56vtKp/eSTW3I+stYOqE hhkMbgFuR1NwOse1DOIr5ErKFgFUoxZHw5wminLhGGmmHI5xaOSgCscHaibOONouc DDHxe+r8KkoYLuN9OLLNw1P4PDH1UvddDJTu8aLp5O3uHdAqpnFJVDJs4uBMrU7QT C/jglCBEIK7oER0zJw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MBm1e-1tbc2s0XF6-00EtA3; Fri, 21 Feb 2025 14:49:18 +0100 From: Michael Albinus To: Stefan Kangas Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> Date: Fri, 21 Feb 2025 14:49:17 +0100 Message-ID: <87cyfbwgpu.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:hWEWDsQeLQSfT7M2q8dfqtwlMoZG8A/GR3O2aMYIYcALVfVjKcN kSSZ1Clx/PMivNjvydDA7Zl2lVgLS2TmhE9iQTCGrYjSSxRNW/UXt20jlacW6SlJbi9UK3Q xfM+a67EF9X606ZaWQmNhjSZNCycwhpxjuxh0htFd+SHqR4nWalAGTHsfwAfxgs+Wzg8NMl QLGumUcJRwSyy2RBjs3aA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:AMIVBxQbynk=;fCEv6+WKLUtpRdFhJQyJ7Ds6YIG 8Xq+hYZg6ZWUTT5xQoTkBUdxtqmrVOyIGIxjfM8bzuULGCijBR3p31bgG7D8GUqp+C+39f8VM HGO34tk+TG+ATBULqWEYbKgjEHPwRKhRwkQqeq+305lo+/zz6c+PKG2ohIim4UiHiE99BZIZx iQ2MZzptvVg73l17sTZQkhhVncCvumk75i4Zx0+CnaxS06asdfwH1K/vdLMSkcHUJ3y0c3rGn SCn0H7Tm+Y2FmU4cL28jRbqZONgTFtM3EPFiY6YuPglCggUaKgd/cNNv7E2P/SnifoOhyTDpw YY0cR9Jbq05UL/2Sc7zt9wx+b3ld+jxdj5+zl1ssDAVUE+4wL2nT0EmigOqjtpQpov6EnJAAF 9bqudItEBOd9NO+t9O2xMGkHgCiIfBRNql24xukQzibqogjLtdz/q53rwVIeyKzgHaI0VO+/r N9YG7zbsyWavyhGXFyEkIZd8noYMsE+2zE9DrouiwjJpvYuEbO1MOWrEhYjzrMg/6yQXFSGHY ebu4DeuhYsylEq49cJxfWV/tvHTzhTj5Mqu87O8GJ3S2DnK0tdqPDZ7HCs4dSy2drUx1M7VpO i2M70hNXGze+5zCoNgxLHRTTBIxsKpuKtB/LW6KczKqBoV3W5CdOA1dQFqkzdfnibbAfhLmgh hdprj5Ko7FZA+SjHSEKkDUlL9MAWxePQM8F36hSa5mHQZD4jplo4VZgcQ8XAekz7ruZ+6/LTK fIGSPhOHkWGbqgj1HbM50YvBoC4uQfdAavf6u1UZurIL3q5AKmN51RXxm02ooQG+yYunDBKV5 L+1F936c0VdBNOZJp/n7SxD6vIAvV3XwYEySdFEwsOOHz0SHv6+VDHo/Kq+XzBFU+Ln3HCPcT sJnUJ4Vga8DqEOX1qo5Xk0+4ReKnw5Y6DH0BcUyGpt3froCeGFz5tdnJkwPr4rGM65mV9RWno 0xHGArdCDklC6OpL0poqnLsiQgR1rc4bpgn30lWY7WHAQXAKXZPoxmFDgbQX+STdlcJ6Hn0m6 MZlzRGMz9OIhvHW2BFHYJrWdb2IAqis1n3qtomcswslUpFZTxm7EpCI4V9O+D6FnOIcXK2bwi Uqy/YSuiShdYxr18smatFWisTDlj/DZ2snmiEUh4oIR7ELhmgver/Igjfk6RF9zhXSVs/cQ80 0llBfS/XBR1fs4SE9U7HlFVV5AKRMDmNPKxV+KZYVV2uigWi1okdEOkyK0ID0atBhjqpfZbzF q/jG51kA6mqmGBECWfrUeWXVK872cMLE9jEfWMTAc8JSDFU1Mze4sX73WN4Gex3lH1srnzhMt Ap26jKnKO+ALq8TCtGZzK2FFqaBhAdRcTLrsUtILzftkwHJJ8RIVBmeXcUAJb8uQPhVBHDmUU vtEpwtDGmohN9YrGhDWCWP9J1BDTDTuY0LLIhWWbn44XkXDtbHCEHwk9ZH X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606-done Cc: Philip Kaludercic , 69606-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: -1.7 (-) Version: 31.1 Stefan Kangas writes: >> The question is how we bring it to Emacs 30. Pushing to the emacs-30 >> branch (perhaps too late due to the release candidate). Or pushing to >> master, and ask Srefan to add this to the to-be-merged-from-master-after-the-release-list. > > The latter is probably best at this point, thanks. Pushed to master, closing the bug. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 12:46:00 2025 Received: (at 69606-done) by debbugs.gnu.org; 21 Feb 2025 17:46:00 +0000 Received: from localhost ([127.0.0.1]:34823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tlX67-0007e4-Uz for submit@debbugs.gnu.org; Fri, 21 Feb 2025 12:46:00 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:52632) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tlX65-0007cn-BS for 69606-done@debbugs.gnu.org; Fri, 21 Feb 2025 12:45:58 -0500 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-aaedd529ba1so289193366b.1 for <69606-done@debbugs.gnu.org>; Fri, 21 Feb 2025 09:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740159950; x=1740764750; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=J45bvL0DGgnJmzzPAHazvXs+6YoVTo4pmOCw3qpBzNc=; b=AxZJVfNMM62440P7wiPE8Gbf/WAjTaWTreo45NV0sONpLmWFw7Kx5IySuEOPj5o7di s5iQnIclQdza4CCyFGLpdVcGBybChxtSYwVA3titDBA7pJ6ZBF31WZN+uapGHvfDCIap ERndVWKgdW+HAUar6+VQystzx0WWMkFFlkdXVv3hDrCTUGsOjHPJhOaYeBpaYcEBQkuW VDWKWsPw2zMjbjN1dM+10DiHC8bKSmXfVDSdjsl6RVCzqFdTfO3+VZUVEEzjGI2JoNhq xOkx40RdoLfXYafh4WtJ0I6uyjRIkhx2C6SdXaZ5or7+5/S/waPsr8EA5ak5haiMXkn6 0v8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740159950; x=1740764750; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J45bvL0DGgnJmzzPAHazvXs+6YoVTo4pmOCw3qpBzNc=; b=neNRI7yPr76q0+PNasI7TQEmMThAdwmsROEyGf2cNEvRPekbmwD4djhUBLIk1fGWx8 i6x0uGtRu4nfN5P01jBZZgR+ExFyIk2iy5NBoqwm6weSmuu26wuR2g6PjfabBKBefadd bzYV2aAFGSEXCMvBAPHtmdiDHk/Z6soZB90ZusE0KC4OrB4HWZ6z31La1oFh12VgyGEc 56KsAvr46pJLucmxVSQAXh14+hdhrSnxA4MC1SbHcJ/2PA8nkm0H/w+/gGE64GyRegWs HEI2RqG7eTd4VV4Q5qecvKPBcFSwH8jwVRbfXJ4GoEe+doYXq65XGVDn8xtP8ss50jQ8 CoFA== X-Forwarded-Encrypted: i=1; AJvYcCV42CTWSIkp7LX3QvAy8pB71IB4/mXeq+Wdi5P8pZVMKxXm4+IdTXbMLRnTovMFiw30qeqyif4BQugj@debbugs.gnu.org X-Gm-Message-State: AOJu0YyegUH6zDGu0ns56cO+XfdOiuvUEFO8ey/0nMbfNa197s9r2ZTG erKHXPx1z5YnmeZ3eUh02Dilgz4szmV2EWWFp4ejHGQ0zGuptiaNdqZ1ZwWXD2CVh6jSLfCSMlq 8WJ9veS4e5zs7g/tUR9QsbFt71ds= X-Gm-Gg: ASbGncts9CNRdpQnqJ0mi4OJQozP79dlDrT0JWy6NEWIO5eQLOL0OvoCqW8RT4vw8QE Mmev0LXMSH2Iag9Neo+Ta0pKb9UoCFfy+MKTL/SaoJSzGgeb2qz/lckKqFoU2u5enV1bYb480+O QNHznqlV4k X-Google-Smtp-Source: AGHT+IE3KcOvsMjWwAAZJmAZNrDro+K+qyq+PEMyJ7n9m2UVDcb7XlME1rDI5KMHDumDPgie2PXP94gV77YuSHU9X6g= X-Received: by 2002:a05:6402:3202:b0:5dc:796f:fc86 with SMTP id 4fb4d7f45d1cf-5e0b71121bfmr9540144a12.16.1740159950206; Fri, 21 Feb 2025 09:45:50 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 21 Feb 2025 17:45:48 +0000 From: Stefan Kangas In-Reply-To: <87cyfbwgpu.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87cyfbwgpu.fsf@gmx.de> MIME-Version: 1.0 Date: Fri, 21 Feb 2025 17:45:48 +0000 X-Gm-Features: AWEUYZkuS51zg-v7-m4ZX9xSBTUfssN3YMU1fSBDBNubKxFCApyg-6sYjduHXxE Message-ID: Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff To: Michael Albinus Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69606-done Cc: Philip Kaludercic , 69606-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: -1.0 (-) Michael Albinus writes: > Version: 31.1 > > Stefan Kangas writes: > >>> The question is how we bring it to Emacs 30. Pushing to the emacs-30 >>> branch (perhaps too late due to the release candidate). Or pushing to >>> master, and ask Srefan to add this to the to-be-merged-from-master-after-the-release-list. >> >> The latter is probably best at this point, thanks. > > Pushed to master, closing the bug. Thanks. I've cherry-picked it to a local branch that I will push to emacs-30 once Emacs 30.1 is released. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 24 12:33:52 2025 Received: (at 69606) by debbugs.gnu.org; 24 Feb 2025 17:33:52 +0000 Received: from localhost ([127.0.0.1]:42430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmcL2-0005ZX-1s for submit@debbugs.gnu.org; Mon, 24 Feb 2025 12:33:52 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33623) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmcKw-0005Z3-2k for 69606@debbugs.gnu.org; Mon, 24 Feb 2025 12:33:46 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id F2EAC442AC; Mon, 24 Feb 2025 17:33:35 +0000 (UTC) From: Juri Linkov To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87frk7y28v.fsf@gmx.de> Organization: LINKOV.NET References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> Date: Mon, 24 Feb 2025 19:24:34 +0200 Message-ID: <87o6yr45sx.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdejleeflecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeeiffetjeegheffjeeutdeihfdukeegjeetkeeigfevueehtedvfeegkeekveekudenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepgedprhgtphhtthhopeeileeitdeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepshhtvghfrghnkhgrnhhgrghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepmhhitghhrggvlhdrrghlsghinhhushesghhmgidruggvpdhrtghpthhtohepphhhihhlihhpkhesphhoshhtvghordhnvght X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Philip Kaludercic , Stefan Kangas , 69606@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: -1.7 (-) >>>> Is it safe to always use a temporary directory? I would have expected >>>> there to be edge-cases when using TRAMP where that might matter, and we >>>> should only fall back if really necessary? >>> >>> There is no problem wrt temporary-file-directory and Tramp. >> >> Then we should go with that approach. Do you want to push the change? > > I thought you do :-) But no problem, I can do it. It was completely unexpected surprise that now diff is broken since 'C-x C-j' goes into an unrelated directory, but not going from the diff buffer to the dired where it was created. I didn't have the initial problem since using (add-hook 'diff-mode-hook 'rename-uniquely) (I know that this pollutes with temp buffers in org-src-font-lock-fontify-block that has ‘(get-buffer-create (format " *org-src-fontification:%s*" lang-mode))’ because it renames internal buffers, so they can't be reused. But this is not a problem.) But even with the default settings of reusing the same diff buffer, why change the default directory when it exists? Why not to check if the dir still exists like Philip proposed initially? From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 25 08:44:46 2025 Received: (at 69606) by debbugs.gnu.org; 25 Feb 2025 13:44:46 +0000 Received: from localhost ([127.0.0.1]:45377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmvEs-0007j4-9x for submit@debbugs.gnu.org; Tue, 25 Feb 2025 08:44:46 -0500 Received: from mout.gmx.net ([212.227.17.21]:44095) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmvEp-0007ij-6p for 69606@debbugs.gnu.org; Tue, 25 Feb 2025 08:44:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1740491076; x=1741095876; i=michael.albinus@gmx.de; bh=auZyNuTY5i9ewKy4sEqiW3oKudj2w8uAel3jMdViieU=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=bCwHZSnRA+9BvRKQBL13Fyvg/eYXtC/1ly+pRfhQH72PeBjfrQX4H7Pr2vqFXCon 5og0vMtzGsDPmb8JL94QbwQ3uGNQSun6a93VheRPry8JeQKt0r3i1MsMTAhX7F0zP T95ifqzK17+8aiJrp1Jn/cnLNMm+O6Yyjxl+qmMkxH2pVuslpoZy70DzspchiSA7r opSES0mnPeRwth3B+Puw9nl6L0Xa2IE2rrCLAVGvMfXIQvHk550I6RGB1y2P8a9z3 estuGGMONThLDYLwZGxmj+dbN04jhj3o+oMlxO7sw1Mp8+YhQpadWkRoxx8ZrmCiA mZEqrH0yTA3hfD3dTA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAwXh-1tbfm111g1-00713J; Tue, 25 Feb 2025 14:44:36 +0100 From: Michael Albinus To: Juri Linkov Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87o6yr45sx.fsf@mail.linkov.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> Date: Tue, 25 Feb 2025 14:44:35 +0100 Message-ID: <87y0xuw33w.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:KrRvL0uB/porpU1rF5Ci4EehWAM/UQVkMG+su9ACqqdqaB+/iO8 OToqMSz7AlZ4cBEgr+SeA02PuDzKIqPii/CE2AnvUG8p4kBXfd5u7cGibflYqKphIthwnmL vShcVP+tBT8U/Ss4k2zzIguZOK0MOOlFjaP6Tj6PSHGsprPhKecmjQzOsRLIZdLNKDhbLof cPDJXRHPOA3T11UttZ6wA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:IfkoRA0jvuo=;ACqcWx2fIyykV6LleBaBMdKAwqx dTdMVr4WmZcvj545xvGPPeI8uPqzOG6sgJjF/0oXJ9Zww4qCjrbt0frIVzYV+ooS+Qq6ClAwG pAzDdXDzxobudCILhoB1x9GgwqC8AkMfLiPe65ovDgttJltsoPDPoP+hjHXl+iXSzIeJXHPLS TF3q0vMvDtCemni12Yfrmz+zXl7H9TaZLtz45oZW8apahqLDLplt12lDe7NoKfF42k9RHgcFk DDJwEtaE9MAfIh8/t5FHJD0ka+Na/lXBeFHv9qme9j+aFczkd2ZsPgcI4PFHBg/rLECkHdrnW P4AvAIRyM1q3TmOBXvFsafP/V/1JP0D2e42WRcTcqBpec+4/kSrI+wrnzigoEsRovaub8zKm1 bv/j1i34A3imRyTHCw2aVj2kFleaEt19Rw1R+PTqwre4z21uxpuR4MfGRPN5X/95bimwAbvEa IlwvCVMSsAp8a1l5Z04R+gEBFJbb8BDfYY5xlfISBVt90f7UiskokJLQ0wwXXBA039UqXj393 BuR4wSR9vz8Z7FJVtHMjxLQ52QqEmmamyVQkqmjl/qKYjeR7VfQTlUejr3RlG5BiFCcFAsukg 69pBpCDWzp5n7kr9DJHJzEFT29nYvhujYCaG6LbrhNxD+EJJguTInFS+le7Bn0d+GU86J/8NA 9cufxIdQn2E9Duzf7tVFe5Iy8/VDV48nHK3UYv+9uiF3P6ZPCsSL3AQN2pPCqon+U551T5qbs CMJ6WnxCN1Qc9v3LeVjyqYC2lmPJvtTnym2NNO68OlNfrzYYkU2kMkKX+IWq87Bc4yrzQX4OD he7LX1x14jxUeMZEmWuuMlmojtv3hnWH6i1LImlT2Qm1ClLNKotziR86ah1uzO5anktyoD4k8 Q+GA9qGZ2ucHwtX+zWVcwi/m+bt4M7hGyxdec5Dgl5lkIXWxAsHa4Qm08Lv7E4nqMIBUva97h 2CrNnA2x29tuIHhXtU072gCV33vjcwb8QthUBugVA4gt7u2DNA4/+TGHrayhKf7I1H0l2QqoP 417mbRHhNUD9QGU40Y+7VCsqaaNl23BPO3ytLMuDAM9y9XF8xXKuTPMHixQ6rR0RMvOBChzHu /Sm4OTwKVLq0YaHP9LH1Z0b7A2N6PgcYYZZ20qS+mzjfALUMiIV2CMk6vUXOxrbjCYNQbsE3W oIACJkT0U7CkCwvMR753t3Ib+AwvBOm2EKfHC+7wzVQGPy4l97UtAJG3lcNkCA9BVH/YmfQli 8Xcp/7HDMeaOz18uAFFuVZTVOrGKJ2s/iOCeAk8SOPdHlpRQYSX/3lsnH9SUktrOhOE+kkoqB laqe1bc4CTezNA/7Dj2Al5EhMr5hGdNJw+U7TTM4W1yUTbJTfzhsB/gsLeIww4hZ8CwqNPEQQ JxkzW1kruNUVsM2cPacEtinR9PYtmXoTmVZOpNGTQDtrya9NUZ0EwJ7jJF X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69606 Cc: Philip Kaludercic , Stefan Kangas , 69606@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: -1.0 (-) Juri Linkov writes: Hi Juri, > But even with the default settings of reusing the same diff buffer, > why change the default directory when it exists? Why not to check > if the dir still exists like Philip proposed initially? *diff* is an ephemeral buffer, there is no documented value of its `default-directory'. I guess you describe a side-effect you're using. And I cannot reproduce your problem. If I am in a dired buffer, and type "=" (dired-diff), I get a *diff* buffer with the expected `default-directory'. 'C-x C-j' works as expected for me. Could you pls show a recipe, which highlights what is broken for you? Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 11:50:03 2025 Received: (at 69606) by debbugs.gnu.org; 26 Feb 2025 16:50:04 +0000 Received: from localhost ([127.0.0.1]:55154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnKbj-0004ad-8b for submit@debbugs.gnu.org; Wed, 26 Feb 2025 11:50:03 -0500 Received: from mout02.posteo.de ([185.67.36.66]:34131) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnKbf-0004Zw-0V for 69606@debbugs.gnu.org; Wed, 26 Feb 2025 11:50:00 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2F336240101 for <69606@debbugs.gnu.org>; Wed, 26 Feb 2025 17:49:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1740588593; bh=XOJjT2iBxd1oLdsWp83DkRcsQR0hYsnm0CgQq/qRj24=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=M3SrbcFUXPlcrh42zoPfksTNRzgvS9uZW1ZKTOOPe1n9c+HuqIA5zXBOXieQchICs z9C63h/9MCPtLZAn3bPstbqTRRbvcwErsqBoPUsLbZghBtLgqW+HQYLotav7PQOxAP +174PEWWPXSNdfevX3boEsX9F9fope4eKw9Dx4tNZC3TloRvY8JIK/P9lzVOPBbAtw oHH4Ji69/hTJwehkKX6aFTVo56XGjNyMoawbbBvRrGTPNnjRWvpVr4NRoPOo3v/jeH 503uzKkt0McA7ndORhVhLN8Lnc+ZJAyHOnPri51wJcslEPC7EPQTgZs4ap1C9tuaao 6FBkfcbjbyccQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Z30nX3XkKz6tws; Wed, 26 Feb 2025 17:49:52 +0100 (CET) From: Philip Kaludercic To: Juri Linkov Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87o6yr45sx.fsf@mail.linkov.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> 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, 26 Feb 2025 16:49:52 +0000 Message-ID: <87seo0k5vz.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: 69606 Cc: Michael Albinus , Stefan Kangas , 69606@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: -2.6 (--) Juri Linkov writes: >>>>> Is it safe to always use a temporary directory? I would have expected >>>>> there to be edge-cases when using TRAMP where that might matter, and = we >>>>> should only fall back if really necessary? >>>> >>>> There is no problem wrt temporary-file-directory and Tramp. >>> >>> Then we should go with that approach. Do you want to push the change? >> >> I thought you do :-) But no problem, I can do it. > > It was completely unexpected surprise that now diff is broken > since 'C-x C-j' goes into an unrelated directory, but not > going from the diff buffer to the dired where it was created. > > I didn't have the initial problem since using > > (add-hook 'diff-mode-hook 'rename-uniquely) > > (I know that this pollutes with temp buffers in org-src-font-lock-fontify= -block > that has =E2=80=98(get-buffer-create (format " *org-src-fontification:%s*= " lang-mode))=E2=80=99 > because it renames internal buffers, so they can't be reused. But this is > not a problem.) > > But even with the default settings of reusing the same diff buffer, > why change the default directory when it exists? Why not to check > if the dir still exists like Philip proposed initially? I have also run into this issue when trying to save a diff buffer, and it not appearing in the expected place but under /tmp/. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 13:53:01 2025 Received: (at 69606) by debbugs.gnu.org; 26 Feb 2025 18:53:01 +0000 Received: from localhost ([127.0.0.1]:55485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnMWj-0002JT-7T for submit@debbugs.gnu.org; Wed, 26 Feb 2025 13:53:01 -0500 Received: from mout.gmx.net ([212.227.15.19]:36455) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnMWf-0002J3-Ec for 69606@debbugs.gnu.org; Wed, 26 Feb 2025 13:52:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1740595970; x=1741200770; i=michael.albinus@gmx.de; bh=hUD6PDuLJ3z1j3ki8bs4JF4jqGo6Aw/XUX3/8Y0tSlg=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=mgxKOpjVlambKskHffhHy8/2tPY1kBnA5diDaajopSb75kiJ0TOmQ9slzKg8XaNC A6m3EnHRFc61oWDxrh1RD/4ORaQ+0XiJbPrxB4dO8mzTF7TR3fEx3KW7NqlrTqtFB WpxlXNwD/RyXGJUyu/Ytd4r/pIDXrvQEOoukTccmVOjqrhGivBdLCTVbIzGD64eqY q9MZMBUPWvHt0QxAsfWngIqCBNap4zTHbTwu+eOYQjX8J95e6ZQYUuNKP57Jzq/Hn m+2jUPHXAbDm2zm9VvoB0+B4kVhh6bvLy6sIsbvvFLvCnCa8dSEWgdPweSIPT5aJy dxcqutnqRJlV8Ghgiw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MpUZ4-1sxndW2fk4-00jpsV; Wed, 26 Feb 2025 19:52:50 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87seo0k5vz.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> <87seo0k5vz.fsf@posteo.net> Date: Wed, 26 Feb 2025 19:52:47 +0100 Message-ID: <877c5cwnb4.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:AS9fKTeFw3qcIk2fPprqVrXFEnty9Duvff6JK1iTccHQz49lomO z/BQj3n5CpdDQAtDxebfKfwou2NGcBDsbNAvcNXfO5iP/1L9vUYbWXlcRmJxp2ZfIkmNQ19 zxE42/T3GltmpKP1fL7RyJfN4hfUyDHcXNkA+JFzqF95t+KymnQ3dfuZpjqU27vgQyouwkM 9ttHz5HcNNmUuxmto3MPQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:GGiv8NwoI5s=;8bNIFOJjOE9NQ6YuwHrmNhdUfQs gOypGfgNqoM1yyaNvfb+z0BWPm82bYzWgmC4R1shXmIq1sP8rLZ9NPi202TcDNahSqArT5Es8 lvAziik67Z7hnKQsEA/9IHrU4oHRAFDJ8cY9rLM6IRIEx7vGBHEkm6JjnzWm9D4Kz/txZ09OT BKS2A0CggaPFDCu377lkyTPQdsnrThjOM7PGd4PDfPdXta6/kAOwfwLFJK2qDh48uBzQf3o0k +p+3vuIcFYEsxNA7iOrqO+ggrNz3ocemf6uADdlF4/Xu5lUylA3YnmRE5ZpAu5A0h7tngh4Lr k4M6ZNkY/UJcFNX6qadEvM0F9BXbvddkOAW0UfVuT1BABnFb56WYxndrT4saHoP2aYP7rHNTY 1fcXv1i4EjOpMSXCrS66wyr0XLzHp85Fyuimnm5fdj8FHdco1qAbzVt+avb/wUG8h5tzNMBPt UKu82i27U+f0cVu0a0AG8dKEaYJB02plEpInkXh8wmC9wlxnQlr+xzo6ZCf7jVTcFLuGhC6G+ N1ANLDQ0fs976wS+93XN6DkOnx7Ndi4NT6my1eWmCrGywkIB2CA234fSkAiKDPg1gYbDS6kNE qBFskMu41EQBRWSDRYpmHuanx/5uLFucqSLBDbe3NhMlfctlkvXb3QoWBJ5kByLMmva/WDIkI byHCYkqUbq4L5FvgFWvbeJPHLlF45AdWBoS+CoWiX1w7A+hrSbU2P68RqdArdlMv754qw++ur 0E21E9FwUJ011XGNqH7NZAe8QoVoOjCmWU6rpi0ipqqYIZjCN+szz+UXLe3ygxmQtTtXLDhVz lpGbv/TWOeV7NBu7JbG/rklZ8/j8vrqvdGsjSR6Jzv4bgD9TWZy6dx76qHnPzUFzficZZlOJ3 V1DqHrd04mfcSjSmWWSbvSyJ4LPFcgaOAq6hGtUWlMbeAD6T2RoG3RVUQ4mgH9V87oDkseA+U BdChlBnHgNeENRI48mgzI6x0DbLY/eUw7v11o3ZNT8fXb1+ideZNK4HgwMBAI0Sd5RXgfVQaf YS7rmQMgzxYYly+3KQEN8fO7GvaZx1tdkeldQdYN0qA5D8Gnwpc79N7R0IOP392u0VCK45pgr HT/EgpjJuZHdKT8IxkoV3Teaar0LSEcjPBT1qnM9vr1o0GQZnc7XXa8hH+okeuYlyQLtsf6yU EAQtU79/NT5MMXeFwS/jekgxq5QOqjEF06AeexTJToNHca5FKgTMIs7yEUQVEGPOAPtOoV5zD C0r8IF1ju46u10xVfgRnYdW3p/0wuwYYzXCEYenZYYG3MhwvyyqFyXwAXm58BFR1nzxT9ORV/ 6IHro40qudU9Al3+KtC8Qde5oT1Cu79LxkgZ4r/oB+aqTry/L6711OMduwUQU/bRe03xgaaWz zrwqb52bwm09xC2sQCKNNEPos72r/9JSd7+qzsgawv+o5mt0YqNQGHGQwh X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@debbugs.gnu.org, Juri Linkov 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.7 (-) --=-=-= Content-Type: text/plain Philip Kaludercic writes: Hi Philip, >> But even with the default settings of reusing the same diff buffer, >> why change the default directory when it exists? Why not to check >> if the dir still exists like Philip proposed initially? > > I have also run into this issue when trying to save a diff buffer, and > it not appearing in the expected place but under /tmp/. As I said the other message, I cannot reproduce. I'm not a diff user (I use ediff), so I need a recipe for triggering the issue. However, what about the patch below? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el index 875deb68724..c8a1b7c0efa 100644 --- a/lisp/vc/diff.el +++ b/lisp/vc/diff.el @@ -187,7 +187,8 @@ diff-no-select (prin1-to-string new)))) (list (or old-alt old) (or new-alt new))))) - " "))) + " ")) + (thisdir default-directory)) (with-current-buffer buf (setq buffer-read-only t) (buffer-disable-undo (current-buffer)) @@ -198,14 +199,15 @@ diff-no-select (setq-local revert-buffer-function (lambda (_ignore-auto _noconfirm) (diff-no-select old new switches no-async (current-buffer)))) - (setq default-directory temporary-file-directory) + (setq default-directory thisdir) (setq diff-default-directory default-directory) (let ((inhibit-read-only t)) (insert command "\n")) (with-file-modes #o600 (if (and (not no-async) (fboundp 'make-process)) - (let ((proc (start-process "Diff" buf shell-file-name - shell-command-switch command))) + (let* ((default-directory temporary-file-directory) + (proc (start-process "Diff" buf shell-file-name + shell-command-switch command))) (set-process-filter proc #'diff-process-filter) (set-process-sentinel proc (lambda (proc _msg) @@ -213,7 +215,8 @@ diff-no-select (diff-sentinel (process-exit-status proc) old-alt new-alt))))) ;; Async processes aren't available. - (let ((inhibit-read-only t)) + (let* ((default-directory temporary-file-directory) + (inhibit-read-only t)) (diff-sentinel (call-process shell-file-name nil buf nil shell-command-switch command) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 14:25:59 2025 Received: (at 69606) by debbugs.gnu.org; 26 Feb 2025 19:25:59 +0000 Received: from localhost ([127.0.0.1]:55527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnN2c-0003ud-TA for submit@debbugs.gnu.org; Wed, 26 Feb 2025 14:25:59 -0500 Received: from mout01.posteo.de ([185.67.36.65]:48543) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnN2Z-0003uH-CW for 69606@debbugs.gnu.org; Wed, 26 Feb 2025 14:25:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4B3F0240027 for <69606@debbugs.gnu.org>; Wed, 26 Feb 2025 20:25:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1740597948; bh=eruLKT3Nsm3/g3/fj1Xtqr2I5eDagPZMN+/gnPfyiek=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=h/5zjgDRNDoMUTD/a0rQfR8yXcdpeV3XGWtrHGx06A+CqMTW2ezXPW7yoDCF1oEVu TwUXbOEmiviMA5rd/gQ126v5gxKFys2fxUzj5E99Gt41/dOfAJXt0nXp+JwDBisyIZ myPv1IQ6ilrh1gasjKmyyeSSiGm48Xfb2pdWyzYcu/BizYKXjaBq+XKkRQA9x0kAzp PRyhx+0In9+33Q1j16hPXP8vdZi21J59iugZZbBKRGCTM8fp9xA7XzQzbD5CElAADV sB/FTmVHs19EboLtwXkjleijLQMzwFiF+ftojyD8RELOBmt9x+9s7DsUIHyxYZfhEj QAHylvtWQgwhQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Z34FR4r9Lz6tn4; Wed, 26 Feb 2025 20:25:47 +0100 (CET) From: Philip Kaludercic To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <877c5cwnb4.fsf@gmx.de> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> <87seo0k5vz.fsf@posteo.net> <877c5cwnb4.fsf@gmx.de> 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, 26 Feb 2025 19:25:47 +0000 Message-ID: <87ldtsjyo4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@debbugs.gnu.org, Juri Linkov 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 (---) Michael Albinus writes: > Philip Kaludercic writes: > > Hi Philip, > >>> But even with the default settings of reusing the same diff buffer, >>> why change the default directory when it exists? Why not to check >>> if the dir still exists like Philip proposed initially? >> >> I have also run into this issue when trying to save a diff buffer, and >> it not appearing in the expected place but under /tmp/. > > As I said the other message, I cannot reproduce. I'm not a diff user (I > use ediff), so I need a recipe for triggering the issue. In my case I compared two files in Dired using `dired-diff' and then `default-directory' in the resulting buffer is "/tmp", not the same directory as I had open using Dired. > However, what about the patch below? > > Best regards, Michael. > > diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el > index 875deb68724..c8a1b7c0efa 100644 > --- a/lisp/vc/diff.el > +++ b/lisp/vc/diff.el > @@ -187,7 +187,8 @@ diff-no-select > (prin1-to-string new)))) > (list (or old-alt old) > (or new-alt new))))) > - " "))) > + " ")) > + (thisdir default-directory)) > (with-current-buffer buf > (setq buffer-read-only t) > (buffer-disable-undo (current-buffer)) > @@ -198,14 +199,15 @@ diff-no-select > (setq-local revert-buffer-function > (lambda (_ignore-auto _noconfirm) > (diff-no-select old new switches no-async (current-buffer)))) > - (setq default-directory temporary-file-directory) > + (setq default-directory thisdir) > (setq diff-default-directory default-directory) > (let ((inhibit-read-only t)) > (insert command "\n")) > (with-file-modes #o600 > (if (and (not no-async) (fboundp 'make-process)) > - (let ((proc (start-process "Diff" buf shell-file-name > - shell-command-switch command))) > + (let* ((default-directory temporary-file-directory) > + (proc (start-process "Diff" buf shell-file-name > + shell-command-switch command))) > (set-process-filter proc #'diff-process-filter) > (set-process-sentinel > proc (lambda (proc _msg) > @@ -213,7 +215,8 @@ diff-no-select > (diff-sentinel (process-exit-status proc) > old-alt new-alt))))) > ;; Async processes aren't available. > - (let ((inhibit-read-only t)) > + (let* ((default-directory temporary-file-directory) > + (inhibit-read-only t)) > (diff-sentinel > (call-process shell-file-name nil buf nil > shell-command-switch command) I didn't try it, but it looks like it should fix the issue. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 26 15:11:55 2025 Received: (at 69606) by debbugs.gnu.org; 26 Feb 2025 20:11:55 +0000 Received: from localhost ([127.0.0.1]:55600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnNl5-0006Aa-8S for submit@debbugs.gnu.org; Wed, 26 Feb 2025 15:11:55 -0500 Received: from mout.gmx.net ([212.227.17.21]:47703) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnNl3-0006AL-2q for 69606@debbugs.gnu.org; Wed, 26 Feb 2025 15:11:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1740600706; x=1741205506; i=michael.albinus@gmx.de; bh=uwQi3DfHdZ9TMzj+Ql0CSYI2kLhx+5de16dnb0k2yus=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=Hr4kc4QZbPttIpOqUcIVrZwl6UOWgV0Bby4LLARSSmBPdWySA8Q2MIVMTuLbiaA7 H6SxwxuUxCOS1hVYW7ke2Aj+Ftds7YjJz4zp6dXpF5mK2h1ez5ijRMW5AANUIY+Zw 8Lf+sA9j16XOY1uW3hDd9meealkZxpNyStm/bKv6EY7dCHEQsBqV91OrZgMownF6g xFROqKidnJMA+eBiggkPiWVZusH3uip8N9liOIo3XMnS30c93g21iYR/ZNbBGgOIm bt+zWpPBC/RweVt/EbR0fhAjlnaTEsmwAzSkv6yes66gki48cAhpcGFrQqeSYGYN8 /XDBs8hRYVyLlNQE+w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MJVDM-1u2img1ciG-00IFBZ; Wed, 26 Feb 2025 21:11:46 +0100 From: Michael Albinus To: Philip Kaludercic Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87ldtsjyo4.fsf@posteo.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> <87seo0k5vz.fsf@posteo.net> <877c5cwnb4.fsf@gmx.de> <87ldtsjyo4.fsf@posteo.net> Date: Wed, 26 Feb 2025 21:11:44 +0100 Message-ID: <871pvkwjnj.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:TFs+U4DSywk3KIwqzKQeDDZRtNMywOiMLuFoOrLftpNbarkLuh0 m30m+mcjiHYf7E2yWLrzguQG5BmKKMweW0y1+xAU996fDe+fo+/iuDshtRP4QXfCV6QPjWj DbpAxmg23EyBvlFdM8qYoL+NrBrmxmFyG53lU/xn2om70EZ6lBj3W23sTqpjO2fxL7XkzLj g299DWHEn90LW+3WOGgtg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:vJ2IDNhhmOs=;h+N39yef1T1bZ0pz00UvXTozYoy XwHpfh6jtoJBBi9Byzy/n5c717IrbMO1x1bMu10PMIIysk0922+Lte9UuArFuutZf5PKAVaH+ 4ntgsnRnqaNw7YG/Xsqcmt5YfZZdTV6ebpD7LTjilHgoeEFpUgTX7jXxBuISENV+dv1bbMNwB 4VYxYbNPl8iSOvzK3/nV4hCOiXbX65bo2hOGXUlf8/0/aN9jVdKuc8K4j5iCKbV86EtHBOQ/h A0k/LUdfRj/2Urji0wSZkbVnryCGh4WHHgnPgrjQn0i9ypJV3a5gw1pWchiy0gyP9Wxg8/myu V85nZZpsgvb+1jtumTyohMPEbnVh/7MAfJ1w9keFUU7zUDOi3f7HkfpXzStsODA0wfzQrZ5CY 3ojBzPhTC9ok/4bXky+bd3bcQ//FK43Za0EpwzgEHiS40bjLNbb7Yo+Z/GsyRviQOTLi8RaNp CiIs7o3WKndHqxeDufbFqkkJ37vAGNTuUUDvfjTq7S4yloI65Ume+v4SQT+HC+q2HUDE9SXYx sUPr0BIrPj7o2pn1o8gFQUBDUr62zcB5WQDsJeEgNeCIvwpVQo9lhDtpdvJaGE4HFOowNOXxz dhCsNVc9BEaXqhv9gExKyJS97IEg8lQkaAvNaUwS3+8Hqu6kM04k+zLhpLhXkjONcbHZj2mZG 77oR3kHPyAkYmFgwp8dIRnS50+DNQBDh496IOrhzQeei6zFC0YpQq2+WCY3Be9gSpbiyJrrbF pm7WdM7jL214aLV3D2xcvlEJIQLi+GcjvH9bXGhbCuoqAUwNsiJgZvmUZAgQz3ubO+OmlaRZy URfx1HCFy+rweWWEhhiPQtSfOriDCp9ThX2y4R4pbkyxAmOdioqgA5K10lPAXB1CcsdmIUTng Hv6myGCn5fx6pP//D/FwEScT2dKKg2bvusuaBhCnPGpGXvFTsJsgYLMgKRxQ8FURo3z98DLhT 7cTfI2or9aww1rg66IsYR4n9UX7enoNXHngAGYsrcgvnLL5ahZyDez0h4Nv2MArM5gJxpaTSS GmrnJtq/p6tcmovuclbXAiyrVF+M76G1fHH3/fDFZR/gZkSk1VaZdPyrlRqZBwX8LJTD8PIva 2FYFhfH+HGMc660n6bg5Gfd9HPhA0kgUyWPyTYmwWU8GDpsFsPS3vtyxs3nmsqFLHCEtaVyyp kPNnqy2jJHdf/vA8ck7U9tXOzdTZ6VQhgXt6oLRjOa6utQ622wdvl/1yPYyVuiFvx4TCM9Ig5 uSXJiDbx0uUmCxqfeoqjvJvg5hFIKtZwANf6iAQ88iUvTrZp8HVe5I44wfS+SC8WoL6i7PcJo dVezpm7LE1Csl2S2swEBkTB8J1oUOa7KxKiOKv222BY4ivFde7OkD+t59kYWDSb0hWm16oJKX wZtYUwT+EO04ycwPqyHRfvSAlWQ8qck2pgRtVuvQakIFcdu8ybhsVwIPXDCaOh02ppVysWIT2 JQz8RQg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Stefan Kangas , 69606@debbugs.gnu.org, Juri Linkov 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.7 (-) Philip Kaludercic writes: Hi Philip, >> However, what about the patch below? > I didn't try it, but it looks like it should fix the issue. Since I don't use diff myself, it would be great if somebody veryfies it. I don't want to push another fix to diff.el blindly. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 27 02:49:13 2025 Received: (at 69606) by debbugs.gnu.org; 27 Feb 2025 07:49:14 +0000 Received: from localhost ([127.0.0.1]:57851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tnYdt-0005wM-Lr for submit@debbugs.gnu.org; Thu, 27 Feb 2025 02:49:13 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:37687) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tnYdr-0005w3-D8 for 69606@debbugs.gnu.org; Thu, 27 Feb 2025 02:49:12 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 073F744286; Thu, 27 Feb 2025 07:49:03 +0000 (UTC) From: Juri Linkov To: Michael Albinus Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <871pvkwjnj.fsf@gmx.de> Organization: LINKOV.NET References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> <87seo0k5vz.fsf@posteo.net> <877c5cwnb4.fsf@gmx.de> <87ldtsjyo4.fsf@posteo.net> <871pvkwjnj.fsf@gmx.de> Date: Thu, 27 Feb 2025 09:48:36 +0200 Message-ID: <87bjunzv3f.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdekieeltdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepffegteefveelhfeljeefueehieduiedtfffhuddtkeeffffghfevheetgeeukeehnecukfhppeeluddruddvledruddthedruddujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeluddruddvledruddthedruddujedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepieeliedtieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehsthgvfhgrnhhkrghnghgrshesghhmrghilhdrtghomhdprhgtphhtthhopehphhhilhhiphhksehpohhsthgvohdrnhgvthdprhgtphhtthhopehmihgthhgrvghlrdgrlhgsihhnuhhssehgmhigrdguvg X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 69606 Cc: Philip Kaludercic , Stefan Kangas , 69606@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: -1.7 (-) >>> However, what about the patch below? > >> I didn't try it, but it looks like it should fix the issue. > > Since I don't use diff myself, it would be great if somebody veryfies > it. I don't want to push another fix to diff.el blindly. Thanks, I tried your patch, and confirm that the problem is fixed. The steps to verify were just '=' (dired-diff) and 'C-x C-j' (dired-jump). From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 28 12:09:04 2025 Received: (at 69606) by debbugs.gnu.org; 28 Feb 2025 17:09:04 +0000 Received: from localhost ([127.0.0.1]:52011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1to3rE-0003YQ-0i for submit@debbugs.gnu.org; Fri, 28 Feb 2025 12:09:04 -0500 Received: from mout.gmx.net ([212.227.17.21]:52417) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1to3rA-0003X9-W9 for 69606@debbugs.gnu.org; Fri, 28 Feb 2025 12:09:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1740762533; x=1741367333; i=michael.albinus@gmx.de; bh=xbAe9xuZ9f4fhLnJcY1UjQnDYmi/6GthufHt3eD6Xj8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=ns1TPH9nOC/8miacs/CeMW8tDZQb78KWx7weuVZbNqjeSzIO8h1FonCTRypebl5C jDdN9Npa3lLHzumpQwvUTQDnAs4hYKVhXlUTqS5pGs7pPbljsmdV7H4rlHhe/iccC CFCcID1boF81wQKkpb8Kw2Exg8/F3+5KQKGQ/bTnINw1iGsQ4y8qBbX4yz99FN8Zd ANwM50IrGzpE32MED768XY1zn7LsPqK0kYRZAey5WZzs2+7Z9q2eskuIQ9aOw8Vnd VTMZOZkOvZJLygMr7SiVbJJlWlzzDEEvJQURUHENkmctwLxqmGebE9DBgsie0suRR cqrLeTd+npuwXJ36mg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4z6q-1t6v0z0yay-013hez; Fri, 28 Feb 2025 18:08:53 +0100 From: Michael Albinus To: Juri Linkov Subject: Re: bug#69606: [PATCH] Ensure default-directory exists when generating diff In-Reply-To: <87bjunzv3f.fsf@mail.linkov.net> References: <87v85yo0h7.fsf@posteo.net> <87bk7q2vkx.fsf@gmx.de> <87sf115fn2.fsf@posteo.net> <8734szz73v.fsf@gmx.de> <87ikpac79z.fsf@posteo.net> <875xl9dft5.fsf@posteo.net> <874j0tg2ro.fsf@gmx.de> <87pljhbnbe.fsf@posteo.net> <87pljgesv6.fsf@gmx.de> <87cyfgb824.fsf@posteo.net> <87frkbengu.fsf@gmx.de> <87tt8onyu3.fsf@posteo.net> <87frk7y28v.fsf@gmx.de> <87o6yr45sx.fsf@mail.linkov.net> <87seo0k5vz.fsf@posteo.net> <877c5cwnb4.fsf@gmx.de> <87ldtsjyo4.fsf@posteo.net> <871pvkwjnj.fsf@gmx.de> <87bjunzv3f.fsf@mail.linkov.net> Date: Fri, 28 Feb 2025 18:08:49 +0100 Message-ID: <87v7sukndq.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:nb4m+bJjLTbwWErzCC6vDUJ9LERpVmIUJwBYxXG8ZZ+bZONK5eH YxsqAfEFuT4dz53RQT8BffomI9AfAbe5LlYlYXcAnios2pbAUyKFj0ehV8/S2k0lDzcdhXo RYAn1sihmrYB7u2+AhJ7x/xtXGGiPU1pAsqwKHCfaHdJw6i3z/aUURhCjemEiQ3zFH31qsa LNO9+/aIYfpaSn2csVq7w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:OhoNMez8B4w=;DgWdbYbk1cH1N46ESPg8nshC7Hq MXtPPjgNf2wiw+5k4WA9mHClSf++rtjRhZGzfYc9oR1HabvixOUYMTmDQnfzLOMdwj3L/1CXr h7Dl54FAWwtde+oA1nNcNJmn+WrWZ2Qka2oV0EvRp58JSs/GMKesGd+jdkfdJ73UHxrQgkWP9 X6SgTgy3eXBtBzeDuJ2qBYcAPUhwu+BX3imtQAosY78/iCG1A+mxmZFADJ45hq8UotVWTrPWm wdYujT1bn8Nmumh4JWnpQknUK8H2PaVSDUw5tT7Uxo7qbRoDqaBUR2KIME9Nbrs7XLqfG73RL VnW/I98VvKF9BRmYvqUJ3JREcHsfwOgr4Sx9DvkBV7T1Mx/4N6raN3NjolkJquaTa9wQJlaMf rWb3x6+Fb7SvnVlG4eRsqQaaQ5A6guuSZwgkjURq8s3+YedlNQz0puDRn+sLd+LvihoPYuGnb fjgIUnVzNGXKJj6tNNiwINt5M72r8y8BuPvT+NaXL9YHak0ol4egy7tlAkC5IvlqQe17+L+sr nxKeahWmyXfEJDVWWsbKobNLy2TjDZNGI6HmMG0jk57Cn8toWKSvqNqptFNYiCe+enHtYue3e vtYiL5c9YMiyC5kZWIpLjFZY0kTqcwKOVELRwt54vw3mmBUO/to6A46Ff+Nmlkn8Aq2Hl2NQ8 5C+IkxnSK68W0KEPqpVxm9w64+eCIh2PSvlzgYw527A38/hfKMbjXLKBQjCLYAGkh7ZmLFHva cEJdJ3BTKYSsYP056MPx8xvbdRsk2sNw1bnU/YmM4nqyt4D4mChlFCfeo/U4WMDdvXMCSvfwS fnox2PBqRuPisUhisXKKdW8SqIUnZJiUkCtp6JiDflVYRXH0ORH32mVkyciHkZMU6EnvG7hzn XihXY8PNOSDdra6Ad09zG+ED5ebvVbsKvGADMRVc1ZmCLSCoOQNi2+RuZ0h4iSE6HaogKfK8j KYzRevLvPZdROz2BmGbyPJO7oxQSwwatK4Gy558Q87bq3hhMb/S6HbG+fdvl4cF3DPkZBc928 3ozcjc7o8luIqjX2laVOevJkYOf974HKbAMu8VHWoChHPo213sQC4UzbGgq3VEN4V+9o7kBDJ 4uhSVd1Bymom/gwiNhQa0cEX/WKpnnQGKTgs6n2eKXKinEIdqacS0/qprRpKkXnVVA+dwQRnW 9IrV+nXd+hE70TstFKKOcq89cFdODXVGdnW6iEYLhMANPIPGakKx/xzNeYzWInxaOaykkWw7F ecjwce1VCZ/FJznkWIlAe0hOW4wQYk1Qjm5THxi9d+NxFwHl1Go5Qf5hOmzNqntoO1cCzgMRY ltfcnceTCoWFWd80Agoyxo8kBedyr/kjaO2zevibe25m/9Sqmj2fwrbRzLD2dHTsWfoVZSHOQ k9Vg87J2Cvv2pbn6Jg38TpXLLxAC4o/GZSDHOhPCyvW4FAGJKSBYhctQLR X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 69606 Cc: Philip Kaludercic , Stefan Kangas , 69606@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: -1.0 (-) Juri Linkov writes: Hi Juri, >>>> However, what about the patch below? >> >>> I didn't try it, but it looks like it should fix the issue. >> >> Since I don't use diff myself, it would be great if somebody veryfies >> it. I don't want to push another fix to diff.el blindly. > > Thanks, I tried your patch, and confirm that the problem is fixed. Thanks for the feedback. I've pushed the change to the emacs-30 branch. > The steps to verify were just '=' (dired-diff) and 'C-x C-j' (dired-jump). That's exactly what I did. No idea, why the problem didn't appear to me. Best regards, Michael. From unknown Sun Jun 22 11:41:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 29 Mar 2025 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator