[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ffap: Directory does not exist, create it? Yeah sure, without permis
From: |
Kevin Rodgers |
Subject: |
Re: ffap: Directory does not exist, create it? Yeah sure, without permission |
Date: |
Tue, 04 Mar 2003 11:59:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
Dan Jacobson wrote:
Using ffap, many a mistype causes the often seen
Directory does not exist, create it? (y or n)
Well, as 99% of the time, the answer is n, at least it could check
if the user could indeed create a dir there before asking, as the
answer would be
Creating directory: permission denied, /etc/nurdly/
anyway.
*** emacs-20.7/lisp/ffap.el.orig Sat Feb 13 07:42:35 1999
--- emacs-20.7/lisp/ffap.el Tue Mar 4 11:54:20 2003
***************
*** 1658,1664 ****
(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? ")
(make-directory filename)
(dired filename))
((error "No such file or directory `%s'" filename)))))
--- 1658,1665 ----
(if (file-directory-p filename)
(dired (expand-file-name filename))
(dired (concat (expand-file-name filename) "*"))))
! ((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)))))
Better would be just to assist the user in typing the names of
existing files, i.e. don't wipe out what he has typed so far...
???
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: ffap: Directory does not exist, create it? Yeah sure, without permission,
Kevin Rodgers <=