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: Steven Tamm
Subject: Re: find-file dialog in Carbon Emacs is broken
Date: Sat, 9 Oct 2004 20:07:19 -0700

Another distinction is whether or not we mean to open a file or a directory. To make the distinction in both the w32 & OSX code, we check for the prompt starting with "Dired". That makes me ill. It also figures out if it's open vs. save by comparing the directory with the default_filename (i.e. if there is no default filename, then it must be open). If we are going to change any semantics, we should also specify whether or not it is trying to open a file, open a directory, or save: Distinct from mustmatch.

Right now, the code I have uses the following decision tree:
- If prompt starts with "Dired" use a ChooseFolderDialog
- If mustmatch, use the ChooseFileDialog
- If the directory is the same as the default_filename, use ChooseFileDialog
- Otherwise use the PutFileDialog

With newer sematics, the dialogs would "do the right thing." For example, if the request was "open file"and mustmatch was t, then I should use the standard ChooseFileDialog. If mustmatch was nil, it's still "open file" but I would have to present the ability to enter a filename, which is not supported by default in the OS (but easy to add).

-Steven

On Oct 9, 2004, at 1:20 PM, Jan D. wrote:



No, it is no good at all. Most operations doesn't set MUST-MATCH when
an existing file is to be opened.

I can see two possibilities for such cases: (1) they are broken because they really do need an existing file, but don't ask for one, and (2) they really
can handle entry of a non-existant filename (like find-file).

First we must agree on what MUST-MATCH means.  The Motif dialog box
thinks MUST-MATCH means that the user must select a file that exists
and has the name of the default file (or initial). The file name can not be changed by the user. This is for example the case when doing next-error
but the current directory is wrong, so the user is basically asked to
change to the correct directory and select the file suggested by Emacs.

But for read-file-name the user is only presented with the default file
name, but can change it.

In the first case, ediff is not broken. In the second case it is, and so
is the code for the Motif dialog.

        Jan D.






reply via email to

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