all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Bob Rogers'" <rogers-emacs@rgrjr.dyndns.org>
Cc: emacs-devel@gnu.org
Subject: RE: C-x C-v considered harmful
Date: Sun, 5 Jul 2009 18:40:51 -0700	[thread overview]
Message-ID: <DD9E3FA3ABDB4D8B899BB29813353DCE@us.oracle.com> (raw)
In-Reply-To: <19025.18385.166444.706321@rgr.rgrjr.com>

>    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.

Maybe, maybe not. My vague impression is that use of undo can be a bit irregular
(odd) sometimes; I'm not sure that presence of undo is the best thing to depend
on.

> What do you think of querying only for modified buffers with undo enabled?

I might be wrong, but I think the `buffer-read-only' test for modified buffers
is probably preferable to checking for undo. I think that a read-only modified
buffer often represents a different kind of "modification" - one that can
generally be ignored here. It's not clear to me how relevant an undo test might
be in general - probably sometimes quite relevant, but perhaps sometimes not so
relevant.

Perhaps someone else can offer insight here.

> 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.

These are all individual preferences, to some extent. One person's significant
modifications that s?he wants to be warned about losing is another person's
insignificant changes for which a warning would be annoying. Markings and undo
in Dired is an example of something I personally don't worry about saving -
warning about such changes would represent an annoyance, to me.

I'd sooner we concentrate on finding a solution for places where we can identify
a real problem - such as you did for `*shell*'. How many modified non-file
buffers are in the same class as `*shell*' of holding lots of significant data?
Dunno, but we don't want to end up casting a net that is too fine, and thereby
catch lots of buffers with modified data that one would never want to save.

I wonder if the best approach isn't the suggestion I made to just keep the
current test for a warning (i.e., modified file buffers), but add a user option
or two to specify buffers or classes of modified buffers (e.g. via regexps) for
which warnings would also be issued? The default value of said option(s) could
take care of any well-known cases, such as `*shell*'.

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

I think you and I are in general agreement now. Whether that has any
significance wrt what ultimately gets done about this remains to be seen. 

Who knows what others might think, and whether even that matters for those who
actually decide. All we've heard so far from Stefan is that he wants to add
`confirm-nonexistent-file-or-buffer' to the mix (?!). We know that Richard has
expressed some interest, and initially a few others offered "fixes" to
`find-alternate-file'. But other than that, this seems to be a pas-de-deux.
(That in itself is somewhat of an indication, but by no means proof, that this
is not a big problem.)






  reply	other threads:[~2009-07-06  1:40 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02  1:18 C-x C-v considered harmful Bob Rogers
2009-07-02  2:39 ` Miles Bader
2009-07-02  3:10   ` Bob Rogers
2009-07-02  6:48   ` Kevin Rodgers
2009-07-02 15:17     ` Drew Adams
2009-07-03  1:09       ` Bob Rogers
2009-07-03  3:19         ` Drew Adams
2009-07-03 20:33           ` Bob Rogers
2009-07-03 22:23             ` Drew Adams
2009-07-04 23:16               ` Bob Rogers
2009-07-05  7:13                 ` Drew Adams
2009-07-06  0:39                   ` Bob Rogers
2009-07-06  1:40                     ` Drew Adams [this message]
2009-07-07 10:39                       ` Johan Bockgård
2009-07-05 10:18                 ` Richard Stallman
2009-07-05 14:56                   ` Drew Adams
2009-07-05  0:05               ` Richard Stallman
2009-07-05  7:10                 ` Drew Adams
2009-07-06 15:05                   ` Richard Stallman
2009-07-06 15:59                     ` Drew Adams
2009-07-07 10:05                       ` Richard Stallman
2009-07-06 12:04                 ` Robert J. Chassell
2009-07-06 23:49                 ` Juri Linkov
2009-07-07  1:07                   ` Drew Adams
2009-07-08  0:32                     ` Juri Linkov
2009-07-08 23:28                       ` Juri Linkov
2009-07-09 16:09                         ` Drew Adams
2009-07-09 22:10                           ` Juri Linkov
2009-07-09 22:26                             ` Drew Adams
2009-07-09 22:46                               ` Juri Linkov
2009-07-09 23:21                                 ` Drew Adams
2009-07-10  4:05                                   ` Bob Rogers
2009-07-13 20:05                         ` Juri Linkov
2009-07-16 21:57                           ` Juri Linkov
2009-07-03  2:40       ` M Jared Finder
2009-07-03  2:57         ` Miles Bader
2009-07-03 19:23         ` Richard Stallman
2009-07-03 20:07           ` Andreas Schwab
2009-07-03 20:56           ` Miles Bader
2009-07-03 13:55     ` Markus Triska
2009-07-05 22:15       ` Stefan Monnier
2009-07-05 22:42         ` Bob Rogers
2009-07-11 10:06           ` Stefan Monnier
2009-07-14  2:45             ` Bob Rogers
2009-07-14 18:34               ` Stefan Monnier
2009-07-02 21:03 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DD9E3FA3ABDB4D8B899BB29813353DCE@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=rogers-emacs@rgrjr.dyndns.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.