all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
Subject: find-file-existing
Date: Thu, 28 Sep 2006 18:10:10 +0200	[thread overview]
Message-ID: <451BF3E2.20408@gmx.at> (raw)

`find-file-existing' is currently defined as:

(defun find-file-existing (filename &optional wildcards)
   "Edit the existing file FILENAME.
Like \\[find-file] but only allow a file that exists."
   (interactive (find-file-read-args "Find existing file: " t))
   (unless (file-exists-p filename) (error "%s does not exist" filename))
   (find-file filename wildcards)
   (current-buffer))

The wildcards argument is misleading.  I'd rewrite this as:

(defun find-file-existing (filename)
   "Edit the existing file FILENAME.
Like \\[find-file] but do not process wildcards and only allow a file
that exists."
   (interactive (nbutlast (find-file-read-args "Find existing file: " t)))
   (if (and (not (interactive-p)) (not (file-exists-p filename)))
       (error "%s does not exist" filename)
     (find-file filename)
     (current-buffer)))

Obviously, one could do wildcards matching as well, but maybe it's not
worth the trouble.

                 reply	other threads:[~2006-09-28 16:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=451BF3E2.20408@gmx.at \
    --to=rudalics@gmx.at \
    /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.