bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-alternate-file from dired wildcard dir


From: Kevin Rodgers
Subject: Re: find-alternate-file from dired wildcard dir
Date: Fri, 12 Apr 2002 12:18:24 -0600

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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]