GNU bug report logs - #51876
28.0.60; Confusing prompt for setting a bookmark

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Mon, 15 Nov 2021 18:35:01 UTC

Severity: minor

Found in version 28.0.60

Fixed in version 29.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51876 in the body.
You can then email your comments to 51876 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Mon, 15 Nov 2021 18:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Nov 2021 18:35:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.60; Confusing prompt for setting a bookmark
Date: Mon, 15 Nov 2021 20:34:35 +0200
To reproduce:

  emacs -Q
  C-x C-f some-file-name RET
  C-x r m

Emacs prompts thusly:

  Set bookmark unconditionally (default some-file-name):

This prompt is confusing: it doesn't make it clear that Emacs is
prompting for the _name_ of the bookmark.  The word "name" (or
anything to that effect) doesn't appear anywhere within the prompt,
and the suggested default, which is just the file name, makes the
intent even harder to guess, because it sounds like Emacs asks whether
to set a bookmark in this file.

Please make the prompt more user-friendly.

I also think the "unconditionally" part should be removed: it makes me
wonder why Emacs made a point of mentioning that at all.  It also
makes the prompt longer, thus harder to understand.

In GNU Emacs 28.0.60 (build 140, i686-pc-mingw32)
 of 2021-11-15 built on HOME-C4E4A596F7
Repository revision: b418aad85a3d62aa427e7af72c96ca1d644dbc02
Repository branch: emacs-28
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600)

Configured using:
 'configure -C --prefix=/d/usr --with-wide-int --with-modules
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3''

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM
ZLIB

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
make-network-process emacs)

Memory information:
((conses 16 56698 6812)
 (symbols 48 7801 1)
 (strings 16 21653 2791)
 (string-bytes 1 632658)
 (vectors 16 13628)
 (vector-slots 8 180022 11936)
 (floats 8 23 93)
 (intervals 40 266 116)
 (buffers 888 10))






Set bookmark unconditionally (default bookmark-test.txt):




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Tue, 16 Nov 2021 08:13:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 51876 <at> debbugs.gnu.org
Subject: Re: bug#51876: 28.0.60; Confusing prompt for setting a bookmark
Date: Tue, 16 Nov 2021 09:12:23 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> This prompt is confusing: it doesn't make it clear that Emacs is
> prompting for the _name_ of the bookmark.  The word "name" (or
> anything to that effect) doesn't appear anywhere within the prompt,
> and the suggested default, which is just the file name, makes the
> intent even harder to guess, because it sounds like Emacs asks whether
> to set a bookmark in this file.

Yes.

> I also think the "unconditionally" part should be removed: it makes me
> wonder why Emacs made a point of mentioning that at all.  It also
> makes the prompt longer, thus harder to understand.

It's because of this:

---
With a prefix arg (non-nil NO-OVERWRITE), do not overwrite any
existing bookmark that has the same name as NAME, but instead push the
new bookmark onto the bookmark alist.
---

Perhaps 

         (if no-overwrite "Set bookmark" "Set bookmark unconditionally")))

should be

         (if no-overwrite "Append bookmark" "Set bookmark")))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Tue, 16 Nov 2021 13:14:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 51876 <at> debbugs.gnu.org
Subject: Re: bug#51876: 28.0.60; Confusing prompt for setting a bookmark
Date: Tue, 16 Nov 2021 15:12:56 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 51876 <at> debbugs.gnu.org
> Date: Tue, 16 Nov 2021 09:12:23 +0100
> 
> Perhaps 
> 
>          (if no-overwrite "Set bookmark" "Set bookmark unconditionally")))
> 
> should be
> 
>          (if no-overwrite "Append bookmark" "Set bookmark")))

I would suggest

  (if no-overwrite "Add bookmark named" "Set bookmark named")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 06:24:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 51876 <at> debbugs.gnu.org
Subject: Re: bug#51876: 28.0.60; Confusing prompt for setting a bookmark
Date: Tue, 16 Nov 2021 22:22:59 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Cc: 51876 <at> debbugs.gnu.org
>> Date: Tue, 16 Nov 2021 09:12:23 +0100
>>
>> Perhaps
>>
>>          (if no-overwrite "Set bookmark" "Set bookmark unconditionally")))
>>
>> should be
>>
>>          (if no-overwrite "Append bookmark" "Set bookmark")))
>
> I would suggest
>
>   (if no-overwrite "Add bookmark named" "Set bookmark named")

How about

    (if no-overwrite "Append bookmark named" "Set bookmark named")

?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 07:18:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 51876 <at> debbugs.gnu.org
Subject: Re: bug#51876: 28.0.60; Confusing prompt for setting a bookmark
Date: Wed, 17 Nov 2021 08:17:23 +0100
Stefan Kangas <stefan <at> marxist.se> writes:

> How about
>
>     (if no-overwrite "Append bookmark named" "Set bookmark named")

And we have a winner.  Pushed to Emacs 29 now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 51876 <at> debbugs.gnu.org and Eli Zaretskii <eliz <at> gnu.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 17 Nov 2021 07:18:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 13:51:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: larsi <at> gnus.org, 51876 <at> debbugs.gnu.org
Subject: Re: bug#51876: 28.0.60; Confusing prompt for setting a bookmark
Date: Wed, 17 Nov 2021 15:50:18 +0200
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Tue, 16 Nov 2021 22:22:59 -0800
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 51876 <at> debbugs.gnu.org
> 
> > I would suggest
> >
> >   (if no-overwrite "Add bookmark named" "Set bookmark named")
> 
> How about
> 
>     (if no-overwrite "Append bookmark named" "Set bookmark named")
> 
> ?

Not that it matters now, but I'm curious: why "append" and not "add"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 16:43:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Kangas <stefan <at> marxist.se>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 "51876 <at> debbugs.gnu.org" <51876 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#51876: 28.0.60; Confusing prompt for setting a
 bookmark
Date: Wed, 17 Nov 2021 16:42:38 +0000
> > I would suggest
> > (if no-overwrite "Add bookmark named" "Set bookmark named")
> 
> How about
> (if no-overwrite "Append bookmark named" "Set bookmark named")

This would be quite wrong.  The new bookmark is
prepended to the bookmark alist, not appended.

The point is that you can have multiple bookmarks
with the same name.  And as is usual with alists,
a bookmark closer to the front of the alist
shadows those farther from the front that have
the same name.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 16:45:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Stefan Kangas <stefan <at> marxist.se>
Cc: "51876 <at> debbugs.gnu.org" <51876 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#51876: 28.0.60; Confusing prompt for setting a
 bookmark
Date: Wed, 17 Nov 2021 16:43:48 +0000
> > How about
> > (if no-overwrite "Append bookmark named" "Set bookmark named")
> 
> And we have a winner.  Pushed to Emacs 29 now.

And we have a loser: Emacs 29.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 16:50:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Kangas <stefan <at> marxist.se>
Cc: "larsi <at> gnus.org" <larsi <at> gnus.org>,
 "51876 <at> debbugs.gnu.org" <51876 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#51876: 28.0.60; Confusing prompt for setting a
 bookmark
Date: Wed, 17 Nov 2021 16:49:33 +0000
> > > I would suggest
> > > (if no-overwrite "Add bookmark named" "Set bookmark named")
> > How about
> > (if no-overwrite "Append bookmark named" "Set bookmark named")
> 
> Not that it matters now, but I'm curious:
> why "append" and not "add"?

It does matter, because "append" is just wrong.

But perhaps, by "now", you meant that it's too
late to fix this?  I hope not.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 17:09:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: larsi <at> gnus.org, stefan <at> marxist.se, 51876 <at> debbugs.gnu.org
Subject: Re: [External] : bug#51876: 28.0.60; Confusing prompt for setting a
 bookmark
Date: Wed, 17 Nov 2021 19:08:30 +0200
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: Lars Ingebrigtsen <larsi <at> gnus.org>,
>         "51876 <at> debbugs.gnu.org"
> 	<51876 <at> debbugs.gnu.org>
> Date: Wed, 17 Nov 2021 16:42:38 +0000
> 
> The point is that you can have multiple bookmarks
> with the same name.

Yes, but can you say that in few enough characters to fit a prompt, so
that it is self-explanatory and yet short?  That's the challenge;
everything else is a tangent, since it isn't like people here don't
understand what that does.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Wed, 17 Nov 2021 17:47:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "larsi <at> gnus.org" <larsi <at> gnus.org>, "stefan <at> marxist.se" <stefan <at> marxist.se>,
 "51876 <at> debbugs.gnu.org" <51876 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#51876: 28.0.60; Confusing prompt for setting a
 bookmark
Date: Wed, 17 Nov 2021 17:46:10 +0000
> > The point is that you can have multiple bookmarks
> > with the same name.
> 
> Yes, but can you say that in few enough characters to fit a prompt, so
> that it is self-explanatory and yet short?  That's the challenge;
> everything else is a tangent, since it isn't like people here don't
> understand what that does.

I think you already said it in few chars: "Add",
not "Append".  "Add" is fine; "Append" is wrong.

Someone who suggests putting "append" in the
prompt seems to me not to understand well what
the command does.

Or else I just misunderstand their understanding.
In any case, to my mind "append" is wrong.  It
will only mislead or confuse users.

For vanilla Emacs, only one bookmark with a given
name can be used at any time.  Because of that, I
think "set" is a fine term to use.

The suggestion of "add" instead is OK too, but it
can wrongly suggest that other bookmarks with the
same name can be used at the same time.

And you'll note that "add" agrees with what's said
in the doc string of `bookmark-set-no-overwrite',
except there the word used is "push".

"Push" is thus another reasonable alternative
(like "add") to the incorrect "append".  Even
"prepend" more or less correct, but it's not as
good as "push", "add" (better than "push", or
"set" (best of all, IMO).
___

And speaking of (real) tangents -

This bug thread perhaps shouldn't have gone into
the weeds to deal with something different from
what you reported, which was, I think, a concern
that it isn't clear enough that what's prompted
for is a _bookmark_ name (not, e.g., a file name).
___

FWIW -

1. Bookmark+ uses the name
`bmkp-bookmark-set-confirm-overwrite' for a command
that requires confirmation before overwriting an
existing bookmark (unless you provide a prefix arg).

I prefer that name and behavior to what vanilla
Emacs added as command `bookmark-set-no-overwrite'.

2. With Bookmark+, it _is_ possible to use multiple
bookmarks that have the same name at the same time.
It's possible because the full bookmark is kept on
the bookmark name as a property.

This optional behavior is useful, for example to
(automatically) get bookmark names that are non-dir
file names, to files with the same name in different
directories.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Thu, 18 Nov 2021 09:22:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 51876 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#51876: 28.0.60; Confusing prompt for setting a bookmark
Date: Thu, 18 Nov 2021 10:21:26 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Not that it matters now, but I'm curious: why "append" and not "add"?

With "append" it's clear that we're talking about a list of names, while
"add" is ambiguous. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51876; Package emacs. (Thu, 18 Nov 2021 17:10:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: "51876 <at> debbugs.gnu.org" <51876 <at> debbugs.gnu.org>,
 Stefan Kangas <stefan <at> marxist.se>
Subject: RE: [External] : bug#51876: 28.0.60; Confusing prompt for setting a
 bookmark
Date: Thu, 18 Nov 2021 17:08:31 +0000
> > Not that it matters now, but I'm curious: why "append" and not "add"?
> 
> With "append" it's clear that we're talking about a list of names, while
> "add" is ambiguous.

We're _not_ appending.  Not at all.

We're actually _setting_ the bookmark with
that name to the specified (typically new)
location.  "Set" is the right word.  It's
precisely the word for what happens.

It's true that wrt the `bookmark-alist'
we're "adding" the bookmark to the front
of the alist ("prepending", if you like).

But we're not adding a bookmark to those
that are in effect at the current time.
Once the new bookmark is "added" this way,
any previously existing bookmarks with the
same name are _no longer usable_ (till the
new one is removed).  They _exist_ on the
alist (users can manipulate them there,
e.g., using Lisp), but they're not usable
as such (you can't jump to them, etc.).

So far, you're just making things worse,
I'm afraid.

`bookmark-set' sets a bookmark.  "Set"
means create or update.

That there are 2 ways to deal with
previously created bookmarks with the same
name is a different question, and is best
dealt with by having two commands, one of
which prompts for confirmation to overwrite
(see my previous msg).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 17 Dec 2021 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 128 days ago.

Previous Next


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