unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Karl Fogel <kfogel@red-bean.com>
Cc: 12504@debbugs.gnu.org
Subject: bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string'
Date: Sat, 04 Dec 2021 05:58:35 +0100	[thread overview]
Message-ID: <87bl1xotj8.fsf_-_@gnus.org> (raw)
In-Reply-To: <87lifqhmj2.fsf@floss.red-bean.com> (Karl Fogel's message of "Sun, 30 Sep 2012 22:57:37 -0500")

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





  parent reply	other threads:[~2021-12-04  4:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-24 17:04 bug#12504: 24.2.50; `bookmark-rename' and `bookmark-maybe-historicize-string' Drew Adams
2012-10-01  3:57 ` bug#12504: " 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   ` Lars Ingebrigtsen [this message]
2021-12-04 20:08     ` bug#12504: 24.2.50; " 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=87bl1xotj8.fsf_-_@gnus.org \
    --to=larsi@gnus.org \
    --cc=12504@debbugs.gnu.org \
    --cc=kfogel@red-bean.com \
    /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).