all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Karl Fogel'" <kfogel@red-bean.com>
Cc: 12507@debbugs.gnu.org, 'Thierry Volpiatto' <thierry.volpiatto@gmail.com>
Subject: bug#12507: Have I mentioned how much I hate Debbugs?
Date: Mon, 1 Oct 2012 15:00:54 -0700	[thread overview]
Message-ID: <058D07630DCF42C18CA45AB3E07C0BF5@us.oracle.com> (raw)
In-Reply-To: <87k3v9dgyc.fsf@kwarm.red-bean.com>

> >We could do what I suggested in my message of 9/29:
> >
> >d> 3. Provide for optional backups, but if the user chooses not
> >d>    to back up, then do not visit the file.
> >d>
> >d> With #3, the user would pay the price that Stefan mentions for
> >d> visiting the file only when s?he chooses backup.
> >
> >I based that on my understanding (still asking the question 
> >though, since I'm not sure) that you cannot back up the file
> >unless you visit it.
>
> One thing I'm confused by:
> 
> Why does backing up a file have anything to do with visiting it?

Dunno.  That's why I wrote "still asking the question though".  And I've asked
Stefan several times now (a) whether it is the case that you cannot back up
without visiting and (b) if so, why.  No response, so far.

> Backing up just means making a copy.

Not exactly.  There is also a certain amount of checking and possibly
interaction with the user depending on various states.

> There is no reason why visiting the file in a buffer is necessary
> for that (surely `copy-file' does not visit the file, for example).

But the code for "backing up" (i.e., doing all that is necessary for that) seems
to be in `save-buffer'.  I don't see see any of that logic (checking this and
that) done elsewhere.

This kind of comes back to Thierry's suggestion that we might want to come up
with a version of `write-region', which does not visit the file it writes to,
that also backs up that file first.  Or to do something similar.

IOW, I don't see how to do it currently, other than visiting the file.

> Yet in this discussion, the assumption is that to get backups, we have
> to also visit the file.

I'm the one who said that.  But I am not sure.  That's the conclusion I came to
by looking around the code.  But I'm no expert at all.  And no one has corrected
my conclusion.

> >But those effects are anyway desirable, IF you want to back up the
> >file.  So it seems to me that what we want is to either (a) visit the
> >file and do `save-buffer' or `write-file or equivalent IF the option
> >value says to back up the file, or (b) do what we do not IF NOT.
> 
> Hmm, this feels like a workaround.  Instead, let's get to the 
> bottom of why backing up and visiting are linked at all.

Feel free to investigate.  My guess is that Stefan probably has the answer and
perhaps a simple solution.

> >In any case, it sounds like we have all agreed at least on 
> >the need of a way for a user to say whether or not s?he wants
> >backups.  `bookmark-version-control' does not do that - it controls 
> >only whether to use ordinary backups or numeric backups.  So I
> >think the first step is to add an option so that a user can
> >express that choice.
> 
> Yes, but...
> 
> Is it worth it to have even `bookmark-version-control' at all?
> The number of people who need backups on this file must be small, 

I think _most_ users should back it up.  I think the same for a user's
`custom-file' and for other user-data files that are typically not edited
directly.

The point is that users can make changes to such files, albeit indirectly, and
they can later wish that they had a previous version to revert to.

> since most users presumably do not edit it directly nor even know
> where it is.

See previous.  The directly vs indirectly difference is a red herring, IMO.  You
can easily change the file - you can even delete it.  It does not matter much
whether you do that by editing it directly, interactively, or by issuing a
general command that makes a change to it.

The real question - for a given user - is whether what is in the file is
important to that user and whether it would be difficult or take too long to
re-create it from scratch.

And also whether s?he might want to control/check/compare such changes
incrementally - January vs July versions, for instance, instead of all or
nothing - starting again from scratch.

It's about the cost of re-creation and the difficulty of knowing how to do that
- just what to re-create, and how to re-create the contexts that allow that
bookmark re-creation.

And yes, different users will have different answers.  People can use bookmarks
very differently.

> A more general solution might be `bookmark-before-save-hook'.  The few
> people who want backups can DTRT in the hook, and bookmark's code
> wouldn't need to worry about this at all.

I don't think it is (should be) only a few people.  Personally, I would suggest
turning numeric backups for this on by default.  Apparently I'm alone in that
opinion.

But the only argument given so far against this is the presumed "annoyance" of
users by "littering the filesystem".  That, to me, is presumptuous indeed.

Far better to, by default, protect user data, and let users opt out of that
default protection (backing up).

But we can agree to disagree.






  reply	other threads:[~2012-10-01 22:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87bogubqjy.fsf@gnu.org>
     [not found] ` <handler.s.C.13485522721217.transcript@debbugs.gnu.org>
2012-09-25 13:53   ` bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist Drew Adams
2012-09-26  2:53     ` Chong Yidong
2012-09-26  3:18       ` Drew Adams
2012-09-26  4:04         ` Stefan Monnier
2012-09-26 14:19           ` Drew Adams
2012-09-26 19:46             ` Stefan Monnier
2012-09-26 20:31               ` Drew Adams
2012-09-26 21:46         ` Karl Fogel
2012-09-26 22:26           ` Drew Adams
2012-09-26 23:36             ` Drew Adams
2012-09-27 15:48             ` Karl Fogel
2012-09-27 16:00               ` Drew Adams
2012-09-27 17:57                 ` Karl Fogel
2012-09-27 18:32                   ` Drew Adams
2012-09-27  3:24           ` Stefan Monnier
2012-09-24 18:41             ` bug#12507: 24.2.50; `bookmark-write-file': use `write-file', not `write-region', to get backups Drew Adams
2012-09-27  5:38               ` bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist Thierry Volpiatto
2012-09-27 18:37                 ` Drew Adams
2012-09-27 21:16                   ` Thierry Volpiatto
2012-09-28  9:04                   ` Thierry Volpiatto
2012-09-28 20:00                     ` Drew Adams
2012-09-29  7:42               ` Thierry Volpiatto
2012-09-29 14:36                 ` Drew Adams
2012-09-29 15:12                   ` Thierry Volpiatto
2012-09-29 15:51                     ` Drew Adams
2012-09-29 16:20               ` Thierry Volpiatto
2012-09-29 16:50                 ` Drew Adams
2012-09-29 16:57                   ` Thierry Volpiatto
2012-10-01  3:38               ` bug#12507: Option `(bookmark-)version-control': Use :tag so doc string matches menu Karl Fogel
2012-10-01  4:06                 ` bug#12507: Option `(bookmark-)version-control': Use :tag so docstring " Drew Adams
2012-10-01  4:13               ` bug#12507: Have I mentioned how much I hate Debbugs? Karl Fogel
2012-10-01  4:50                 ` Drew Adams
2012-10-01 21:23                   ` Karl Fogel
2012-10-01 22:00                     ` Drew Adams [this message]
2012-10-02  5:31                       ` Thierry Volpiatto
2020-11-29  1:07               ` bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist Karl Fogel
2012-09-27  8:36         ` bug#12507: `bookmark-write-file': use `write-file', not `write-region', to get backups Juri Linkov
2012-09-27 15:02           ` Drew Adams
2020-09-18 15:02       ` bug#12507: [debbugs-tracker] Processed: severity 12507 wishlist Lars Ingebrigtsen
2020-09-18 16:23         ` Drew Adams
2020-09-19 14:18           ` Lars Ingebrigtsen
2020-09-19 17:29             ` Drew Adams
2020-09-23  6:41               ` Karl Fogel
2020-09-23 13:34                 ` Lars Ingebrigtsen
2020-09-23 16:23                   ` Eli Zaretskii
2020-09-24 13:58                     ` Lars Ingebrigtsen
2020-09-29  5:27                       ` Karl Fogel
2020-09-29 14:29                         ` Lars Ingebrigtsen
2020-09-23 14:27                 ` Eli Zaretskii
2020-09-23 18:13                   ` Drew Adams
2020-09-23 18:14                 ` Drew Adams
2020-09-29  5:25                   ` Karl Fogel
2020-09-29 15:45                     ` Drew Adams
2020-11-29  0:28                       ` Karl Fogel

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=058D07630DCF42C18CA45AB3E07C0BF5@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=12507@debbugs.gnu.org \
    --cc=kfogel@red-bean.com \
    --cc=thierry.volpiatto@gmail.com \
    /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.