unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevinr@ihs.com>
Subject: Re: find-alternate-file from dired wildcard dir
Date: Fri, 12 Apr 2002 12:18:24 -0600	[thread overview]
Message-ID: <3CB724F0.FBB19D10@ihs.com> (raw)
In-Reply-To: 3CB70635.620302DC@ihs.com

Kevin Rodgers wrote:
> 
> Dan Jacobson wrote:
> >
> > find-alternate-file prompts with the current filename -- quite
> > helpful.  However if it is in a dired wildcard directory, e,g, from C-x d
> > *.c then this doesn't work.  The *.c isn't even available from M-n either.
> 
> Here's a workaround to make it available via `M-n':
...

Sorry, that breaks find-alternate-file outside of Dired buffers:

(defadvice find-alternate-file (around dired-directory activate)
  "In Dired, use `dired-directory' as `buffer-file-name' when called
interactively."
  (let ((buffer-file-name (if (and (interactive-p)
				   (eq major-mode 'dired-mode)
				   (stringp dired-directory))
			      dired-directory
			    buffer-file-name)))
    ad-do-it))

--
Kevin Rodgers <kevinr@ihs.com>

  reply	other threads:[~2002-04-12 18:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 17:47 find-alternate-file from dired wildcard dir Dan Jacobson
2002-04-12 16:07 ` Kevin Rodgers
2002-04-12 18:18   ` Kevin Rodgers [this message]
2002-04-16  4:20     ` insert current buffer name anywhere vs. M-p M-n Dan Jacobson
2002-04-16 10:22       ` Ehud Karni

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=3CB724F0.FBB19D10@ihs.com \
    --to=kevinr@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).