unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Tom Tromey <tromey@redhat.com>
Cc: emacs-pretest-bug@gnu.org, Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: multiple queries to delete excess backup version w/ custom
Date: Sat, 05 Jan 2008 23:29:03 +0100	[thread overview]
Message-ID: <478004AF.80907@gmx.at> (raw)
In-Reply-To: <m3wsqouna5.fsf@fleche.redhat.com>

 > Custom-save does this:
 >
 >     (custom-command-apply
 >            (lambda (child)
 >              (when (memq (widget-get child :custom-state)
 >                          '(modified set changed rogue))
 >                (widget-apply child :custom-save)))
 >            "Save all settings in this buffer? " t)
 >
 > Which, AFAICT, means "send the :custom-save message to each modified
 > widget".
 >
 > Searching for :custom-save shows that it maps to things like
 > custom-variable-save, custom-face-save, etc.
 >
 > Looking at custom-variable-save, it calls custom-save-all toward the
 > end.  I suppose this makes sense because you can save a single setting
 > via the State menu.
 >
 > At least, that's my analysis.  I'm sorry, but I didn't actually step
 > through with the debugger.

And at the very end `Custom-save' hilariously calls `custom-save-all'
one more time.  Your analysis seems correct.  I wonder though why this
issue has never been brought up before.

 > I can think of a few ways to fix this.  One idea would be a global
 > which tells custom-save-all not to call save-buffer.  Then, bind this
 > when sending :custom-save to the widgets in Custom-save.

That's probably the way to go.  Could you propose a patch along these
lines?

 > Another idea would be to turn off backups for the custom file, or to
 > otherwise arrange not to ask the user questions when saving.

Rather not.  If you save your customizations in .emacs, there's quite
some chance that some silly modifications you made to it get stored
along with the customizations.  You should be able to back up from this.
Not asking questions means overriding the user's decisions.

Per what do you think?

  reply	other threads:[~2008-01-05 22:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04 20:41 multiple queries to delete excess backup version w/ custom Tom Tromey
2008-01-04 22:37 ` martin rudalics
2008-01-04 22:28   ` Tom Tromey
2008-01-04 23:11     ` martin rudalics
2008-01-04 22:50       ` Tom Tromey
2008-01-05 10:21         ` martin rudalics
2008-01-05 18:42           ` Tom Tromey
2008-01-05 22:29             ` martin rudalics [this message]
2008-01-05 23:46               ` Per Abrahamsen
2008-01-06 10:09                 ` martin rudalics
2008-01-06 13:26                   ` Per Abrahamsen
2008-01-06 16:09                     ` martin rudalics
2008-01-06 18:22                       ` Per Abrahamsen
2008-01-06 19:21                         ` martin rudalics
2008-01-06 19:58                           ` Per Abrahamsen
2008-01-06 22:22                             ` martin rudalics
2008-01-10  9:51                             ` martin rudalics
2008-01-06 10:46             ` Richard Stallman
2008-01-06  8:09         ` Richard Stallman
2008-01-05 14:31 ` Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=478004AF.80907@gmx.at \
    --to=rudalics@gmx.at \
    --cc=abraham@dina.kvl.dk \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=tromey@redhat.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).