GNU bug report logs - #35448
26.2; save-buffer silently fails in winNT if buffer name has forbidden chars

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Sat, 27 Apr 2019 09:37:01 UTC

Severity: normal

Tags: notabug

Found in version 26.2

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 35448 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 35448 <at> debbugs.gnu.org
Subject: Re: bug#35448: 26.2;
 save-buffer silently fails in winNT if buffer name has forbidden chars
Date: Sat, 27 Apr 2019 13:05:05 +0300
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Sat, 27 Apr 2019 18:36:14 +0900
> 
> 
> emacs -Q
> ;; Do the following recipe in an empty directory
> 
> C-x b  schrodinger:cat RET
> Miauuuu!!!
> C-x C-s RET
> ;; A message in the minibuffer confirms the name of the file writen to disk.
> ;; Apparentely, the base name of such a file matches the buffer name.
> M-: (file-exists-p buffer-file-name)
> => t
> M-: (string= (file-name-nondirectory buffer-file-name) (buffer-name))
> => t
> 
> 
> ;; In fact, no file matches the buffer name in the directory
> M-: (directory-files default-directory nil (buffer-name))
> => nil
> 
> ;; There is an _empty_ file with name, the buffer name upto the colon
> M-: (directory-files default-directory nil "schrod")
> => ("schrodinger")

It's a feature.  See

  https://en.wikipedia.org/wiki/NTFS#Alternate_data_streams_(ADS)
  http://www.flexhex.com/docs/articles/alternate-streams.phtml

Whether we should allow this in Emacs is a different matter, but this
was supported since day one, FWIW.




This bug report was last modified 6 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.