unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 12504@debbugs.gnu.org
Subject: bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string'
Date: Mon, 24 Sep 2012 10:04:46 -0700	[thread overview]
Message-ID: <736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com> (raw)

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'
 






             reply	other threads:[~2012-09-24 17:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 17:04 Drew Adams [this message]
2012-10-01  3:57 ` bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string' Karl Fogel
2012-10-01  4:29   ` Drew Adams
2012-10-01 21:27     ` Karl Fogel
2012-10-01 21:34       ` Drew Adams
2012-10-01 22:31         ` Karl Fogel
2021-12-04  4:58   ` bug#12504: 24.2.50; " Lars Ingebrigtsen
2021-12-04 20:08     ` Karl Fogel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=736CB5A93DF64F6BB3FDF32A163C35B3@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=12504@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).