From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#65685: 29.1; Inconsistent behavior of quoted file name "/:~" across platforms Date: Sun, 15 Oct 2023 11:50:38 +0200 Message-ID: <87v8b8mcy9.fsf@gmx.de> References: <156539f1-a26e-848b-16b9-8c12ea46f321@gmail.com> <8734yshrx9.fsf@gmx.de> <143e9622-960b-0841-db3f-d79b021eedb2@gmail.com> <87a5smvbsk.fsf@gmx.de> <83il79sl9a.fsf@gnu.org> <87bkd1eam0.fsf@gmx.de> <83ttqtqwdl.fsf@gnu.org> <87jzrpnup1.fsf@gmx.de> <877cnpnoa7.fsf@gmx.de> <83lec5qayq.fsf@gnu.org> <871qdwnyw8.fsf@gmx.de> <83wmvop6rj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18601"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: jporterbugs@gmail.com, 65685@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 15 11:51:54 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrxms-0004e4-0K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Oct 2023 11:51:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrxme-0005gE-4n; Sun, 15 Oct 2023 05:51:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrxmc-0005fh-G9 for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 05:51:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrxmc-00045g-7h for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 05:51:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrxn0-00056y-2w for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2023 05:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Oct 2023 09:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65685 X-GNU-PR-Package: emacs Original-Received: via spool by 65685-submit@debbugs.gnu.org id=B65685.169736347319585 (code B ref 65685); Sun, 15 Oct 2023 09:52:02 +0000 Original-Received: (at 65685) by debbugs.gnu.org; 15 Oct 2023 09:51:13 +0000 Original-Received: from localhost ([127.0.0.1]:51222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrxmD-00055p-1I for submit@debbugs.gnu.org; Sun, 15 Oct 2023 05:51:13 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:40133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrxmA-00055a-IY for 65685@debbugs.gnu.org; Sun, 15 Oct 2023 05:51:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1697363439; x=1697968239; i=michael.albinus@gmx.de; bh=132PEo6F+rxO+mAQgItr86EYWiLBq3sisuAgIUBfOmY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=Ulo6joifWlUDfkSQmtGE5xlhmzmhTjFQusfjuS9zWnCsAxbBvb53bJNSZNQ1J5fdKpNnpm341XC Rkub14D7gJPzUZitnq/K6QpFTHCRz7OivmNYRBdf7ShU3HLDe3N7jKWjSDhVM7b4UJWnOeEx/z4NB b3A2uJu0NA5qWYXkyxRfmmJk4wzNmlxUN/OTsqhRR4qa5dAwAWnr37RwLvad+Gn+8aGVoFjyL/1nK FgkPW00hecyR9YtAoJq1yw2BEYEEmVmajbt7f78Z796aQlRyjOKjklELWI24MgIt7RUfuexXS22xT m/sAwGnsjCKfhxSj/iUbP+07ciVQYh0wggDw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.30]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5VHG-1rbV2L2IRu-016uVF; Sun, 15 Oct 2023 11:50:39 +0200 In-Reply-To: <83wmvop6rj.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Oct 2023 12:36:00 +0300") X-Provags-ID: V03:K1:li+o2IFGYB7k56IlFb7mRPvX5ZjX+lotyRgJ/3b2OTCx1h9+O/q iA8qv+bV3RV1C5LUTniirro9Ddui7lb8lEEQyQj2R38suBEQyz6YnJfvjkF+H72t3VKKKi1 +XgvOH1AceqA+5oYR32cBQEgz7MDVtk9NPpbC+dhjM95pUCZmjZtdtP+srIjSpLtr+HCmUl uw1z56HvJCEGuyh8tyOxA== UI-OutboundReport: notjunk:1;M01:P0:kYyJfOCrVO0=;8DDDCOzBVfhW6WPk8+YP2OKM+0k P2/eGo0zsoUZsJkiaA0XD7joN0GOMD2YryIJsYhoXTCl1yr0vNcy83n7PPppJ/MU1XL2UY9Ei SEmcsR/8p8gNwR8nf6a9ST+w4KdXLiJYPXDRQlCv0Ddw6XctZV5Ae7XZ/W87P0bli7xW64k1E bUQd5FQQpTalh0oklyjGtT9JYsqFP0HvnmXeZ+9dWgS0vWZLVLoI4QT+ftkMivqu/V0Uhz7hw MInkDoHP3IDVuhTp8kJlwtFpuLfwpAzWfZauIPOh/68F+GD9PyBR5vbeMvl8goYsyMpJ1t1X1 BIq2w7i+R2hJO2Qbcd61g5tCqVrXevNgU6ryCDn/1/cERsJTeJkdt/fnvC5RfxhNYda+PdhIO Yurs2L7SNWSqvkXHr2xbAjC/KoTBqFRHwfhh3bONzrJdY+KZl1dMu4vrrHcg27+8zlTOXwCCW npu1KOEkQYuc5wOSicDShIOUIwxbT2gXcYnmkXSh16nmbY9qR3T0g3VG3himtEJbMt/cOLVN+ HCR5NZRO8tscvDr7XJZw925S2M2wtptYt8DEw6WzC40KeXCBJwFX5jTQJKMMaoCbmdEBjivu1 fEY6kaBh+mq1FrGi3gAB4J3OntInuXlDYSu+NYo0Z6j7QydHv3SY65agaProXcnDZCHGnih6n lXZnZLbITaLhuGUY24hA8wc0c2bokSfpE8SsHNExdxRw6E9so87xQv+c+BqewffD1WvyhMwH6 gdUyw9kbadsIWWmF7r3hxxkTzC1ASA0V9Laxn0cs3WLeVmzt9SCbrpP0TvbBpUWSLgUuHkME X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272494 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: Hi Eli, >> >> >> The only difference I could think of is that the directory Emacs = uses >> >> >> here has whitespace in its name (see my original report), whereas= on >> >> >> Windows 10 it probably doesn't. >> >> > >> >> > FTR, if I use a directory with spaces in its name, it fails for me= as >> >> > well. I'm now debugging ... >> >> >> >> It looks, like it is a problem in the test case code >> >> itself. abbreviate-file-name does not work as I expect in this >> >> combination. >> > >> > Can you tell more about this? I'm surprised any file-related >> > primitive in Emacs cares about whitespace in file names. >> >> Perhaps we have uncovered a bug in abbreviate-file-name, don't >> know. I'll check when time permits. > > I'd like to understand this sooner rather than latter. Can you show > some simple recipe which fails under these conditions? I haven't completed all tests yet, still in debugging. As recent result, I believe abbreviate-file-name works correctly. Rather, the problem seems to be with temporary-file-directory. It is used in the prelude of the test to set the HOME environment variable. But later on, in the macros files-tests--with-temp-non-special and files-tests--with-temp-non-special-and-file-name-handler, it is modified to (file-truename temporary-file-directory) - this difference seems to be the culprit. >> However, it isn't related to the change in question of this bug report, >> handling expand-file-name for constructs like "/:~..." and >> "/ssh:host:/:~...". abbreviate-file-name has been used to create a >> temporary test file for this case, it isn't target of the test itself. > > I applied your changes to the test, and it passes after that, thanks. Could you pls apply the appended patch instead? I'll continue to finish all my tests, but if this patch passes also in your environment, it would give me sufficient confidence that it is fixed. Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 8f6495a293c..78d469580ba 100644 =2D-- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -664,7 +664,8 @@ files-tests-file-name-non-special-expand-file-name (ert-deftest files-tests-file-name-non-special-expand-file-name-tilde () (let ((process-environment - (cons (format "HOME=3D%s" temporary-file-directory) process-envi= ronment)) + (cons (format "HOME=3D%s" (file-truename temporary-file-director= y)) + process-environment)) abbreviated-home-dir) (files-tests--with-temp-non-special (tmpfile nospecial) (let (file-name-handler-alist) --=-=-=--