emacs-devel
[Top][All Lists]
Advanced

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

Re: find-file dialog in Carbon Emacs is broken


From: Jan D.
Subject: Re: find-file dialog in Carbon Emacs is broken
Date: Sat, 9 Oct 2004 21:15:54 +0200

On Sat, Oct 09, 2004 at 07:33:34PM +0200, Jan D. wrote:
Basically Emacs will have to change so that commands from the menu bar and tool bar call a new function that knows if this is a save or load. We then
remove the use of a dialog entirely from read-file-name.

This sounds like a rather fragile method -- it means non-standard emacs
commands (and of those, only the ones that someone remembered to change) will cease to use the dialog boxes entirely, which seems guaranteed to cheese some
people off.

I'd imagine we could make the selection of new and old behaviour
customizable. Which should be default I'm not sure. Maybe new behaviour
for those file dialogs that can't support the old behaviour (new GTK
and Mac OSX file dialogs).  The thing is if we switch to the new GTK
dialog and/or the Mac OSX dialog, the user will be frustrated anyway.
If these dialogs are opened in the wrong mode (i.e. existing file
instead of new file), there is no way to enter a new file name in these
dialogs.

Also, using a Motif compiled version of Emacs today gives you file dialogs, but the Lucid version does not. So the usage of file dialogs are different
for different users already.


What does read-file-name use now? It seems like the state of MUST-MATCH is a pretty good hint what is wanted. If the File menu invoked something like `find-existing-file' (like find-file, but sets MUST-MATCH to non-nil) for the
"Open" entry, wouldn't that just work?

No, it is no good at all.  Most operations doesn't set MUST-MATCH when
an existing file is to be opened.  Take for example ediff.  It needs
two existing files, but it is impossible to set MUST-MATCH in this case.
For the GTK case, the button would then be "Save" (and the word "Save"
appears in other parts of the dialog as well), and this is not possible
to change from Emacs.  It is just cosmetic, but looks bad and would
lead to confusion.

Today read-file-name just checks if there is a file dialog in the toolkit
Emacs was compiled for (and that the use-dialog-box and use-file-dialog
variables are not nil) and assumes that the dialog doesn't need to know
if this is an open for a new or existing file.  Which is fine for the
Motif and old GTK dialogs.

        Jan D.





reply via email to

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