all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* vc-find-root and nonexistent drives
@ 2008-02-16  3:52 Juanma Barranquero
  2008-02-16 13:43 ` Eli Zaretskii
  2008-02-16 14:29 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Juanma Barranquero @ 2008-02-16  3:52 UTC (permalink / raw)
  To: Emacs Devel

On Windows, trying to visit a file in a non-existent drive loops in
`vc-find-root'.

The reason is that currently, `vc-find-root' does:

  (while (not (file-directory-p file))
    (setq file (file-name-directory (directory-file-name file))))

which assumes that the output of `file-name-directory' will be
different in each iteration of the while loop. That is not so when the
drive does not exist, for example:

  (file-name-directory (directory-file-name "g:/")) => "g:/"

This is not an obscure bug. "C-x C-f g:/myfile", o "emacsclient
g:/myfile" will trigger it if g: does not exist. It happens in
EMACS_22_BASE too.

             Juanma




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

end of thread, other threads:[~2008-02-17 19:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16  3:52 vc-find-root and nonexistent drives Juanma Barranquero
2008-02-16 13:43 ` Eli Zaretskii
2008-02-16 18:12   ` Juanma Barranquero
2008-02-16 20:16     ` Stefan Monnier
2008-02-16 20:18       ` Juanma Barranquero
2008-02-16 14:29 ` Stefan Monnier
2008-02-16 18:09   ` Juanma Barranquero
2008-02-16 20:33     ` Stefan Monnier
2008-02-16 20:46       ` Juanma Barranquero
2008-02-17  4:18       ` Eli Zaretskii
2008-02-17 19:00         ` Stefan Monnier

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.