From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: multiple queries to delete excess backup version w/ custom Date: Sat, 05 Jan 2008 23:29:03 +0100 Message-ID: <478004AF.80907@gmx.at> References: <477EB51F.3050003@gmx.at> <477EBD26.5060709@gmx.at> <477F5A39.1070904@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199572210 17557 80.91.229.12 (5 Jan 2008 22:30:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2008 22:30:10 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Per Abrahamsen To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 05 23:30:26 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JBHX5-0007DS-Id for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 23:30:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBHWc-0004DI-Lv for ged-emacs-devel@m.gmane.org; Sat, 05 Jan 2008 17:29:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JBHWZ-0004Cy-7T for emacs-devel@gnu.org; Sat, 05 Jan 2008 17:29:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JBHWQ-0004Bd-LZ for emacs-devel@gnu.org; Sat, 05 Jan 2008 17:29:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBHWQ-0004Ba-GH for emacs-devel@gnu.org; Sat, 05 Jan 2008 17:29:42 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBHWP-0006ib-H9 for emacs-devel@gnu.org; Sat, 05 Jan 2008 17:29:42 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JBHWA-0004Yb-Ul for emacs-pretest-bug@gnu.org; Sat, 05 Jan 2008 17:29:29 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JBHW5-0006gH-TV for emacs-pretest-bug@gnu.org; Sat, 05 Jan 2008 17:29:24 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JBHVz-0006c0-6Z for emacs-pretest-bug@gnu.org; Sat, 05 Jan 2008 17:29:21 -0500 Original-Received: (qmail invoked by alias); 05 Jan 2008 22:28:54 -0000 Original-Received: from N806P008.adsl.highway.telekom.at (EHLO [62.47.44.168]) [62.47.44.168] by mail.gmx.net (mp021) with SMTP; 05 Jan 2008 23:28:54 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1//1AwVPVn/fN1FJmyAoIbhLuvGgS9U6G9RRXdw7z Of86mcyT9cUGvw User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86244 gmane.emacs.pretest.bugs:20516 Archived-At: > 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?