[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string'
From: |
Karl Fogel |
Subject: |
bug#12504: `bookmark-rename' and `bookmark-maybe-historicize-string' |
Date: |
Sun, 30 Sep 2012 22:57:37 -0500 |
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