unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25032: 25.1; `bookmark-set-internal', `bookmark-set-no-overwrite'
@ 2016-11-26  0:21 Drew Adams
  2019-06-12  9:09 ` Stefan Kangas
  2019-07-02  5:23 ` Stefan Kangas
  0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2016-11-26  0:21 UTC (permalink / raw)
  To: 25032

1. Why is "internal" function `bookmark-set-internal' a _command_
   (interactive)?  What sense does an "internal" command make?  It seems
   that the `interactive' spec here was a copy+paste mistake.  It should
   be removed, I think.

2. The `interactive' spec for `bookmark-set-internal' seems wrong
   anyway.  NAME is the raw prefix arg?  And then NAME is simply taken
   as is (as STR) and compared using `string-equal'?  This cannot be
   correct.

3. Similarly, why does the doc string of `bookmark-set-internal' say
   "_Interactively_..."?  It should just say that it prompts for a
   bookmark name and then...  And "error" is not easily and commonly
   understood as a verb - use "raise an error" instead.

4. `bookmark-set-internal' should preferably not accept both args PROMPT
   and NAME.  If NAME is present (e.g. for non-interactive use of
   `bookmark-set') then PROMPT makes no sense and is not used (and the
   doc string is wrong about PROMPT in that case).
   
5. In `bookmark-set-internal', a nil third arg should have been used to
   mean overwrite, not raise an error, as overwriting is still, and
   always has been, the default behavior of `bookmark-set'.  You should
   have introduced the new value `error', not the new value `overwrite',
   and kept the default (nil) behavior as overwriting.

   You will no doubt argue that this does not matter because
   `bookmark-set-internal' is "internal".  But the main command is
   still, and should still be `bookmark-set'.  `bookmark-set-internal'
   should reflect _its_ behavior for the default case (nil).

6. Error messages, like other messages, should not end with a period.

No doubt it is "too late" for #4 and #5.  Hopefully not for the rest.


In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --without-dbus --without-compress-install CFLAGS=-static'





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-06  8:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-26  0:21 bug#25032: 25.1; `bookmark-set-internal', `bookmark-set-no-overwrite' Drew Adams
2019-06-12  9:09 ` Stefan Kangas
2019-07-02  5:23 ` Stefan Kangas
2019-07-02  5:27   ` Stefan Kangas
2019-07-02 16:48     ` Eli Zaretskii
2019-07-02 17:07       ` Stefan Kangas
2019-07-06  8:55         ` Eli Zaretskii

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).