[Top][All Lists]

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

RE: C-x C-v considered harmful

From: Bob Rogers
Subject: RE: C-x C-v considered harmful
Date: Sun, 5 Jul 2009 20:39:45 -0400

   From: "Drew Adams" <address@hidden>
   Date: Sun, 5 Jul 2009 00:13:36 -0700

   . . .

   >    And as you mentioned, `find-alternate-file' tests `(and
   >    (buffer-modified-p) (buffer-file-name))'. I agree with you that the
   >    problem you are seeing is coming from `(buffer-file-name)' 
   >    being nil, and that removing that might be an improvement.
   > As far as I am concerned, removing "(buffer-file-name)" would be
   > sufficient.

   We agree, modulo my wanting to be able to drop modified read-only
   buffers without warning. Another way to look at that is that those
   buffers typically do not have undo, which is another indication that
   we don't expect their contents to be something we want to worry about
   saving . . .

That would be even better, isn't it?  Absence of "undo" ought to be a
more reliable indication of which buffers are considered unlikely to
have state the user might regret trashing by accident.  What do you
think of querying only for modified buffers with undo enabled?

   I notice that this rule would query for Dired buffers, but only after
the user has started marking files.  And as soon as the user types "g",
the (buffer-modified-p) flag is cleared again.  This all strikes me as
correct behavior.

   In any case, you have convinced me that "C-x k" and "C-x C-v" should
have the same querying behavior.

                                        -- Bob

reply via email to

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