From campbell@mumble.net Sun Jun 28 11:13:31 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 28 Jun 2009 18:13:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.0 required=4.0 tests=GAPPY_SUBJECT autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5SIDRvP016958 for ; Sun, 28 Jun 2009 11:13:28 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKysY-00057r-Vs for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 14:13:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKysU-000574-Rr for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 14:13:26 -0400 Received: from [199.232.76.173] (port=33715 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKysU-000571-Ot for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 14:13:22 -0400 Received: from mx20.gnu.org ([199.232.41.8]:52408) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MKysU-0007ZC-N5 for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 14:13:22 -0400 Received: from pluto.mumble.net ([206.123.75.20]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKysS-0003vQ-JG for bug-gnu-emacs@gnu.org; Sun, 28 Jun 2009 14:13:20 -0400 Received: from Oberon.local (localhost [127.0.0.1]) by pluto.mumble.net (Postfix) with ESMTP id 3ABDA9828B; Sun, 28 Jun 2009 18:13:18 +0000 (UTC) To: bug-gnu-emacs@gnu.org Subject: Emacs fails to respect the intent in `C-u C-u C-x C-s' of making a backup Date: Sun, 28 Jun 2009 14:13:16 -0400 From: Taylor R Campbell User-Agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <20090628181318.3ABDA9828B@pluto.mumble.net> X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Often, when saving a file, I want to make a backup. The only way I know to express this intent is `C-u C-u C-x C-s'. When I type `C-u C-u C-x C-s', I mean to tell Emacs: `I want you to make a backup and then save this file.' The documentation for the `save-buffer' command says: Prefixed by two C-u's, unconditionally makes the previous version into a backup file. ^^^^^^^^^^^^^^^ Unfortunately, Emacs fails to respect my intent in many circumstances. First, I set `version-control' to t in order to keep numbered backups. Then in order to make backups in directories such as /tmp, I set `backup-enable-predicate' to be a function that always returns t. Next, in order to make backups when `vc' is involved, I set `vc-make-backup-files' to t, which confused me because it didn't take effect immediately -- I had to reload all my buffers before it did. This is because some vc hook set another variable, `backup-inhibited', when I first loaded those buffers. There are plenty of other documented ways for arbitrary modes to interfere with my intent when I type `C-u C-u' -- there are several hooks that are run during `save-buffer' before `backup-buffer' and conditions under which backups will be made. This contradicts the documentation of `save-buffer' which explicitly says that `C-u C-u' means a backup will be made *unconditionally*. I don't mind that there may be various heuristics for choosing whether to make a backup file when the user has not indicated a preference either way (by typing `C-u 0' or `C-u C-u' or whatnot), but it is very frustrating when the documentation says `unconditionally' and the implementation has many documented ways to interfere and add conditions. Of course, the documentation could simply omit the word `unconditionally', but I don't want that either -- I want it really to be unconditional (as far as the documented hooks in Emacs go; of course someone could redefine `save-buffer', but it's the documented hooks and conditions such as `backup-inhibited' that bother me). I am using GNU Emacs 22.2.1 (i386-apple-darwin8.11.1, GTK+ Version 2.10.13) of 2008-07= -06 on Oberon.local. In my .emacs file, relevant to backups, I have (defun always-backup (filename) filename t) (setq-default backup-enable-predicate 'always-backup) (setq-default version-control t) (setq-default vc-make-backup-files t) (setq-default backup-inhibited nil) (setq-default make-backup-files t) From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 17 23:37:47 2016 Received: (at 3702) by debbugs.gnu.org; 18 Jun 2016 03:37:47 +0000 Received: from localhost ([127.0.0.1]:44656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE74t-0001qc-6N for submit@debbugs.gnu.org; Fri, 17 Jun 2016 23:37:47 -0400 Received: from mail-qk0-f177.google.com ([209.85.220.177]:35035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bE74q-0001qK-AA for 3702@debbugs.gnu.org; Fri, 17 Jun 2016 23:37:45 -0400 Received: by mail-qk0-f177.google.com with SMTP id c73so105137486qkg.2 for <3702@debbugs.gnu.org>; Fri, 17 Jun 2016 20:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=97eGH+v6yPGd6qWQcBO2bSqB15MqEEz9Qw3PO2rq3gk=; b=X/OsIhmjCWPmLVfmVCFaJg7sAvuLpcNta41fZEA2RkePFt+YvFZhIIaP8r9w9p6KIU bqbosoEkmkkElv43U2pCV/cgT9ag2joxC82Vr3w+la/kLN9sM3lbWAZQquAZ36Nfz8ly 8/AfTeEvfe8e7kchOc2CUNLQIjSM8fBu+08Gk7021TnPZz2eFounDQ0iw2K/p9jSk4Oj thSwW08bRptQTpIcX76KGlAZOIWln6bIcjeV7GbvPj3Z0B/PlwOF/PnSNsNxcjNhQQXQ rYT5Kju2oabo/Aj1spfAUTkEZV7TBTggugI9Ie5Po+BSCiZwyMQvh+tr0Ptc36uCjhuI fSCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=97eGH+v6yPGd6qWQcBO2bSqB15MqEEz9Qw3PO2rq3gk=; b=LroXnocNkA+Xe07YV2LV7LG/S0HoC2IaWN9DD2XGLum8/FxVGjtvyS90nKqnqN4tmq o+G5vEo7cB8oDsHy2m31cnCAjZuiFtc723GpYwv2FfNa47zliUey1e1JGAXPxUvuYDqd nx9+SP9GSbzg6YQL5t/Qy46633UoGM4LzB4iaFHLS8rhYLVAYxViTndPpV9Q3Dp/PMx1 CP7LufsSVbZghfqUJNiejpZzTwLHCM3yknLqOVKvQUa53C7Z58eF3m0otb7ZZeRk6OMc Eg8Jhv2HWyE9BX+Q++7j6y8cqbS+JH3NY7EqwX9zXGqtJft/egYVHlRv7WIybhk7uKqa uPLA== X-Gm-Message-State: ALyK8tLBkVJKj9g4E3MV+Qh5keMRiEJ0XplVW4mTjKtlcJ3SzJgx1DIgoSgDqacKdni8RQ== X-Received: by 10.55.118.196 with SMTP id r187mr6456745qkc.32.1466221058492; Fri, 17 Jun 2016 20:37:38 -0700 (PDT) Received: from Andrews-MacBook-Pro.local (cpe-74-73-128-199.nyc.res.rr.com. [74.73.128.199]) by smtp.gmail.com with ESMTPSA id 61sm15044817qte.38.2016.06.17.20.37.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 20:37:35 -0700 (PDT) From: Andrew Hyatt To: Taylor R Campbell Subject: Re: bug#3702: Emacs fails to respect the intent in `C-u C-u C-x C-s' of making a backup References: <20090628181318.3ABDA9828B@pluto.mumble.net> Date: Fri, 17 Jun 2016 23:37:28 -0400 In-Reply-To: <20090628181318.3ABDA9828B@pluto.mumble.net> (Taylor R. Campbell's message of "Sun, 28 Jun 2009 14:13:16 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 3702 Cc: 3702@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) Sorry for the late reply on this one. This problem still exists in Emacs 25. I agree that the current behavior doesn't match up with the documentation. This probably is fixable by adding another free variable set by save-buffer and read in various functions, but there's a lot of those kind of variables already - the logic here, IMHO, could use a rewrite to make the interactions clear. Maybe someone familiar with this code might give their opinion. Taylor R Campbell writes: > Often, when saving a file, I want to make a backup. The only way I > know to express this intent is `C-u C-u C-x C-s'. When I type `C-u > C-u C-x C-s', I mean to tell Emacs: `I want you to make a backup and > then save this file.' The documentation for the `save-buffer' command > says: > > Prefixed by two C-u's, > unconditionally makes the previous version into a backup file. > ^^^^^^^^^^^^^^^ > Unfortunately, Emacs fails to respect my intent in many circumstances. > First, I set `version-control' to t in order to keep numbered backups. > Then in order to make backups in directories such as /tmp, I set > `backup-enable-predicate' to be a function that always returns t. > Next, in order to make backups when `vc' is involved, I set > `vc-make-backup-files' to t, which confused me because it didn't take > effect immediately -- I had to reload all my buffers before it did. > This is because some vc hook set another variable, `backup-inhibited', > when I first loaded those buffers. > > There are plenty of other documented ways for arbitrary modes to > interfere with my intent when I type `C-u C-u' -- there are several > hooks that are run during `save-buffer' before `backup-buffer' and > conditions under which backups will be made. This contradicts the > documentation of `save-buffer' which explicitly says that `C-u C-u' > means a backup will be made *unconditionally*. I don't mind that > there may be various heuristics for choosing whether to make a backup > file when the user has not indicated a preference either way (by > typing `C-u 0' or `C-u C-u' or whatnot), but it is very frustrating > when the documentation says `unconditionally' and the implementation > has many documented ways to interfere and add conditions. Of course, > the documentation could simply omit the word `unconditionally', but I > don't want that either -- I want it really to be unconditional (as far > as the documented hooks in Emacs go; of course someone could redefine > `save-buffer', but it's the documented hooks and conditions such as > `backup-inhibited' that bother me). > > I am using > > GNU Emacs 22.2.1 (i386-apple-darwin8.11.1, GTK+ Version 2.10.13) of 2008-07-06 on Oberon.local. > > In my .emacs file, relevant to backups, I have > > (defun always-backup (filename) filename t) > (setq-default backup-enable-predicate 'always-backup) > (setq-default version-control t) > (setq-default vc-make-backup-files t) > (setq-default backup-inhibited nil) > (setq-default make-backup-files t) From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 18 04:13:45 2016 Received: (at 3702) by debbugs.gnu.org; 18 Jun 2016 08:13:45 +0000 Received: from localhost ([127.0.0.1]:44710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEBNx-0008JC-2h for submit@debbugs.gnu.org; Sat, 18 Jun 2016 04:13:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEBNt-0008Ix-IU for 3702@debbugs.gnu.org; Sat, 18 Jun 2016 04:13:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEBNl-0008Qy-7T for 3702@debbugs.gnu.org; Sat, 18 Jun 2016 04:13:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,GAPPY_SUBJECT, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEBNl-0008Qu-4N; Sat, 18 Jun 2016 04:13:33 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1069 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bEBNj-0006fW-5Z; Sat, 18 Jun 2016 04:13:31 -0400 Date: Sat, 18 Jun 2016 11:14:34 +0300 Message-Id: <837fdmc3rp.fsf@gnu.org> From: Eli Zaretskii To: Andrew Hyatt In-reply-to: (message from Andrew Hyatt on Fri, 17 Jun 2016 23:37:28 -0400) Subject: Re: bug#3702: Emacs fails to respect the intent in `C-u C-u C-x C-s' of making a backup References: <20090628181318.3ABDA9828B@pluto.mumble.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: 3702 Cc: campbell@mumble.net, 3702@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) > From: Andrew Hyatt > Date: Fri, 17 Jun 2016 23:37:28 -0400 > Cc: 3702@debbugs.gnu.org > > > Sorry for the late reply on this one. This problem still exists in > Emacs 25. I agree that the current behavior doesn't match up with the > documentation. > > This probably is fixable by adding another free variable set by > save-buffer and read in various functions, but there's a lot of those > kind of variables already - the logic here, IMHO, could use a rewrite to > make the interactions clear. Maybe someone familiar with this code > might give their opinion. It sounds like this report boils down to interpreting the single word "unconditionally" in the doc string of save-buffer. All the rest is actually a request for a feature that never existed in Emacs. (FWIW, I don't object to adding such a feature, if someone submits patches to that effect.) From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 09 07:19:28 2016 Received: (at 3702-done) by debbugs.gnu.org; 9 Jul 2016 11:19:29 +0000 Received: from localhost ([127.0.0.1]:43266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLqIC-0003Cu-ME for submit@debbugs.gnu.org; Sat, 09 Jul 2016 07:19:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLqIB-0003Cg-T7 for 3702-done@debbugs.gnu.org; Sat, 09 Jul 2016 07:19:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLqI2-00044u-Go for 3702-done@debbugs.gnu.org; Sat, 09 Jul 2016 07:19:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_40,GAPPY_SUBJECT, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLqI2-00044p-Dp; Sat, 09 Jul 2016 07:19:18 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1553 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLqHz-0006i1-Lu; Sat, 09 Jul 2016 07:19:16 -0400 Date: Sat, 09 Jul 2016 14:19:08 +0300 Message-Id: <83eg73gitv.fsf@gnu.org> From: Eli Zaretskii To: Andrew Hyatt In-reply-to: (message from Andrew Hyatt on Sat, 25 Jun 2016 23:22:42 -0400) Subject: Re: bug#3702: Emacs fails to respect the intent in `C-u C-u C-x C-s' of making a backup References: <20090628181318.3ABDA9828B@pluto.mumble.net> <837fdmc3rp.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 3702-done Cc: 3702-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Andrew Hyatt > Date: Sat, 25 Jun 2016 23:22:42 -0400 > > > Eli Zaretskii writes: > > >> From: Andrew Hyatt > >> Date: Fri, 17 Jun 2016 23:37:28 -0400 > >> Cc: 3702@debbugs.gnu.org > >> > >> > >> Sorry for the late reply on this one. This problem still exists in > >> Emacs 25. I agree that the current behavior doesn't match up with the > >> documentation. > >> > >> This probably is fixable by adding another free variable set by > >> save-buffer and read in various functions, but there's a lot of those > >> kind of variables already - the logic here, IMHO, could use a rewrite to > >> make the interactions clear. Maybe someone familiar with this code > >> might give their opinion. > > > > It sounds like this report boils down to interpreting the single word > > "unconditionally" in the doc string of save-buffer. All the rest is > > actually a request for a feature that never existed in Emacs. (FWIW, > > I don't object to adding such a feature, if someone submits patches to > > that effect.) > > Maybe the solution then is just to change the wording in the > documentation? But it might take someone who is very familiar with the > various exceptions to craft the new wording. OK, I modified the doc string to the above effect on the emacs-25 branch, and I'm marking this bug done. Thanks. From unknown Sat Jun 14 03:53:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 06 Aug 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator