all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: ffap: Directory does not exist, create it? Yeah sure, without permission
Date: Tue, 04 Mar 2003 11:59:24 -0700	[thread overview]
Message-ID: <3E64F78C.3020804@ihs.com> (raw)
In-Reply-To: mailman.2552.1046386654.21513.bug-gnu-emacs@gnu.org

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:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

       reply	other threads:[~2003-03-04 18:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2552.1046386654.21513.bug-gnu-emacs@gnu.org>
2003-03-04 18:59 ` Kevin Rodgers [this message]
2003-02-27 18:30 ffap: Directory does not exist, create it? Yeah sure, without permission Dan Jacobson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E64F78C.3020804@ihs.com \
    --to=kevin.rodgers@ihs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.