unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19963: 25.0.50; Unable to create a directory with name same as an existing file
@ 2015-02-27 19:56 Kaushal
  2015-02-27 21:48 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal @ 2015-02-27 19:56 UTC (permalink / raw)
  To: 19963

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

Hi,

If a folder has a file "a.b", I can't create a folder named "a.b" in the
same parent folder.

Here is how to recreate that in an "emacs -Q" session:

> emacs -Q &
C-x C-w C-a C-k ~/.emacs.d/test.el
M-: (make-directory "~/.emacs.d/test.el")

Doing so gave me the below error.

Unix allows have a file and a directory with the same name in the same
parent folder. I believe that the distinction between an existing file or
an existing directory is not being made here.

Debugger info:
Debugger entered--Lisp error: (file-already-exists "File exists"
"/home/kmodi/.emacs.d/test.el/")
  make-directory-internal("/home/kmodi/.emacs.d/test.el/")
  make-directory("~/.emacs.d/test.el/")
  eval((make-directory "~/.emacs.d/test.el/") nil)
  eval-expression((make-directory "~/.emacs.d/test.el/") nil)
  funcall-interactively(eval-expression (make-directory
"~/.emacs.d/test.el/") nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4)
 of 2015-02-23 on ...
Repository revision: ed7005c0e974a43c9b63d6f5d8ef6bd4099ba449
Windowing system distributor `The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Client release 5.10 (Tikanga)

Configured using:
 `configure --prefix=/home/kmodi/usr_local/apps/emacs/25.0
 CPPFLAGS=-fgnu89-inline'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Debugger

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Saving file /home/kmodi/.emacs.d/test.el...
Wrote /home/kmodi/.emacs.d/test.el

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils help-mode debug vc-git diff-mode
easymenu easy-mmode time-date tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 81214 6429)
 (symbols 48 18676 0)
 (miscs 40 65 124)
 (strings 32 13094 4483)
 (string-bytes 1 366132)
 (vectors 16 10734)
 (vector-slots 8 399013 6373)
 (floats 8 80 106)
 (intervals 56 209 19)
 (buffers 976 14)
 (heap 1024 234303 1302))

[-- Attachment #2: Type: text/html, Size: 5295 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#19963: 25.0.50; Unable to create a directory with name same as an existing file
  2015-02-27 19:56 bug#19963: 25.0.50; Unable to create a directory with name same as an existing file Kaushal
@ 2015-02-27 21:48 ` Eli Zaretskii
  2015-02-27 21:50   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2015-02-27 21:48 UTC (permalink / raw)
  To: Kaushal; +Cc: 19963-done

> From: Kaushal <kaushal.modi@gmail.com>
> Date: Fri, 27 Feb 2015 19:56:30 +0000
> 
> If a folder has a file "a.b", I can't create a folder named "a.b" in the same
> parent folder.

As expected.

> Unix allows have a file and a directory with the same name in the same parent
> folder.

Not here, it doesn't:

  eliz@fencepost:~/ttttttt$ touch a.b
  eliz@fencepost:~/ttttttt$ ls
  a.b
  eliz@fencepost:~/ttttttt$ mkdir a.b
  mkdir: cannot create directory `a.b': File exists
  eliz@fencepost:~/ttttttt$

A directory is just a special kind of file on most filesystems, and
like a file, it has an entry in its parent directory.  So there cannot
be a file and a directory with the same name, because there can be 2
identical entries in their parent directory.

This is not a bug in Emacs, this is a limitation of the underlying
filesystem to which Emacs heeds.

I'm closing this bug.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#19963: 25.0.50; Unable to create a directory with name same as an existing file
  2015-02-27 21:48 ` Eli Zaretskii
@ 2015-02-27 21:50   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2015-02-27 21:50 UTC (permalink / raw)
  To: 19963, kaushal.modi

> Date: Fri, 27 Feb 2015 23:48:59 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 19963-done@debbugs.gnu.org
> 
> A directory is just a special kind of file on most filesystems, and
> like a file, it has an entry in its parent directory.  So there cannot
> be a file and a directory with the same name, because there can be 2
> identical entries in their parent directory.                ^^^^^^

I meant "cannot be", of course.  Sorry.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-27 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 19:56 bug#19963: 25.0.50; Unable to create a directory with name same as an existing file Kaushal
2015-02-27 21:48 ` Eli Zaretskii
2015-02-27 21:50   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).