From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#12504: 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1348506382 20265 80.91.229.3 (24 Sep 2012 17:06:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Sep 2012 17:06:22 +0000 (UTC) To: 12504@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 24 19:06:27 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TGC70-0001Jc-Uk for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Sep 2012 19:06:27 +0200 Original-Received: from localhost ([::1]:44882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGC6w-0008SG-2p for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Sep 2012 13:06:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGC6p-0008RT-ES for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:06:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGC6i-0008Qu-OG for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:06:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGC6i-0008Qq-Ka for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:06:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TGC8Z-0004o1-0O for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 13:08:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Sep 2012 17:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12504 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.134850643618416 (code B ref -1); Mon, 24 Sep 2012 17:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2012 17:07:16 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-Received: from dradamslap1 (/10.159.184.43) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Sep 2012 10:05:00 -0700 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64847 Archived-At: 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'