all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp>
Subject: [ffap.el] dired-at-point bug
Date: Thu, 19 Feb 2004 13:57:40 +0900	[thread overview]
Message-ID: <7c7jyjr7i3.fsf@eyesore.nature.tsukuba.ac.jp> (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

             reply	other threads:[~2004-02-19  4:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19  4:57 Hiroshi Fujishima [this message]
2004-02-23  3:55 ` [ffap.el] dired-at-point bug Juri Linkov
2004-02-24  6:45   ` Hiroshi Fujishima

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=7c7jyjr7i3.fsf@eyesore.nature.tsukuba.ac.jp \
    --to=pooh@nature.tsukuba.ac.jp \
    /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.