GNU bug report logs - #12504
24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 24 Sep 2012 17:08:02 UTC

Severity: minor

Found in version 24.2.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 12504 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Karl Fogel <kfogel <at> red-bean.com>
Cc: 12504 <at> debbugs.gnu.org
Subject: Re: bug#12504: 24.2.50; `bookmark-rename' and
 `bookmark-maybe-historicize-string'
Date: Sat, 04 Dec 2021 05:58:35 +0100
Karl Fogel <kfogel <at> red-bean.com> 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




This bug report was last modified 3 years and 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.