From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite Date: Tue, 29 Oct 2013 19:35:02 -0700 (PDT) Message-ID: <3bb8958a-dd47-469b-9ee5-2891ba575344@default> References: <87iowg9bqw.fsf@floss.red-bean.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383100584 9697 80.91.229.3 (30 Oct 2013 02:36:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Oct 2013 02:36:24 +0000 (UTC) Cc: Karl Fogel , 15746@debbugs.gnu.org, Leo Liu To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 30 03:36:26 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VbLdu-0007eD-FU for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Oct 2013 03:36:22 +0100 Original-Received: from localhost ([::1]:50235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbLdu-0003ft-1t for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Oct 2013 22:36:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbLdj-0003fe-2V for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 22:36:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbLda-0001mX-Ha for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 22:36:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbLda-0001mT-EP for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 22:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VbLdZ-0005Kg-Vo for bug-gnu-emacs@gnu.org; Tue, 29 Oct 2013 22:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2013 02:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15746 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15746-submit@debbugs.gnu.org id=B15746.138310051520427 (code B ref 15746); Wed, 30 Oct 2013 02:36:01 +0000 Original-Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 02:35:15 +0000 Original-Received: from localhost ([127.0.0.1]:51807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLco-0005JO-CZ for submit@debbugs.gnu.org; Tue, 29 Oct 2013 22:35:14 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:51013) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLcl-0005JC-VG for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 22:35:12 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9U2Z56q013587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Oct 2013 02:35:05 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9U2Z4K9019458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Oct 2013 02:35:04 GMT Original-Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9U2Z4TG019447; Wed, 30 Oct 2013 02:35:04 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79769 Archived-At: > How 'bout the following: > - change bookmark-set to emit a clear message when it updates an > existing message, as well as recording the previous value > somewhere. > - provide a bookmark-undo command so the user can undo his > bookmark-set when he discovers that he has just changed an > existing bookmark by mistake. > This way, we avoid prompting Drew annoyingly when he knows full well > he's updating the bookmark. > Leo, would that be sufficient to avoid the regrets, or did you > realize too late for a bookmark-undo to be of any use? To quote a famous person ;-), that would really be overthinking this. The simple solution, which I expect everyone might be able to agree to, is to have two different commands. And to bind them both to keys, at least on `bookmark-map'. Choose the default behavior you like for the traditional key, `C-x r m'. For the other command use, e.g., `C-x r M'. Not a big deal. Users can get either behavior at any time. Update `bookmark-set' to check not only the case in question (same name as existing bookmark, and no prefix arg) but also a global variable. Define the new command by let-binding that variable around `call-interactively' of `bookmark-set'.