help-emacs-windows
[Top][All Lists]
Advanced

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

[h-e-w] Re: Traditional find-file vs. file open dialog?


From: John Paul Wallington
Subject: [h-e-w] Re: Traditional find-file vs. file open dialog?
Date: 30 Jul 2002 20:05:23 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

I wrote:

> I wrote:
> 
> > Rob Allen <address@hidden> wrote:
> >  
> > > Unfortunately, use-dialog-box only applies to commands initiated using
> > > the mouse.
> > > 
> > > How do I get gnu emacs to use the dialog box for the keyboard command
> > > c-x,c-f ?
> > 
> > Maybe you can bind `last-nonmenu-event' to nil at the right moment?
> > 
> > This appears to work in LessTif (lightly tested):
> > 
> > (defadvice read-file-name (around use-dialog activate)
> >   "Always use file selection dialog, if `use-dialog-box' is non-nil."
> >   (let ((last-nonmenu-event nil))
> >     ad-do-it))
> 
> Sorry, if you are only interested in `find-file' [1] then the
> following would be better:
> 
> (defadvice find-file-read-args (around use-dialog activate)
>   "Always use file selection dialog, if `use-dialog-box' is non-nil."
>   (let ((last-nonmenu-event nil))
>     ad-do-it))
> 
> [1] I'm the opposite: I like setting `use-dialog-box' to t, then
> advising `read-file-name' to avoid the dreaded file selection dialog :-)

Hmm.  `find-files-read-args' was added to Emacs on 2002-05-19.  So if
you don't have it maybe advising `read-file-name' will do.

(Sheesh... following up to your follow-up to yourself; how rude!)

-- 
John Paul Wallington





reply via email to

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