From unknown Thu Jun 19 14:02:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12504 <12504@debbugs.gnu.org> To: bug#12504 <12504@debbugs.gnu.org> Subject: Status: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string' Reply-To: bug#12504 <12504@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:02:57 +0000 retitle 12504 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-st= ring' reassign 12504 emacs submitter 12504 "Drew Adams" severity 12504 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 13:07:16 2012 Received: (at submit) by debbugs.gnu.org; 24 Sep 2012 17:07:16 +0000 Received: from localhost ([127.0.0.1]:53463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGC7n-0004my-8A for submit@debbugs.gnu.org; Mon, 24 Sep 2012 13:07:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41019) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGC7j-0004mo-QD for submit@debbugs.gnu.org; Mon, 24 Sep 2012 13:07:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGC5r-0007t1-B9 for submit@debbugs.gnu.org; Mon, 24 Sep 2012 13:05:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGC5r-0007st-8S for submit@debbugs.gnu.org; Mon, 24 Sep 2012 13:05:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGC5o-000861-9T for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:05:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGC5g-0007dv-Ey for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:05:11 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:34803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGC5g-0007cT-8u for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:05:04 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8OH50bp028047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Sep 2012 17:05:01 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8OH50Nh005563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 24 Sep 2012 17:05:00 GMT Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8OH50RR027650 for ; Mon, 24 Sep 2012 12:05:00 -0500 Received: from dradamslap1 (/10.159.184.43) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Sep 2012 10:05:00 -0700 From: "Drew Adams" To: Subject: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string' Date: Mon, 24 Sep 2012 10:04:46 -0700 Message-ID: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Ac2adrLvXKvbyYt+R66DpTvSpp055g== X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Should `bookmark-rename' call `bookmark-maybe-historicize-string', as it does now? I am not sure this is a bug, but I would like to raise the question. What is the reason for that macro call by `bookmark-rename'? The macro pushes the STRING arg to `bookmark-history' for non-interactive use. Why would we do that for the old bookmark name, when you rename a bookmark? Is it because we want to let you access that old name later, so you can rename other bookmarks that might have the old name as a prefix? That's about all I can think of. But with such a rationale, why don't we do that only when `bookmark-rename' is called interactively? Instead, we do it only when the function is NOT called interactively. It seems to me that Lisp code should be able to use `bookmark-rename' without adding the old name to the history. Renaming a bookmark should do only that, I think. Is there a bug here? If not, what is the rationale? The doc string for `bookmark-rename' offers this rationale: Put STRING into the bookmark prompt history, if caller non-interactive. We need this because sometimes bookmark functions are invoked from menus, so `completing-read' never gets a chance to set `bookmark-history'. (Such a rationale really should be a comment, not part of the doc string, BTW.) OK, it is true that `bookmark-rename' is used in a menu. But what's done does not seem the best way to handle the problem cited. If it were, then presumably we would be doing that kind of thing all over the place, not just in bookmark.el. And the implementation is overkill for that rationale. It presumes that every non-interactive call to `bookmark-rename' should update the history. I think there is a bug here, but if not I'd like to understand this better. Thx. In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600) of 2012-09-17 on MARVIN Bzr revision: 110062 cyd@gnu.org-20120917054104-r93rtwkrtva73ewe Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 30 23:58:07 2012 Received: (at 12504) by debbugs.gnu.org; 1 Oct 2012 03:58:07 +0000 Received: from localhost ([127.0.0.1]:35340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIX8x-0001Gh-99 for submit@debbugs.gnu.org; Sun, 30 Sep 2012 23:58:07 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:52729) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIX8v-0001Ga-OR for 12504@debbugs.gnu.org; Sun, 30 Sep 2012 23:58:06 -0400 Received: by iec9 with SMTP id 9so11848302iec.3 for <12504@debbugs.gnu.org>; Sun, 30 Sep 2012 20:57:41 -0700 (PDT) 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=L9kLC4aVW6yAGCSVGpSYc1enQF7dPrXKLsz7njl/Skw=; b=mZh3YwlFhySqQ7A7ZChwgDIeoMLnAGYbPqJkrmExPTaPL874hlzLWcnL40kJ7Edl3E Ll910sHMHludekM86E9cH5QayLf6UtXfY8vR860TpGYxkQLJ/y8bFxRHc7T0vcu8QukT tEZjPU5BIeCI4TTNBQMSi+aNvTginJG2p8zKOHbTOOWEsLk2SEr3rDbE4DUSo0CCu3fh 2jlfRLwDX5Q0QY9kSVkTgH0cNm6MVlyVJv1FV3BRI/gNZieygSnZhtX8ULLpLYY8P34M WawDM9j0ay3EZj+RrJQNkm+i9TCZJZlpNQ3jd1F5XV3mn4J3UubSq0+NLNPtreH1bLG2 MLQQ== Received: by 10.50.150.144 with SMTP id ui16mr4557419igb.68.1349063860930; Sun, 30 Sep 2012 20:57:40 -0700 (PDT) Received: from floss.red-bean.com (173-109-178-220.pools.spcsdns.net. [173.109.178.220]) by mx.google.com with ESMTPS id a10sm6215410igd.1.2012.09.30.20.57.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 30 Sep 2012 20:57:40 -0700 (PDT) From: Karl Fogel To: 12504@debbugs.gnu.org Subject: Re: `bookmark-rename' and `bookmark-maybe-historicize-string' Date: Sun, 30 Sep 2012 22:57:37 -0500 Message-ID: <87lifqhmj2.fsf@floss.red-bean.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12504 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Karl Fogel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.7 (/) I agree there is a bug, or maybe a buglet, here, for the reasons you describe, but I'm not sure how to solve it. Does invoking functions through a menu result in an environment where `called-interactively-p' returns non-nil? In that case, the premise behind `bookmark-maybe-historicize-string' is all wrong anyway, and the macro should be rewritten to: `(when (called-interactively-p 'interactive) (setq bookmark-history (cons ,string bookmark-history)))) The issue is larger than just `bookmark-rename', obviously. By the way, your guess is right: it's useful (I think) to have the old name in the history for `bookmark-rename', because someone may want to use it or a variant of it in another bookmark soon. History is cheap that way: it's better to have a little junk than to *not* have the thing the user needs when they need it. Let's tackle the larger issue with `bookmark-maybe-historicize-string', and then figure out whether `bookmark-rename' is doing the right thing. -Karl From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 00:29:55 2012 Received: (at 12504) by debbugs.gnu.org; 1 Oct 2012 04:29:55 +0000 Received: from localhost ([127.0.0.1]:35399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIXdi-000209-K6 for submit@debbugs.gnu.org; Mon, 01 Oct 2012 00:29:54 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:39986) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIXdh-000202-1q for 12504@debbugs.gnu.org; Mon, 01 Oct 2012 00:29:53 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q914TRE4023806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Oct 2012 04:29:28 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q914TQSq018144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Oct 2012 04:29:27 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q914TQhi005765; Sun, 30 Sep 2012 23:29:26 -0500 Received: from dradamslap1 (/10.159.219.231) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 30 Sep 2012 21:29:26 -0700 From: "Drew Adams" To: "'Karl Fogel'" , <12504@debbugs.gnu.org> References: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> <87lifqhmj2.fsf@floss.red-bean.com> Subject: RE: bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string' Date: Sun, 30 Sep 2012 21:29:13 -0700 Message-ID: <8B5272B140EB45FB822FEA3D45F3FB46@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87lifqhmj2.fsf@floss.red-bean.com> Thread-Index: Ac2fiQxXfJykwfmXQneZlZq4efcyqQAAeFOg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 12504 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.1 (-------) > I agree there is a bug, or maybe a buglet, here, for the reasons you > describe, but I'm not sure how to solve it. > > Does invoking functions through a menu result in an environment where > `called-interactively-p' returns non-nil? In that case, the premise > behind `bookmark-maybe-historicize-string' is all wrong > anyway, and the macro should be rewritten to: > > `(when (called-interactively-p 'interactive) > (setq bookmark-history (cons ,string bookmark-history)))) I think the problem that the code comment refers to, namely that invoking it from a menu will not add it to the history, is a real problem, albeit a minor one. And as you say, it has nothing to do with bookmarks in particular. I would suggest removing this workaround to try to make it DTRT for bookmark.el menu commands, and just kick the question up to emacs-devel. There might be a good general answer. In any case, it is a general question. And I don't see a crying need for bookmark renaming etc. to handle this specially. There was some discussion on emacs-devel a few years back about optionally (i.e., a user could choose) adding commands invoked using menus to the command history (which is a bit different, but which could cover this case as well). I implemented that in Icicles, with user option `icicle-menu-items-to-history-flag': "Non-nil means to add menu-item commands to the command history. This history is `extended-command-history'." FWIW, I do that by adding/removing this function to/from `pre-command-hook', according to the option value: (defun icicle-add-menu-item-to-cmd-history () "Add `this-command' to command history, if it is a menu item. Menu items that are not associated with a command symbol are ignored. Used on `pre-command-hook'." (condition-case nil ; Just in case, since this is on `pre-command-hook'. (when (and (> (length (this-command-keys-vector)) 0) (equal '(menu-bar) (elt (this-command-keys-vector) 0)) ;; Exclude uninterned symbols such as `menu-function-356'. (symbolp this-command) (intern-soft this-command)) (pushnew (symbol-name this-command) extended-command-history)) (error nil))) > The issue is larger than just `bookmark-rename', obviously. Yup. I don't think bookmark.el should try to deal with it. How important is it for menu access to add such stuff to the history? > By the way, your guess is right: it's useful (I think) to have the old > name in the history for `bookmark-rename', because someone may want to > use it or a variant of it in another bookmark soon. History is cheap > that way: it's better to have a little junk than to *not* > have the thing the user needs when they need it. I agree about the usefulness, but I think it should be done only when `bookmark-rename' is invoked interactively. (In my code, there is, in some contexts, some automatic bookmark renaming, and it makes no sense in such non-interactive calls to add the old names to the history. Anyway, that's my problem, but for bookmark.el I still don't think it helps to add to the history unless invoked interactively.) > Let's tackle the larger issue with > `bookmark-maybe-historicize-string', See above. Any solution to satisfy this need should, in any case, not be adding to the history "if caller non-interactive". That's a bad workaround if the goal is to add to the history when the user uses the menu: non-interactively is not the same thing as interactively-using-a-menu. > and then figure out whether `bookmark-rename' is doing the > right thing. See above for my opinion. HTH - Drew From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 17:28:08 2012 Received: (at 12504) by debbugs.gnu.org; 1 Oct 2012 21:28:08 +0000 Received: from localhost ([127.0.0.1]:36791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TInX5-00056x-T7 for submit@debbugs.gnu.org; Mon, 01 Oct 2012 17:28:08 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:48141) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TInX4-00056q-7f for 12504@debbugs.gnu.org; Mon, 01 Oct 2012 17:28:07 -0400 Received: by iec9 with SMTP id 9so13984415iec.3 for <12504@debbugs.gnu.org>; Mon, 01 Oct 2012 14:27:37 -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=neptyk0/bBC3PFsColN/XQP9/YOHkpIKAFjrNxp7n34=; b=cH9X+VRWn4Cw5zPNd8K32xFM/X+sROvUFbK3No0pc+9huV1YsHzDNo/73P9FJa/Ojg 0QS6ITkKN+7uupiQZA83MeC1v4yzZGxzM3QIz2qx8sstiKpqBxQVH9Xx5jNX+ynnuXzP FBqlfZWBYBsE87uVFs3u3KM2mseMEduYK+lb0h/Xw0u9a0+YWwnF9CpcLgXWTzDyPIL5 LXGlhdQ71pzhYuRBCxP7aqAx8Nh4kvrXBx6xv0Ja5pAClSr1OFr5DO5fGuOkEQg4PLPM waZ7xGJwAfAQ9kgRjCCbZbf26HJd7vwmbZUfaSVRYgtHDV4TcQNWGtjZV9ZeQRQsPzEh tfFQ== Received: by 10.50.185.194 with SMTP id fe2mr7060046igc.60.1349126857528; Mon, 01 Oct 2012 14:27:37 -0700 (PDT) Received: from kwarm.red-bean.com (74-92-190-113-Illinois.hfc.comcastbusiness.net. [74.92.190.113]) by mx.google.com with ESMTPS id hz10sm7376497igc.12.2012.10.01.14.27.35 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Oct 2012 14:27:36 -0700 (PDT) From: Karl Fogel To: "Drew Adams" Subject: Re: bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string' References: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> <87lifqhmj2.fsf@floss.red-bean.com> <8B5272B140EB45FB822FEA3D45F3FB46@us.oracle.com> Date: Mon, 01 Oct 2012 16:27:34 -0500 In-Reply-To: <8B5272B140EB45FB822FEA3D45F3FB46@us.oracle.com> (Drew Adams's message of "Sun, 30 Sep 2012 21:29:13 -0700") Message-ID: <87bogldgs9.fsf@kwarm.red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12504 Cc: 12504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Karl Fogel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) "Drew Adams" writes: >I agree about the usefulness, but I think it should be done only when >`bookmark-rename' is invoked interactively. When I say "interactively", I'm including both minibuffer command and menu command -- anything the user did interactively, that is. >... That's a bad workaround if the goal is to add to the history when >the user uses the menu: non-interactively is not the same thing as >interactively-using-a-menu. Sure, completely agree. We're on the same page, conceptually; the code just needs fixing, that's all :-). I'll try to do it, but am busy for a while again. Sorry for the delay. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 17:34:53 2012 Received: (at 12504) by debbugs.gnu.org; 1 Oct 2012 21:34:53 +0000 Received: from localhost ([127.0.0.1]:36796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIndc-0005Gs-Ng for submit@debbugs.gnu.org; Mon, 01 Oct 2012 17:34:53 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:32763) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TInda-0005Gk-8b for 12504@debbugs.gnu.org; Mon, 01 Oct 2012 17:34:51 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q91LYJuO029464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Oct 2012 21:34:20 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q91LYJ7i009127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Oct 2012 21:34:19 GMT Received: from abhmt111.oracle.com (abhmt111.oracle.com [141.146.116.63]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q91LYJj8008276; Mon, 1 Oct 2012 16:34:19 -0500 Received: from dradamslap1 (/10.159.219.190) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 01 Oct 2012 14:34:19 -0700 From: "Drew Adams" To: "'Karl Fogel'" References: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com><87lifqhmj2.fsf@floss.red-bean.com><8B5272B140EB45FB822FEA3D45F3FB46@us.oracle.com> <87bogldgs9.fsf@kwarm.red-bean.com> Subject: RE: bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string' Date: Mon, 1 Oct 2012 14:34:04 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87bogldgs9.fsf@kwarm.red-bean.com> Thread-Index: Ac2gG5W38dwylQwvRK6ABJRbIdfiuQAAEVyg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 12504 Cc: 12504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) > >I agree about the usefulness, but I think it should be done only when > >`bookmark-rename' is invoked interactively. > > When I say "interactively", I'm including both minibuffer command > and menu command -- anything the user did interactively, that is. Yes, that's what I meant here, too. But that is not what the code does, I believe. It adds the name to the history even when bookmark-rename is invoked non-interactively. > >... That's a bad workaround if the goal is to add to the > > history when the user uses the menu: non-interactively is not > > the same thing as interactively-using-a-menu. > > Sure, completely agree. We're on the same page, > conceptually; the code just needs fixing, that's all :-). > I'll try to do it, but am busy for a while again. Thanks. But again, this really is not specific to bookmark commands. A more general solution should be found, IMO. For bookmark.el, I would be happy if we did not try to add menu-invoked commands to the histry, and we just waited for a general solution. But I would also be happy if you implement a bookmark.el solution that does what we mentioned above: add to the history only when invoked by the user, interactively (menu or keys). From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 01 18:32:04 2012 Received: (at 12504) by debbugs.gnu.org; 1 Oct 2012 22:32:04 +0000 Received: from localhost ([127.0.0.1]:36837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIoWx-0006YL-VB for submit@debbugs.gnu.org; Mon, 01 Oct 2012 18:32:04 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:61497) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIoWv-0006Xz-Gm for 12504@debbugs.gnu.org; Mon, 01 Oct 2012 18:32:02 -0400 Received: by iec9 with SMTP id 9so14101916iec.3 for <12504@debbugs.gnu.org>; Mon, 01 Oct 2012 15:31:32 -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=HLPjbIKKMJirVc89HmMkyXBAEcRn08qWQvS1Gmd10QA=; b=NR/wcNOxSyrtZ239OAoSNVnaau95pIlDi0NkBbLj+KU9hcq5BIqJdInDT0dn1d6FSk 7oU+zA4oo1WN5zcq/XPTDelo70mv13zqpWhVVKq1LJr79s095YMJvXYiVRSZXIDNbb7x MdUgqAsjvTsYCqUtvlZS/Soze74t7HlfsSnRuVzgTGF8sIPj7nHoEMuxXMIdqQbwT8MU JYt5QWStOwM5ftd2UizahzRJFLkqccFPZhXRqzLtNf6KqsVhLlMm/4/AtbspEh/ZfdWC 174+S5RK73EdcnKLM2CbloiB95bl84aYYwZ6vKZoE3rkGu3N4dRq6waJ1W+bvS1uRuI4 +u7Q== Received: by 10.50.95.227 with SMTP id dn3mr7207378igb.14.1349130692105; Mon, 01 Oct 2012 15:31:32 -0700 (PDT) Received: from kwarm.red-bean.com (74-92-190-113-Illinois.hfc.comcastbusiness.net. [74.92.190.113]) by mx.google.com with ESMTPS id ce10sm9199818igb.1.2012.10.01.15.31.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Oct 2012 15:31:31 -0700 (PDT) From: Karl Fogel To: "Drew Adams" Subject: Re: bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string' References: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> <87lifqhmj2.fsf@floss.red-bean.com> <8B5272B140EB45FB822FEA3D45F3FB46@us.oracle.com> <87bogldgs9.fsf@kwarm.red-bean.com> Date: Mon, 01 Oct 2012 17:31:29 -0500 In-Reply-To: (Drew Adams's message of "Mon, 1 Oct 2012 14:34:04 -0700") Message-ID: <87626takou.fsf@kwarm.red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12504 Cc: 12504@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Karl Fogel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) "Drew Adams" writes: >Thanks. But again, this really is not specific to bookmark commands. A more >general solution should be found, IMO. > >For bookmark.el, I would be happy if we did not try to add menu-invoked >commands to the histry, and we just waited for a general solution. > >But I would also be happy if you implement a bookmark.el solution that >does what we mentioned above: add to the history only when invoked by >the user, interactively (menu or keys). Understood -- and thank you for laying out the options so clearly! From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 03 23:58:47 2021 Received: (at 12504) by debbugs.gnu.org; 4 Dec 2021 04:58:47 +0000 Received: from localhost ([127.0.0.1]:52756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtN8J-00014E-7n for submit@debbugs.gnu.org; Fri, 03 Dec 2021 23:58:47 -0500 Received: from quimby.gnus.org ([95.216.78.240]:60708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtN8H-00013w-AP for 12504@debbugs.gnu.org; Fri, 03 Dec 2021 23:58:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9fgNYaVNLJ8j+pdb+TT1b4qsyIENNFcXmwL1XkNiPX0=; b=NGS819UMRvFoVzEQZQLCffmRUd Raw/59bJJUL49256kCXChzk0cauCApf/be1Elui2yQqX+Njk6yzbCSMWwXzN0GX4MK5CBAzh+v84T jW+ECHSjAsKFtzZ3TJYpSc/1VqCmBoAY+uoDXQfebiCGTCVhS97MYgwnFiPYjuMoSuQU=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtN88-0002dF-2Z; Sat, 04 Dec 2021 05:58:38 +0100 From: Lars Ingebrigtsen To: Karl Fogel Subject: Re: bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string' References: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> <87lifqhmj2.fsf@floss.red-bean.com> X-Now-Playing: Neil Young's _Harvest_: "Heart Of Gold" Date: Sat, 04 Dec 2021 05:58:35 +0100 In-Reply-To: <87lifqhmj2.fsf@floss.red-bean.com> (Karl Fogel's message of "Sun, 30 Sep 2012 22:57:37 -0500") Message-ID: <87bl1xotj8.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Karl Fogel writes: > Does invoking functions through a menu result in an environment where > `called-interactively-p' returns non-nil? In that case, the premise > behind `bookmark-maybe-historicize-string' is all wrong [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12504 Cc: 12504@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: -3.3 (---) Karl Fogel writes: > Does invoking functions through a menu result in an environment where > `called-interactively-p' returns non-nil? In that case, the premise > behind `bookmark-maybe-historicize-string' is all wrong anyway, and the > macro should be rewritten to: > > `(when (called-interactively-p 'interactive) > (setq bookmark-history (cons ,string bookmark-history)))) The doc string is misleading -- this isn't about normal menus, but functions like this: (defun bookmark-bmenu-rename () "Rename bookmark on current line. Prompts for a new name." (interactive nil bookmark-bmenu-mode) (let ((bmrk (bookmark-bmenu-bookmark)) (thispoint (point))) (bookmark-rename bmrk) (goto-char thispoint))) So I've now updated the doc string. > By the way, your guess is right: it's useful (I think) to have the old > name in the history for `bookmark-rename', because someone may want to > use it or a variant of it in another bookmark soon. History is cheap > that way: it's better to have a little junk than to *not* have the thing > the user needs when they need it. So I think this is working as designed, and I'm therefore closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 03 23:58:51 2021 Received: (at control) by debbugs.gnu.org; 4 Dec 2021 04:58:51 +0000 Received: from localhost ([127.0.0.1]:52759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtN8N-00014U-FI for submit@debbugs.gnu.org; Fri, 03 Dec 2021 23:58:51 -0500 Received: from quimby.gnus.org ([95.216.78.240]:60722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtN8M-000146-0n for control@debbugs.gnu.org; Fri, 03 Dec 2021 23:58:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=lvRigPnzAWUnXd3qyioVNsrI7yXkZCJm/RAbx3Kj7Tc=; b=RnNO1u/7owLACx9+YL82CGUzNO rmtjf5uHrULMCgv7NLIdd5/3vxYOCCKhFTfE+kjCGOD+iPsPlI/JGp4TySwiTa4QiJg8f1mEotFu7 L4dClDvMJdKi4e60GfPcH4qUifjW+f9QJMeJUPX1DMSEu4SYPS2Xlrmx7ufFszKH7RyM=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mtN8E-0002dM-9X for control@debbugs.gnu.org; Sat, 04 Dec 2021 05:58:44 +0100 Date: Sat, 04 Dec 2021 05:58:41 +0100 Message-Id: <87a6hhotj2.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #12504 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 12504 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) close 12504 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 04 15:08:10 2021 Received: (at 12504) by debbugs.gnu.org; 4 Dec 2021 20:08:10 +0000 Received: from localhost ([127.0.0.1]:55066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbKL-0004Ew-Sw for submit@debbugs.gnu.org; Sat, 04 Dec 2021 15:08:10 -0500 Received: from sanpietro.red-bean.com ([45.79.25.59]:37908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtbKJ-0004Eo-Rz for 12504@debbugs.gnu.org; Sat, 04 Dec 2021 15:08:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:Reply-To:References:Subject:Cc:To:From:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SlSNc/TM7taJXUNL+MVuLEx/yFHg2mLNMqODWV8r6Us=; t=1638648487; x=1639858087; b=mLguZDLsmrIrJVg/e95nD8KhxtqT7E8wmdh0jjLA5jlwittKqcIcIKirR+XI9GJpLDPMlJwdfjD FoQnOSIqUf/Mutx1jK4PURFLStyJSwbdN669dCjxrbmsit+MauucbLre9K1bBcko5Iyy6AuGXWebx TeqahwCdJVftjvPjWg7y574k5scQvg/yQdv8rDyv6SqtYuAJSJtjXhLk0KdqGEWhTrLkLy7lmqusb ftzXkWFybpcN9jJUleYpuvTxnBa02/3/wJKCViRxvJjiIhauzWkrh7AWVVXQpF/Xtpnfry737ETSK nGFY4TqYrAwN0Ia/YBwiFcz1Q1DOhd9dhZOw==; Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:60560 helo=floss) by sanpietro.red-bean.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mtbKI-009AWV-Kr; Sat, 04 Dec 2021 20:08:06 +0000 From: Karl Fogel To: Lars Ingebrigtsen Subject: Re: bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string' References: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> <87lifqhmj2.fsf@floss.red-bean.com> <87bl1xotj8.fsf_-_@gnus.org> Date: Sat, 04 Dec 2021 14:08:05 -0600 In-Reply-To: <87bl1xotj8.fsf_-_@gnus.org> (Lars Ingebrigtsen's message of "Sat, 04 Dec 2021 05:58:35 +0100") Message-ID: <87k0gkdtga.fsf@red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12504 Cc: 12504@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: Karl Fogel Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 04 Dec 2021, Lars Ingebrigtsen wrote: >Karl Fogel writes: >The doc string is misleading -- this isn't about normal menus, >but >functions like this: > >(defun bookmark-bmenu-rename () > "Rename bookmark on current line. Prompts for a new name." > (interactive nil bookmark-bmenu-mode) > (let ((bmrk (bookmark-bmenu-bookmark)) > (thispoint (point))) > (bookmark-rename bmrk) > (goto-char thispoint))) > >So I've now updated the doc string. Thank you, and... >So I think this is working as designed, and I'm therefore closing >this >bug report. ...agreed. Best regards, -Karl From unknown Thu Jun 19 14:02:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 02 Jan 2022 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