all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jporterbugs@gmail.com, 65685@debbugs.gnu.org
Subject: bug#65685: 29.1; Inconsistent behavior of quoted file name "/:~" across platforms
Date: Sat, 14 Oct 2023 18:48:16 +0200	[thread overview]
Message-ID: <877cnpnoa7.fsf@gmx.de> (raw)
In-Reply-To: <87jzrpnup1.fsf@gmx.de> (Michael Albinus's message of "Sat, 14 Oct 2023 16:29:46 +0200")

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

Michael Albinus <michael.albinus@gmx.de> 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.

Well, since it isn't needed for the test, the appended patch has fixed
it for me. Would you like to check?

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1125 bytes --]

diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index 8f6495a293c..07e1be015da 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -668,12 +668,14 @@ files-tests-file-name-non-special-expand-file-name-tilde
         abbreviated-home-dir)
     (files-tests--with-temp-non-special (tmpfile nospecial)
       (let (file-name-handler-alist)
-        (setq nospecial (file-name-quote (abbreviate-file-name tmpfile))))
+        (setq nospecial
+              (file-name-quote (concat "~/" (file-name-nondirectory tmpfile)))))
       (should (equal (expand-file-name nospecial)
                      (expand-file-name (file-name-unquote nospecial t)))))
     (files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial)
       (let (file-name-handler-alist)
-        (setq nospecial (file-name-quote (abbreviate-file-name tmpfile))))
+        (setq nospecial
+              (file-name-quote (concat "~/" (file-name-nondirectory tmpfile)))))
       (should-not
        (equal (expand-file-name nospecial)
               ;; The file name handler deletes the ".special" extension.

  reply	other threads:[~2023-10-14 16:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 19:22 bug#65685: 29.1; Inconsistent behavior of quoted file name "/:~" across platforms Jim Porter
2023-10-03 11:22 ` Michael Albinus
2023-10-10  4:27   ` Jim Porter
2023-10-13 14:26     ` Michael Albinus
2023-10-14  0:31       ` Jim Porter
2023-10-14  7:42         ` Michael Albinus
2023-10-14  7:42         ` Eli Zaretskii
2023-10-14  7:48           ` Michael Albinus
2023-10-14 10:56           ` Michael Albinus
2023-10-14 11:25             ` Eli Zaretskii
2023-10-14 14:29               ` Michael Albinus
2023-10-14 16:48                 ` Michael Albinus [this message]
2023-10-14 19:07                   ` Eli Zaretskii
2023-10-15  7:11                     ` Michael Albinus
2023-10-15  9:36                       ` Eli Zaretskii
2023-10-15  9:50                         ` Michael Albinus
2023-10-15  9:58                           ` Eli Zaretskii
2023-10-15 10:29                             ` Michael Albinus
2023-10-15 20:12 ` Mattias Engdegård
2023-10-16  7:07   ` Michael Albinus
2023-10-16  7:30     ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cnpnoa7.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=65685@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.