bug#25032: 25.1; `bookmark-set-internal', `bookmark-set-no-overwrite'

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#25032: 25.1; `bookmark-set-internal', `bookmark-set-no-overwrite'

Drew Adams
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'



Reply | Threaded
Open this post in threaded view
|

bug#25032: 25.1; `bookmark-set-internal', `bookmark-set-no-overwrite'

Stefan Kangas
Drew Adams <[hidden email]> writes:

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

This has now been fixed.  See bug#36121.

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

This too has been fixed.  See bug#35916.

Best regards,
Stefan Kangas