From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 28 23:33:38 2013 Received: (at submit) by debbugs.gnu.org; 29 Oct 2013 03:33:38 +0000 Received: from localhost ([127.0.0.1]:50392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vb03l-0000f0-KR for submit@debbugs.gnu.org; Mon, 28 Oct 2013 23:33:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42063) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vb03i-0000el-Bl for submit@debbugs.gnu.org; Mon, 28 Oct 2013 23:33:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vb03U-0005CR-NM for submit@debbugs.gnu.org; Mon, 28 Oct 2013 23:33:29 -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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb03U-0005CN-KK for submit@debbugs.gnu.org; Mon, 28 Oct 2013 23:33:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb03M-0006Nw-6T for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2013 23:33:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vb03D-0005AH-P6 for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2013 23:33:12 -0400 Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]:52966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vb03D-0005A4-G7 for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2013 23:33:03 -0400 Received: by mail-pd0-f182.google.com with SMTP id q10so7976313pdj.13 for ; Mon, 28 Oct 2013 20:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=4LURxbcVWOezOuZZCMpJBIha6/x7WeSs3xeqg45fMW4=; b=b0gX2Ir0vQkp1AtI1Wj4x4IgbCGIJ5VFtwDUkz7COZPzIiojQH8SHXR5S6JvE7Tc2k 40/zv3/2tJYVSkxYyhrwVGSXoAdSryKlSCsQyqPXTyUChRta+zUIKhASUteZRNaagZzf l9uieviuVtYfg39o9Kxb+DY4wTgk6KO9K5jb7bpwPp8R8RwyXpKgwdRzh/d7+AZ0izbq nRchSr8D50qoBoZs0qfryiUKuglSDW3JO1ccXGSwMj75YpSinxPud4UF9Jm7LXXii4z9 MWOJV025uCBZ27f4Z/n5Z7wWbXAz93j339UsnZf0ehpD90iOD5BbuSvfLOj3T7NegckR CKcw== X-Received: by 10.68.254.105 with SMTP id ah9mr19518862pbd.87.1383017581840; Mon, 28 Oct 2013 20:33:01 -0700 (PDT) Received: from localhost ([222.130.176.76]) by mx.google.com with ESMTPSA id lm2sm39096570pab.2.2013.10.28.20.33.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Oct 2013 20:33:01 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 24.3; [PATCH] bookmark should confirm when overwrite X-Debbugs-CC: Karl Fogel Date: Tue, 29 Oct 2013 11:32:58 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) Occationally I have overwritten bookmarks with regrets. So maybe something along the following lines is needed. === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2013-09-11 03:31:56 +0000 +++ lisp/bookmark.el 2013-10-29 03:27:15 +0000 @@ -811,6 +811,12 @@ bookmark-minibuffer-read-name-map nil nil defaults)))) (and (string-equal str "") (setq str default)) + (when (and (not no-overwrite) + (bookmark-get-bookmark str) + (called-interactively-p 'interactive) + (not (yes-or-no-p + (format "Bookmark `%s' exists; overwrite? " str)))) + (user-error "Aborted")) (bookmark-store str (cdr record) no-overwrite) ;; Ask for an annotation buffer for this bookmark From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 10:20:19 2013 Received: (at 15746) by debbugs.gnu.org; 29 Oct 2013 14:20:19 +0000 Received: from localhost ([127.0.0.1]:51237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbA9a-0001IU-GA for submit@debbugs.gnu.org; Tue, 29 Oct 2013 10:20:19 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:39276) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbA9Y-0001IH-3t for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 10:20:16 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9TEK96d025277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 29 Oct 2013 14:20:10 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9TEK8lr001496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Oct 2013 14:20:09 GMT 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 r9TEK8vA022213; Tue, 29 Oct 2013 14:20:08 GMT MIME-Version: 1.0 Message-ID: <660c7427-6f91-46df-ac04-80bb907e1e85@default> Date: Tue, 29 Oct 2013 07:20:07 -0700 (PDT) From: Drew Adams To: Leo Liu , 15746@debbugs.gnu.org Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > Occationally I have overwritten bookmarks with regrets. So maybe > something along the following lines is needed. It is not needed, IMO. The point of `bookmark-set' is to set a bookmark, just like the point of `setq' (unlike `defvar') is to set a variable value, whether or not the variable already has a value. As far as I am concerned, it would be OK to add a separate new command for the behavior you want (without binding it to `C-x r m'). Or to add a user option that `bookmark-set' tests, to optionally (not by default) do what you want. But the default behavior of `bookmark-set' should not be changed this way, IMO. (FWIW, even if you do do the wrong thing occasionally, you need not necessarily regret it. Your updated bookmark is not saved=20 immediately, depending on your value of `bookmark-save-flag'. If you are worried about your occasional `bookmark-set' mistakes, consider = setting `bookmark-save-flag' to `nil'. Of course, you might also want to then check such a bookmark before explicitly using `bookmark-save'.) [(OT) Replying to a yes-or-no question is not a *user* error, even if the misnamed `user-error' is appropriate here (which it is). Just one more indication why "user-error" is the wrong name for its intended behavior (=3D any error other than a coding error).] From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 14:24:17 2013 Received: (at 15746) by debbugs.gnu.org; 29 Oct 2013 18:24:17 +0000 Received: from localhost ([127.0.0.1]:51474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbDxg-0007ir-D7 for submit@debbugs.gnu.org; Tue, 29 Oct 2013 14:24:16 -0400 Received: from mail-ie0-f170.google.com ([209.85.223.170]:61462) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbDxe-0007ic-Rs for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 14:24:15 -0400 Received: by mail-ie0-f170.google.com with SMTP id at1so442201iec.29 for <15746@debbugs.gnu.org>; Tue, 29 Oct 2013 11:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:reply-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=N5SMmjU4dIOtpc0P+cecBz287Mhidz+nbyywQ8/31xY=; b=EvZikhyLDbIurCC+gFLr6SnG3YpUrjq6CKmTjH/CqzUP5s9SNRfAruFJV38vH/zOvL ugwOCwfReRZRm/cUaSWVfXbqX0tE9v3bRbu1rMR+8uLKpG6aaBoZ0B7+KJzWopgF4EtZ 0ATNd0c2vmyFcJlBUICjRoVOHyscFRLwIQraE8G+w/p5mqSHwQ3FkchNJvdZ00pf6Fop nCf1krqOSgBzakT6ZfYIRTHkffzAzcj5ftwPZCV5+A9vIMRRrG5Elacm4hKr5Qeem1wI L71in25eoJvNO4a8nY0mlUPv4sWCwD9F1Yn4yHLc2DTC2vTMLiEHZZ62j8Na2qegqeJK 1RCw== X-Received: by 10.50.120.10 with SMTP id ky10mr13705304igb.29.1383071049117; Tue, 29 Oct 2013 11:24:09 -0700 (PDT) Received: from floss.red-bean.com (64-145-114-106.client.dsl.net. [64.145.114.106]) by mx.google.com with ESMTPSA id i11sm3440656igh.0.2013.10.29.11.24.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Oct 2013 11:24:08 -0700 (PDT) From: Karl Fogel To: Leo Liu Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: Date: Tue, 29 Oct 2013 13:24:07 -0500 In-Reply-To: (Leo Liu's message of "Tue, 29 Oct 2013 11:32:58 +0800") Message-ID: <87iowg9bqw.fsf@floss.red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Karl Fogel 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.7 (/) Leo Liu writes: >Occationally I have overwritten bookmarks with regrets. So maybe >something along the following lines is needed. > >=== modified file 'lisp/bookmark.el' >--- lisp/bookmark.el 2013-09-11 03:31:56 +0000 >+++ lisp/bookmark.el 2013-10-29 03:27:15 +0000 >@@ -811,6 +811,12 @@ > bookmark-minibuffer-read-name-map > nil nil defaults)))) > (and (string-equal str "") (setq str default)) >+ (when (and (not no-overwrite) >+ (bookmark-get-bookmark str) >+ (called-interactively-p 'interactive) >+ (not (yes-or-no-p >+ (format "Bookmark `%s' exists; overwrite? " str)))) >+ (user-error "Aborted")) > (bookmark-store str (cdr record) no-overwrite) > > ;; Ask for an annotation buffer for this bookmark This is interesting. I saw Drew's followup; there are good arguments on both sides, but on balance I think Leo's general idea is right. I think most users would expect that that *interactively* setting a bookmark would confirm when overriding a previous bookmark of the same name, instead of just silently overwriting it. Drew might be right that `bookmark-set' should not include this functionality itself, but then there should be a wrapper function, and every interactive key (C-x r m) currently default bound to `bookmark-set' should be instead set to that wrapper function, then. IOW, that question is just a matter of internal code orgainzation, not of user-visible functionality. (I'm tempted to just build the check directly into `bookmark-set' as Leo does, though, because people already have custom bindings for that, and anyway, testing `call-interactively' is enough -- it leaves `bookmark-set's programmatic functionality unchanged.) Leo, there would need to be a patch to the doc string too, but I can write that. I would probably also change the `user-error' behavior along the lines Drew suggested. First, I'd like to know if anyone else has thoughts on the overall behavior...? -Karl From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 16:09:37 2013 Received: (at 15746) by debbugs.gnu.org; 29 Oct 2013 20:09:37 +0000 Received: from localhost ([127.0.0.1]:51531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbFbc-0001zJ-Lo for submit@debbugs.gnu.org; Tue, 29 Oct 2013 16:09:37 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:41736) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbFbZ-0001z5-Gd for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 16:09:34 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9TK9QVH021359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 29 Oct 2013 20:09:27 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9TK9PPf020284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Oct 2013 20:09:26 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9TK9Pm9017040; Tue, 29 Oct 2013 20:09:25 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 29 Oct 2013 13:09:24 -0700 (PDT) From: Drew Adams To: Karl Fogel , Leo Liu Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> In-Reply-To: <87iowg9bqw.fsf@floss.red-bean.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > I think most users would expect that that *interactively* setting a > bookmark would confirm when overriding a previous bookmark of the > same name, instead of just silently overwriting it. There are plenty of use cases where you want to silently *update* an existing bookmark, e.g., update its location. That's the point of `bookmark-set': it both creates and updates. > Drew might be right that `bookmark-set' should not include this > functionality itself, but then there should be a wrapper function, > and every interactive key (C-x r m) currently default bound to > `bookmark-set' should be instead set to that wrapper function, then. > IOW, that question is just a matter of internal code orgainzation, > not of user-visible functionality. That effectively just *replaces* interactive use of `bookmark-set' with the proposed alternative behavior. That is exactly what I object to. I do not object to adding a different command, and either not binding it by default (users can choose to do that) or binding it to a different key. That lets users choose the behavior they want, and if they for some reason want there to be only one of the behaviors then they can easily bind both keys to the same command or unbind a key. And I do not object to adding a user option that thus conditionally changes the behavior of `bookmark-set'. The first approach of these two alternatives gives the most flexibility. With it, they need not choose the behavior once and for all but can instead just choose which behavior they want to invoke in any given context. My point is that it is a mistake to think there is only one interactive use of `bookmark-set' and that for that one use users would want to be queried wrt overwriting. There are lots of kinds of bookmarks, and lots of different uses of bookmarks. And some of those call precisely for silently updating an existing bookmark. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 16:51:59 2013 Received: (at 15746) by debbugs.gnu.org; 29 Oct 2013 20:51:59 +0000 Received: from localhost ([127.0.0.1]:51545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbGGc-000339-Gu for submit@debbugs.gnu.org; Tue, 29 Oct 2013 16:51:59 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:33931) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbGGZ-00032v-SZ for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 16:51:56 -0400 Received: by mail-ie0-f177.google.com with SMTP id e14so730667iej.36 for <15746@debbugs.gnu.org>; Tue, 29 Oct 2013 13:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:reply-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=/hqohzIfsXNDDbrY84ZEjWbrYcH6+eCA8hjZmCnWueg=; b=S8sCJ3EJVyUvM1duyGNfY1PiwywbzfIKImhUGATXgQ3eCRmJT/98d3doW6Cg9waMYM pWci9E/c3hdpi8fDlnKO/4YIfPdLLzNuZvbF2tDyi9ly4NLfeqI+sjankJnBRhzZFytG nYmE14xWJaC5K8z+S1O8RtuPK3d9XI2uQCU9DwwoIJmUqsGx+Yy9gqPV8t/C0VoXk1V2 RvwtvOipGbGIp8KVj/pFLX7cuj7gcLmkP5puGDodCY72ICbo95HNyW0xtI/+PXKQpfsZ l2xxUojmP7hmrhp2U6sos1gIjtdm7CTkBaXSblLAvUM9BOFkBvuGlfzNi3J4nd/00i5O 8Y7w== X-Received: by 10.50.72.33 with SMTP id a1mr14011876igv.58.1383079909968; Tue, 29 Oct 2013 13:51:49 -0700 (PDT) Received: from floss.red-bean.com (64-145-114-106.client.dsl.net. [64.145.114.106]) by mx.google.com with ESMTPSA id y10sm3824832igl.4.2013.10.29.13.51.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Oct 2013 13:51:49 -0700 (PDT) From: Karl Fogel To: Drew Adams Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> Date: Tue, 29 Oct 2013 15:51:48 -0500 In-Reply-To: (Drew Adams's message of "Tue, 29 Oct 2013 13:09:24 -0700 (PDT)") Message-ID: <87ob677qcb.fsf@floss.red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Karl Fogel 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.7 (/) Drew Adams writes: >> I think most users would expect that that *interactively* setting a >> bookmark would confirm when overriding a previous bookmark of the >> same name, instead of just silently overwriting it. > >There are plenty of use cases where you want to silently *update* an >existing bookmark, e.g., update its location. There are definitely cases where one wants to update; that one wants to do so *silently* is a more subjective assertion :-). >That's the point of `bookmark-set': it both creates and updates. The point of `bookmark-set' is whatever its doc string says. As long as we don't break compatibility in some silly way, we can change its behavior. I realize I'm driving the point home a bit hard here, but this part of your argument sounds to me a bit like "bookmark-set shouldn't do this because this isn't the sort of thing it should do". >> Drew might be right that `bookmark-set' should not include this >> functionality itself, but then there should be a wrapper function, >> and every interactive key (C-x r m) currently default bound to >> `bookmark-set' should be instead set to that wrapper function, then. >> IOW, that question is just a matter of internal code orgainzation, >> not of user-visible functionality. > >That effectively just *replaces* interactive use of `bookmark-set' >with the proposed alternative behavior. That is exactly what I >object to. Yes, I understand. The discussion here is about the user-visible default behavior, not about how we implement it. >I do not object to adding a different command, and either not binding >it by default (users can choose to do that) or binding it to a >different key. That lets users choose the behavior they want, and >if they for some reason want there to be only one of the behaviors >then they can easily bind both keys to the same command or unbind a >key. > >And I do not object to adding a user option that thus conditionally >changes the behavior of `bookmark-set'. > >The first approach of these two alternatives gives the most >flexibility. With it, they need not choose the behavior once and for >all but can instead just choose which behavior they want to invoke >in any given context. > >My point is that it is a mistake to think there is only one interactive >use of `bookmark-set' and that for that one use users would want to be >queried wrt overwriting. No one has proposed that there is only one valid interactive use case; I'm not sure where you got the idea that anyone thought that. >There are lots of kinds of bookmarks, and lots of different uses of >bookmarks. And some of those call precisely for silently updating an >existing bookmark. Yes, and some call for warning the user. Both scenarios happen. The question is not whether bookmark should offer flexibility (of course it should), but what its *default* interactive behavior should be. Right now, I lean toward Leo's argument that bookmark has had a less-than-ideal default up until now, and that his proposal is a better default. Silently overwriting an old bookmark loses information, while confirming the overwrite does not lose information. The only cost is one extra interactive prompt, and *only* in the case where one is overwriting an existing bookmark of that name. I believe this is what most users would expect. (Compare: when you save a file under a new name, if there's an existing file of that name, you are also warned.) So I propose that that should be the default behavior (because losing information silently is usually bad), and that there can be a variable for you to set to get the silent-overwrite behavior that you prefer as the default. Equal flexibility there. This discussion is about _defaults_. Best, -K From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 18:16:15 2013 Received: (at 15746) by debbugs.gnu.org; 29 Oct 2013 22:16:15 +0000 Received: from localhost ([127.0.0.1]:51603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbHaA-00058n-CX for submit@debbugs.gnu.org; Tue, 29 Oct 2013 18:16:15 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:29492) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbHa7-00058U-Kf for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 18:16:12 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9TMG4wQ028010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 29 Oct 2013 22:16:05 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9TMG3YN003600 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Oct 2013 22:16:04 GMT 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 r9TMG3a7027626; Tue, 29 Oct 2013 22:16:03 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 29 Oct 2013 15:16:02 -0700 (PDT) From: Drew Adams To: Karl Fogel Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> <87ob677qcb.fsf@floss.red-bean.com> In-Reply-To: <87ob677qcb.fsf@floss.red-bean.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > >There are plenty of use cases where you want to silently *update* an > >existing bookmark, e.g., update its location. > > There are definitely cases where one wants to update; that one wants > to do so *silently* is a more subjective assertion :-). I did not say that *all* updating use cases are silent-updating cases. I said that there *are* cases where one wants to update silently. And there are. This is not subjective to those who use this feature (for some bookmarks, some of the time). Consider the use of temporary bookmarks to bounce around positions in a buffer. ("Temporary" can be a simple as not saving.) Put it another way: have you ever moved a bookmark from page 39 to page 72 when reading a book? That's a use case for silent updating: manually updating the location of an existing bookmark. You do it when you want to do it, knowing full well that the bookmark exists. > >That's the point of `bookmark-set': it both creates and updates. >=20 > The point of `bookmark-set' is whatever its doc string says. Being able to either create a new bookmark or update an existing bookmark *has been* the point of `bookmark-set' - do you prefer that wording? > sounds to me a bit like "bookmark-set shouldn't do > this because this isn't the sort of thing it should do". It conflicts with *one* of the things that it should do. And that it has always done. Users should not lose the convenience of being able to silently update. That is one of the features that `bookmark-set' provides. Nothing wrong with providing additional, alternative behavior, for other use cases. I made that clear from the outset. But please do not take away the behavior that makes this use case convenient. That's the point. > >> Drew might be right that `bookmark-set' should not include this > >> functionality itself, but then there should be a wrapper > >> function, and every interactive key (C-x r m) currently default > >> bound to `bookmark-set' should be instead set to that wrapper > >> function, then. IOW, that question is just a matter of internal > >> code orgainzation, not of user-visible functionality. > > > >That effectively just *replaces* interactive use of `bookmark-set' > >with the proposed alternative behavior. That is exactly what I > >object to. >=20 > Yes, I understand. The discussion here is about the user-visible > default behavior, not about how we implement it. If you provide both behaviors then it is hard to object. That was *not* the proposal, however. I would also prefer not to change the *default* behavior, but for that I would not object strongly. Users are used to the current behavior of `C-x r m' - it has done what it does for a long time. My own preference would be to give the new behavior a new binding. But as long as both are available, the binding of each is not so important. > >I do not object to adding a different command, and either not > >binding it by default (users can choose to do that) or binding > >it to a different key. That lets users choose the behavior they > >want, and if they for some reason want there to be only one of > >the behaviors then they can easily bind both keys to the same > >command or unbind a key. > > > >And I do not object to adding a user option that thus conditionally > >changes the behavior of `bookmark-set'. > > > >The first approach of these two alternatives gives the most > >flexibility. With it, they need not choose the behavior once and > >for all but can instead just choose which behavior they want to > >invoke in any given context. > > > >My point is that it is a mistake to think there is only one > >interactive use of `bookmark-set' and that for that one use users > >would want to be queried wrt overwriting. >=20 > No one has proposed that there is only one valid interactive use > case; I'm not sure where you got the idea that anyone thought that. The proposal was to *change* the interactive behavior when the bookmark already exists (and no prefix arg). The proposal was to *always* query the user for confirmation in this case. That is what I objected to. My point was to give users a choice in that case. Provide two different commands.=20 > >There are lots of kinds of bookmarks, and lots of different uses of > >bookmarks. And some of those call precisely for silently updating > >an existing bookmark. >=20 > Yes, and some call for warning the user. Both scenarios happen. Precisely. So provide for *both* uses. No one objected to simply *adding* the possibility of asking for confimation. I objected to such a new behavior *replacing* the existing behavior of updating silently. My point is that silent updating is not just a mistake or a bug or always undesirable. And I will say the same thing about querying for confirmation. "Both scenarios happen", as you say. So let's provide users an easy way to do either, au choix. That's the point. Doing that will be an improvement for users rather than a loss. > The question is not whether bookmark should offer flexibility > (of course it should), but what its *default* interactive behavior > should be. No, that was exactly my question/objection: the proposal removes flexibility and choice. Even the existence of a silent-update use case was questioned. Wrt the default behavior, see above. I do not feel strongly about that. > Right now, I lean toward Leo's argument that bookmark has had a > less-than-ideal default up until now, and that his proposal is a > better default. Leo did *not* propose a change in default behavior. He proposed to replace the existing behavior and instead *always* query the user for confirmation in the case at hand. And that replacement is what I objected to. You seem to be turning things around, as if the proposal gave users a choice and I were arguing against that or I were arguing only about a different default behavior. Look at the proposed patch, please. > Silently overwriting an old bookmark loses information, > while confirming the overwrite does not lose information. The only > cost is one extra interactive prompt, and *only* in the case where > one is overwriting an existing bookmark of that name. That is not a cost that one wants to pay needlessly, in cases where one *expects* to move the bookmark. Imagine if someone said to you, about your moving your bookmark in your novel: "From now on, each time you try to move your bookmark you will need to confirm that you really want to do that, since this is, after all, an existing bookmark." It seems that you have not recognized the silent-update use case, and so have not understood why the proposed change would be annoying, hence why users need a choice here. I hope you understand it now. > I believe this is what most users would expect. Could be. That speaks positively for the non-silent update case. It is not an argument for denying the silent-update case. > (Compare: when you save a file under a new name, if there's an > existing file of that name, you are also warned.) We can play games with such analogies, if you like. Updating a bookmark is more like typing text into a buffer - *saving* your bookmarks is something different from updating them. Yes, some buffers are read-only, and for those an error is raised when you type. (But you are not warned by the action of turning off read-only - you are not asked to confirm that change.) > So I propose that that should be the default behavior (because > losing information silently is usually bad), and that there can > be a variable for you to set to get the silent-overwrite behavior > that you prefer as the default. No. A variable is not user friendly. There should be two different commands, bound to two different keys. It is about different use cases - for different contexts. It is not about different users, some of whom always want silent updating and some of whom always want confirmation querying. > Equal flexibility there. This discussion is about _defaults_. Providing a variable as the only means to silently update does not provide equal flexibility. There is no need for a discussion about defaults (except for which command goes on which key), if you provide two different commands bound to two different keys. And that really *does* provide "equal flexibility". From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 21:28:57 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 01:28:57 +0000 Received: from localhost ([127.0.0.1]:51710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbKaf-0003dW-FK for submit@debbugs.gnu.org; Tue, 29 Oct 2013 21:28:57 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:65225) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbKad-0003dG-AM for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 21:28:55 -0400 Received: by mail-pd0-f175.google.com with SMTP id g10so230212pdj.20 for <15746@debbugs.gnu.org>; Tue, 29 Oct 2013 18:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=lLQZGwG2XZUOdI4+N4t8HPob92fB36149FGTmDKCt5Q=; b=oTZk8gydOfmrCXz3Btz0EZDjG+hOirKaX/Kz5bxk+VXPz0I2Ng5lF+0KKygQ5gzYoZ HFFWcEY4TIGodxSSnPwdwbVuhO2L3jLon5Vy9CXm2PJVGxoe/72PkJGjkYKP2j1MSS40 wJc3EowYokfFZxeAnNXbPtUBkoFXSfrXbuTP3Xs70Br9pnI69zn97FbhVyluZMaxysZj XshUgs29C5gh6YaT+SzPha2A2JtwQHQy65NiZBZ7dSaIg2nrfwMAkuZqENjXsAjQcqqb bKrRLLCG34AZTS67HQr0+EC7mFaqfqr2sMeu1rHJaOR9Ihs8kLaGwTgziZ0cx3oRv0+E 5miQ== X-Received: by 10.68.252.135 with SMTP id zs7mr61470pbc.194.1383096529485; Tue, 29 Oct 2013 18:28:49 -0700 (PDT) Received: from localhost ([222.130.176.76]) by mx.google.com with ESMTPSA id c1sm37717688pbl.44.2013.10.29.18.28.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2013 18:28:48 -0700 (PDT) From: Leo Liu To: Karl Fogel Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Wed, 30 Oct 2013 09:28:37 +0800 In-Reply-To: <87iowg9bqw.fsf@floss.red-bean.com> (Karl Fogel's message of "Tue, 29 Oct 2013 13:24:07 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) On 2013-10-30 02:24 +0800, Karl Fogel wrote: > Leo, there would need to be a patch to the doc string too, but I can > write that. I would probably also change the `user-error' behavior > along the lines Drew suggested. Thank you for taking care of this. Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 22:11:58 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 02:11:58 +0000 Received: from localhost ([127.0.0.1]:51785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLGH-0004jI-U4 for submit@debbugs.gnu.org; Tue, 29 Oct 2013 22:11:58 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:44114) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLGF-0004j3-4I for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 22:11:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsoXfp/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgaxH5AOkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFsoXfp/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAs0EhQYDSSIHgaxH5AOkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="36645144" Received: from 108-161-119-233.dsl.teksavvy.com (HELO pastel.home) ([108.161.119.233]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Oct 2013 22:11:49 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4270F608DB; Tue, 29 Oct 2013 22:11:49 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite Message-ID: References: <87iowg9bqw.fsf@floss.red-bean.com> Date: Tue, 29 Oct 2013 22:11:49 -0400 In-Reply-To: (Drew Adams's message of "Tue, 29 Oct 2013 13:09:24 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) >> I think most users would expect that that *interactively* setting a >> bookmark would confirm when overriding a previous bookmark of the >> same name, instead of just silently overwriting it. > There are plenty of use cases where you want to silently *update* an > existing bookmark, e.g., update its location. 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? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 22:26:41 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 02:26:41 +0000 Received: from localhost ([127.0.0.1]:51801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLUW-00055p-KG for submit@debbugs.gnu.org; Tue, 29 Oct 2013 22:26:41 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:24990) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLUT-00055Y-P2 for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 22:26:38 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9U2QU9w001465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Oct 2013 02:26:31 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9U2QTf9025970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Oct 2013 02:26:30 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9U2QSFn010590; Wed, 30 Oct 2013 02:26:29 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 29 Oct 2013 19:26:27 -0700 (PDT) From: Drew Adams To: Karl Fogel , Leo Liu Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> In-Reply-To: <87iowg9bqw.fsf@floss.red-bean.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > I would probably also change the `user-error' behavior along the > lines Drew suggested. Uh, I did not suggest any change wrt the use of `user-error', here. Unfortunately, it is the appropriate type of error to use in this case. There has been abundant discussion of `user-error' in other threads. Its meaning is not a user error. The meaning is any error except a coding error, i.e., except something that the code never expects to happen. That's OK as a category, perhaps, but it should not have the name "user-error". But it does, and we live with it. http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11999#35 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15670#11 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 22:35:15 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 02:35:15 +0000 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 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 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 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 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 MIME-Version: 1.0 Message-ID: <3bb8958a-dd47-469b-9ee5-2891ba575344@default> Date: Tue, 29 Oct 2013 19:35:02 -0700 (PDT) From: Drew Adams To: Stefan Monnier Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > 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'. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 22:56:52 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 02:56:52 +0000 Received: from localhost ([127.0.0.1]:51842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLxj-0005sN-H3 for submit@debbugs.gnu.org; Tue, 29 Oct 2013 22:56:51 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:61945) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbLxh-0005s7-H1 for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 22:56:50 -0400 Received: by mail-pb0-f44.google.com with SMTP id rp16so739358pbb.3 for <15746@debbugs.gnu.org>; Tue, 29 Oct 2013 19:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=UpvwEpgVVnWAtdgCBK0txg8uHIo2ovsbG5bi/qsfCBM=; b=TvgAm/xQ/ku3v9kThCy4Jmnot0GlEVJRnjStImC+EYI2cXR6vWbYPPaw5dTcQRpLvG qN17SRqoqaqkbRnoKCJEaBLc5+SBeJ1w/m2bxmwuUNPlR115In0dXAGjfpRm6WQttJ1a J1Jux9i1d6V2ADEjSwiDjHj6jTZeZXnEqzdLXRYxl36pM+EMxvDXhZLhm0XzUzwu/Wq5 7f1CVeAPIvwS4/FiTbdbKzmVXer0BegSot2Hy5itJppQ+2ntHDrCy11kUiYEj+YDTTRG DBlreRP9akJfA3S6vg9sZcKyZAlqan4rHiaAndiLkA7bwIoEcLPAZ2PI5bY15zJVtIY/ 5OiQ== X-Received: by 10.68.254.105 with SMTP id ah9mr2676491pbd.87.1383101803558; Tue, 29 Oct 2013 19:56:43 -0700 (PDT) Received: from localhost ([222.130.176.76]) by mx.google.com with ESMTPSA id lm2sm1153912pab.2.2013.10.29.19.56.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2013 19:56:43 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Wed, 30 Oct 2013 10:56:34 +0800 In-Reply-To: (Stefan Monnier's message of "Tue, 29 Oct 2013 22:11:49 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) On 2013-10-30 10:11 +0800, Stefan Monnier wrote: > 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? Undo in this case is less intuitive than when editing text. I think the right moment to decide overwriting is when creating the bookmark. So maybe we could provide a variable to control this confirmation behaviour? But I agree with Karl the default should provide confirmation. BTW, I use bookmark as some sort of persistent registers that I can make use another day another place. I rsync bookmarks to a few machines so bookmark-save-flag is 1 to make sure the db is always fully in disk. Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 23:14:48 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 03:14:48 +0000 Received: from localhost ([127.0.0.1]:51868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbMF6-0006KN-5l for submit@debbugs.gnu.org; Tue, 29 Oct 2013 23:14:48 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18555) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbMF3-0006KA-VW for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 23:14:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsoXfp/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgksR+QDpEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFsoXfp/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgksR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="36647192" Received: from 108-161-119-233.dsl.teksavvy.com (HELO pastel.home) ([108.161.119.233]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Oct 2013 23:14:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id 3AF6A60713; Tue, 29 Oct 2013 23:14:40 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite Message-ID: References: <87iowg9bqw.fsf@floss.red-bean.com> Date: Tue, 29 Oct 2013 23:14:40 -0400 In-Reply-To: (Leo Liu's message of "Wed, 30 Oct 2013 10:56:34 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) How 'bout we use a slightly lighter weight y-or-n-p which accepts RET to mean "yes"? This way, Drew can hit RET RET when he knows he's overwriting an existing bookmark. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 23:36:19 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 03:36:19 +0000 Received: from localhost ([127.0.0.1]:51885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbMZu-0007wO-Mg for submit@debbugs.gnu.org; Tue, 29 Oct 2013 23:36:18 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:44968) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbMZr-0007w6-9e for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 23:36:15 -0400 Received: by mail-pa0-f50.google.com with SMTP id fb1so311969pad.9 for <15746@debbugs.gnu.org>; Tue, 29 Oct 2013 20:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=1OEyQtsjxnfjDHIEAyZ2qPpDzFI/4tI84q5goZWWzTE=; b=xGIpnYQcySQaeBNBhbRT/VHc85UI4WcRDoR+pV8/PNERSYgv2RPMiB4DNXuBPbRRr9 jVAioQ56eibJ9rdPtsXhMDzWqTxeHLDQI8a9zGxMQBmN8dkHLKMfBIqzglJ3QY+7tQ80 dWOZPtLPEsG25khYo8fDJDhDcVsHkbXcxLigXwPpCQLe70gjCjm09l3pQ8mSxDOzrEQS OdcZRtBBsYH2DSCv421qvlBJDi40SgFp/A31/rvKUZ0Uz8n4ZbJGkNlU0Wa9fxql0MOS 0QzN+HgMV06MoWVhFMWodoGWYjtgT4Dl3f5vXQphWE8BgDWS28MCXidEsBlipAVbF5aH RbKw== X-Received: by 10.68.172.36 with SMTP id az4mr3014466pbc.48.1383104169408; Tue, 29 Oct 2013 20:36:09 -0700 (PDT) Received: from localhost ([222.130.176.76]) by mx.google.com with ESMTPSA id hz10sm38227399pbc.36.2013.10.29.20.36.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2013 20:36:08 -0700 (PDT) From: Leo Liu To: Stefan Monnier Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Wed, 30 Oct 2013 11:36:01 +0800 In-Reply-To: (Stefan Monnier's message of "Tue, 29 Oct 2013 23:14:40 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) On 2013-10-30 11:14 +0800, Stefan Monnier wrote: > This way, Drew can hit RET RET when he knows he's overwriting an > existing bookmark. This would change a standard question into something slightly different. Not good UI in my view. Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 29 23:57:28 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 03:57:29 +0000 Received: from localhost ([127.0.0.1]:51904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbMuO-0008Rz-MA for submit@debbugs.gnu.org; Tue, 29 Oct 2013 23:57:28 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:32797) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbMuN-0008Rk-10 for 15746@debbugs.gnu.org; Tue, 29 Oct 2013 23:57:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsoXfp/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFsoXfp/2dsb2JhbABEvw4Xc4IeAQEEAVYjEAsOJhIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="36648247" Received: from 108-161-119-233.dsl.teksavvy.com (HELO pastel.home) ([108.161.119.233]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Oct 2013 23:57:21 -0400 Received: by pastel.home (Postfix, from userid 20848) id 086DE60713; Tue, 29 Oct 2013 23:57:20 -0400 (EDT) From: Stefan Monnier To: Leo Liu Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite Message-ID: References: <87iowg9bqw.fsf@floss.red-bean.com> Date: Tue, 29 Oct 2013 23:57:20 -0400 In-Reply-To: (Leo Liu's message of "Wed, 30 Oct 2013 11:36:01 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) >> This way, Drew can hit RET RET when he knows he's overwriting an >> existing bookmark. > This would change a standard question into something slightly different. > Not good UI in my view. Partly agreed. But the RET RET confirmation is already used in C-x C-f and C-x b when visiting a new file or a new buffer, so it's not completely new. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 00:32:01 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 04:32:01 +0000 Received: from localhost ([127.0.0.1]:51921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbNRo-0000ps-EY for submit@debbugs.gnu.org; Wed, 30 Oct 2013 00:32:00 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:42384) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbNRm-0000pb-06 for 15746@debbugs.gnu.org; Wed, 30 Oct 2013 00:31:58 -0400 Received: by mail-ie0-f179.google.com with SMTP id aq17so1435681iec.10 for <15746@debbugs.gnu.org>; Tue, 29 Oct 2013 21:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:reply-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=KgqkHFJhPVBkK+tnpX05vqDm/XofPfMEVPKtaJa4PC8=; b=ibDKKKqOW92sB6pB2f9tm+rsSinjIA0+bNf4vV6tbDE1yalARia2dtD2t1tV0ssePu MuBgzc4NbitUXzm6Se/eugwscb6f6JhvqK1wUL8+nKCwHK9aTcdp3TwP3j24mmaj6ft1 b2Fu1uBbabGs+FMdjWBfShVbyWYcFL4+Kx9XHEL2aNCeOed+whEoH5AUQTTest7g5c+K HlBRrvtDF+0wmpV5SUmzC5ROcSBZjdLcvIsuNgHe/kORQUhhQhrS4XSsl3dxJF8jUBOY Cwqsf1GRn0CjW+EVCeBb4X41O0k6ZGXZLjN2KAI/BELjEjxepD+tCIpn8NsoNjSbKmEp 9jhw== X-Received: by 10.50.136.137 with SMTP id qa9mr893791igb.42.1383107512123; Tue, 29 Oct 2013 21:31:52 -0700 (PDT) Received: from floss.red-bean.com (50-200-5-118-static.hfc.comcastbusiness.net. [50.200.5.118]) by mx.google.com with ESMTPSA id ft2sm5223441igb.5.2013.10.29.21.31.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 29 Oct 2013 21:31:51 -0700 (PDT) From: Karl Fogel To: Drew Adams Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> <87ob677qcb.fsf@floss.red-bean.com> Date: Tue, 29 Oct 2013 23:31:50 -0500 In-Reply-To: (Drew Adams's message of "Tue, 29 Oct 2013 15:16:02 -0700 (PDT)") Message-ID: <87r4b35qh5.fsf@floss.red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Karl Fogel 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.7 (/) Drew Adams writes: >You seem to be turning things around, as if the proposal gave users >a choice and I were arguing against that or I were arguing only >about a different default behavior. Look at the proposed patch, >please. Oh, sure, I saw the patch. I saw it as a starting point; subsequent discussion (before my mail, IIRC) turned to the question of providing a customizeable behavior, so that both ways were available. In any case, I assumed that potential customization was so obvious we were clearly just talking about the question of what the default should be. I see now that I should have made that assumption more explicit, however. >It seems that you have not recognized the silent-update use case, >and so have not understood why the proposed change would be >annoying, hence why users need a choice here. I hope you understand >it now. Actually, no -- not only do I recognize it, it is the majority use case for me as well. I just don't think it's good as a default, that's all. >No. A variable is not user friendly. There should be two different >commands, bound to two different keys. It is about different use >cases - for different contexts. It is not about different users, >some of whom always want silent updating and some of whom always >want confirmation querying. That's another solution, hmmm, but it seems to me it complexifies the user interface a bit (it adds another binding in the keyspace, which the user then cannot avoid encountering when looking at the available bound commands -- whereas a variable is something they only need to deal with if/when they go looking for it, read the documentation, etc). So I'm not sure which way is better; I think we might be down to the "tyranny of small differences" at that point :-). >Providing a variable as the only means to silently update does >not provide equal flexibility. > >There is no need for a discussion about defaults (except for which >command goes on which key), if you provide two different commands >bound to two different keys. And that really *does* provide >"equal flexibility". As far as that assertion goes, it is true, yes. It doesn't address the keyspace complexity issue. I guess I'll ponder, and then commit some patch. It need not be the final patch, but 90% of the code is the same either way and I'd like to get that part into the codebase so we can discuss the other 10%. Best, -K From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 10:08:11 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 14:08:11 +0000 Received: from localhost ([127.0.0.1]:52736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbWRP-0002Ht-8B for submit@debbugs.gnu.org; Wed, 30 Oct 2013 10:08:11 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25064) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbWRM-0002Hd-Np for 15746@debbugs.gnu.org; Wed, 30 Oct 2013 10:08:09 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9UE81gv027545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Oct 2013 14:08:02 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9UE81hk009901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Oct 2013 14:08:01 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9UE81RC020849; Wed, 30 Oct 2013 14:08:01 GMT MIME-Version: 1.0 Message-ID: <250b9619-c6ea-49ba-ac8e-6cc40e958eee@default> Date: Wed, 30 Oct 2013 07:07:59 -0700 (PDT) From: Drew Adams To: Karl Fogel Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> <87ob677qcb.fsf@floss.red-bean.com> <87r4b35qh5.fsf@floss.red-bean.com> In-Reply-To: <87r4b35qh5.fsf@floss.red-bean.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > >No. A variable is not user friendly. There should be two > >different commands, bound to two different keys. It is about > >different use cases - for different contexts. It is not about > >different users, some of whom always want silent updating and some > >of whom always want confirmation querying. >=20 > That's another solution, hmmm, but it seems to me it complexifies > the user interface a bit=20 It's a lot simpler for a user than changing a variable value for one bookmark update (w/o confirmation) and changing it again for another update (w/ confirmation). > (it adds another binding in the keyspace, which the user then cannot > avoid encountering when looking at the available bound commands That's a good thing. Helps users see that both possibilities exist. > -- whereas a variable is something they only need to deal with > if/when they go looking for it, read the documentation, etc). Which is not a thing. And `C-h m' and `C-h b' *are* part of the documentation. > So I'm not sure which way is better; I think we might be down to > the "tyranny of small differences" at that point :-). If you take the point of view that both are useful behaviors for a user to have (even the same user, in different contexts), and that it should be easy to use either of them, then having two commands recommends itself as the way to go. If you don't want to provide key bindings for both commands, fine (but too bad). > >Providing a variable as the only means to silently update does > >not provide equal flexibility. > > > >There is no need for a discussion about defaults (except for which > >command goes on which key), if you provide two different commands > >bound to two different keys. And that really *does* provide > >"equal flexibility". >=20 > As far as that assertion goes, it is true, yes. It doesn't address > the keyspace complexity issue. I don't see a keyspace complexity issue here. Having both `C-x r m' and, say, `C-x r M', which do almost the same thing, sounds quite reasonable, to me. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 10:08:17 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 14:08:17 +0000 Received: from localhost ([127.0.0.1]:52739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbWRU-0002IB-QV for submit@debbugs.gnu.org; Wed, 30 Oct 2013 10:08:17 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25065) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbWRS-0002He-0N for 15746@debbugs.gnu.org; Wed, 30 Oct 2013 10:08:14 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9UE81O7027534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Oct 2013 14:08:02 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9UE80qY020754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Oct 2013 14:08:00 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9UE7xUr005612; Wed, 30 Oct 2013 14:07:59 GMT MIME-Version: 1.0 Message-ID: <089d6db9-1a1c-4f33-a999-7fd063e7e772@default> Date: Wed, 30 Oct 2013 07:07:57 -0700 (PDT) From: Drew Adams To: Stefan Monnier , Leo Liu Subject: RE: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite References: <87iowg9bqw.fsf@floss.red-bean.com> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.8 (--) > How 'bout we use a slightly lighter weight y-or-n-p which accepts > RET to mean "yes"? Yes. > This way, Drew can hit RET RET when he knows he's overwriting an > existing bookmark. No. There still should be two different commands. Updating a bookmark should not always require interacting with a confirmation query. There is really no good reason for such complexity. Make both use cases equally easy. Provide `C-x r m' and `C-x r M'. Simple. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 30 14:17:23 2013 Received: (at 15746) by debbugs.gnu.org; 30 Oct 2013 18:17:23 +0000 Received: from localhost ([127.0.0.1]:53205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbaKZ-00008j-3B for submit@debbugs.gnu.org; Wed, 30 Oct 2013 14:17:23 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:35666) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VbaKX-00008Y-4l for 15746@debbugs.gnu.org; Wed, 30 Oct 2013 14:17:21 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r9UIHKBX008596; Wed, 30 Oct 2013 14:17:20 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 21C32B42FC; Wed, 30 Oct 2013 14:17:20 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#15746: 24.3; [PATCH] bookmark should confirm when overwrite Message-ID: References: <87iowg9bqw.fsf@floss.red-bean.com> <089d6db9-1a1c-4f33-a999-7fd063e7e772@default> Date: Wed, 30 Oct 2013 14:17:20 -0400 In-Reply-To: <089d6db9-1a1c-4f33-a999-7fd063e7e772@default> (Drew Adams's message of "Wed, 30 Oct 2013 07:07:57 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4747=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4747> : inlines <191> : streams <1065098> : uri <1580889> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 15746 Cc: Karl Fogel , 15746@debbugs.gnu.org, Leo Liu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -1.9 (-) > No. There still should be two different commands. Updating a > bookmark should not always require interacting with a confirmation > query. You don't need to interact: since you know you're updating a bookmark, you just hit RET RET at the end instead of a single RET, without paying attention to the prompt that might be displayed. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 08 14:28:00 2015 Received: (at 15746-done) by debbugs.gnu.org; 8 Nov 2015 19:28:00 +0000 Received: from localhost ([127.0.0.1]:57840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvVd9-0003YU-Kd for submit@debbugs.gnu.org; Sun, 08 Nov 2015 14:27:59 -0500 Received: from mail-yk0-f180.google.com ([209.85.160.180]:33881) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvVcp-0003Y0-9w for 15746-done@debbugs.gnu.org; Sun, 08 Nov 2015 14:27:57 -0500 Received: by ykfs79 with SMTP id s79so5912417ykf.1 for <15746-done@debbugs.gnu.org>; Sun, 08 Nov 2015 11:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:reply-to:date:message-id:mime-version :content-type; bh=YgSxLVEX/kQ30ZEI17W0djPMpOprRp8dxlGh9LygjQM=; b=u/ZBXGHPUptx6cDJrciPUtHBvk8pyxRV9wwXGZ8ijlinq7YMJSgAeaBMKNNqY4hSaV /v3VlwvjOJR2CuwThjo7aZl+SDOfOPyMYk4bm0WjqMDYbT7/Xw/8y0c+H/CyFk+/9jNn bY22WNzH3B64pA5YG/E2jzoVZoz2zzJwwD5TzM0qxVKsdJf7pRRTXKYheR7Y68bynlFb p7wNjz3FhWiMe/aHyuo6B9OvOVklJv7V7bpUbngWnoIsfnZ4Ijj7ein2Z3eQhpYmbtds BJ1Y8hFEXiESba/rah1NyOB2/mSmDRP/xRYQ0Av6pHtaM38H4OSujsTCLJRU+BP9sjCj 0EPg== X-Received: by 10.13.238.4 with SMTP id x4mr20051982ywe.344.1447010858865; Sun, 08 Nov 2015 11:27:38 -0800 (PST) Received: from klen ([64.94.31.206]) by smtp.gmail.com with ESMTPSA id v127sm9905751ywd.53.2015.11.08.11.27.37 for <15746-done@debbugs.gnu.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Nov 2015 11:27:38 -0800 (PST) From: Karl Fogel To: 15746-done@debbugs.gnu.org Subject: Fix committed to master. Date: Sun, 08 Nov 2015 14:27:33 -0500 Message-ID: <87611cnvfe.fsf@red-bean.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15746-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Karl Fogel 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.7 (/) I've pushed a fix to master for this (commit 3812e17978). Essentially it takes Drew's suggestion. I left "C-x r m" as `bookmark-set', with the same behavior it has now, and "C-x r M" sets a bookmark but errors if it would overwrite an existing bookmark of the same name. I didn't go with Stefan's suggestion of using RET RET instead of RET, because you can't habituate to it. You don't necessarily know in advance whether you're setting a new bookmark or updating an existing bookmark, so you can't predict whether you will need to hit RET or RET RET. Better to offer two different commands, and those people who want one style all the time can just use the appropriate command all the time. Comments and further discussion welcome, of course. Thanks, Leo, for raising this issue, and thanks Drew and Stefan for helping think things through in the bug ticket. From unknown Thu Aug 14 21:56:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 07 Dec 2015 12: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