emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ffap.el] dired-at-point bug


From: Hiroshi Fujishima
Subject: [ffap.el] dired-at-point bug
Date: Thu, 19 Feb 2004 13:57:40 +0900
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v)

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  <address@hidden>  (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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]