emacs-devel
[Top][All Lists]
Advanced

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

Re: TODO: insert-file should warn if the file is modified


From: Richard Stallman
Subject: Re: TODO: insert-file should warn if the file is modified
Date: Sat, 20 Apr 2002 11:26:30 -0600 (MDT)

      (let ((buffer (file-is-modified-somewhere filename)))
        (if (or (not buffer)
                (y-or-n-p (format "File %s is modified in buffer %s. Insert it? 
" filename buffer)))

The code looks good, but the message might be misunderstood.
"It" is ambiguous1  Be VERY careful about using pronouns
in writing, and especially in short statements like that one.

  File %s is being edited.  Insert the file anyway?

would be a clearer message.

It is better not to include the buffer name, because that will usually
give no additional information and will make the message longer.  One
possible approach is to include the buffer name only when it is
different from the file's name.

KFS suggested offering to insert the buffer.  That is a good idea
provided the questions asked seem natural and not inconvenient.

One possible approach is to ask whether to insert the file or the
buffer; a user who wants to insert neither one can type C-g instead of
answering the question.




reply via email to

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