all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ffap.el] dired-at-point bug
@ 2004-02-19  4:57 Hiroshi Fujishima
  2004-02-23  3:55 ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Hiroshi Fujishima @ 2004-02-19  4:57 UTC (permalink / raw)


In emacs-21.3

M-x ffap-bindings and C-x d ~not-exest creates `~not-exest' directory.

In emacs-21.3.50 (after 2003-03-06)

M-x ffap-bindings and C-x d ~not-exest causes `Wrong type argument:
stringp, nil' error, because (file-name-directory "~not-exest") return
nil though file-writable-p() require string type argument.

2003-03-06  Kevin Rodgers  <kevin.rodgers@ihs.com>  (tiny change)

        * ffap.el (dired-at-point): Check whether the user can create a
        directory before asking about creating it.

Index: ffap.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ffap.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- ffap.el	15 Feb 2003 19:26:25 -0000	1.35
+++ ffap.el	6 Mar 2003 20:30:05 -0000	1.36
@@ -1,4 +1,4 @@
-;;; ffap.el --- find file (or url) at point
+;; ffap.el --- find file (or url) at point
 ;;
 ;; Copyright (C) 1995, 96, 97, 2000  Free Software Foundation, Inc.
 ;;
@@ -1658,7 +1658,8 @@
       (if (file-directory-p filename)
 	  (dired (expand-file-name filename))
 	(dired (concat (expand-file-name filename) "*"))))
-     ((y-or-n-p "Directory does not exist, create it? ")
+     ((and (file-writable-p (file-name-directory filename))
+           (y-or-n-p "Directory does not exist, create it? "))
       (make-directory filename)
       (dired filename))
      ((error "No such file or directory `%s'" filename)))))

-- 
Hiroshi Fujishima

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

end of thread, other threads:[~2004-02-24  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-19  4:57 [ffap.el] dired-at-point bug Hiroshi Fujishima
2004-02-23  3:55 ` Juri Linkov
2004-02-24  6:45   ` Hiroshi Fujishima

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.