all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: multiple queries to delete excess backup version w/ custom
Date: Sat, 05 Jan 2008 11:42:42 -0700	[thread overview]
Message-ID: <m3wsqouna5.fsf@fleche.redhat.com> (raw)
In-Reply-To: <477F5A39.1070904@gmx.at> (martin rudalics's message of "Sat\, 05 Jan 2008 11\:21\:45 +0100")

>>>>> "martin" == martin rudalics <rudalics@gmx.at> writes:

martin> Could you please try to edebug `Custom-save' and/or
martin> `custom-save-all' to find out why and how it's getting called
martin> repeatedly.  This should get fixed for Emacs 22.2.

I read through the code a little.

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.

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.

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

Tom

  reply	other threads:[~2008-01-05 18:42 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 [this message]
2008-01-05 22:29             ` martin rudalics
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

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

  git send-email \
    --in-reply-to=m3wsqouna5.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=rudalics@gmx.at \
    /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.