[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-st
From: |
Lars Ingebrigtsen |
Subject: |
bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string' |
Date: |
Sat, 04 Dec 2021 05:58:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Karl Fogel <kfogel@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
- bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string',
Lars Ingebrigtsen <=