emacs-devel
[Top][All Lists]
Advanced

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

Re: Missing `with' macro?


From: Richard Stallman
Subject: Re: Missing `with' macro?
Date: Tue, 08 Aug 2006 14:01:50 -0400

    > To use the user's existing buffer would save the user's own unsaved
    > changes without asking.  That is completely unacceptable.

    Is it completely unacceptable even if the file in question is principally
    "owned" by code anyway?

Yes, I think so.  If it is unlikely that users will edit the file by
hand, that means there is unlikely to be a buffer to reuse.  But IF
there is a buffer to reuse, it means the user edited the file by hand.
When he does so, you should not save his changes without his ok!

    I see other possibilities:
    1. (and REUSE WRITE (buffer-modified-p #<buffer extant-buffer>) (error
    "Attempt to co-opt user's unsaved changes")) - that is, only allow REUSE
    and WRITE on an unmodified buffer.

It is better to go ahead not reusing the buffer than to signal an
error.

    2. Go on modifying (because of WRITE) the buffer (because of REUSE), but
    don't save the changes at the end, or else ask the user whether to save
    them.

That would be very inconvenient.  There is no need to implement that
option, and it would be better to avoid it for simplicity's sake.

    Either of these could be combined with a query beforehand:

Any query will be an inconvenience.  That's another reason now to
implement these options.

Complexity is a drawback, not a feature.  I am looking for ways
to simplify this.  We should not reject them because of maybes.




reply via email to

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