Subject: RE: [External] : bug#48179: bookmark-fontify [PATCH]

From: Drew Adams <[email-masked]>
Date: Sat, 8 May 2021 00:25:40 +0000

>     >> It seems to me that all the bookmarks, bm, built-in (including
>     >> emacs-28), bookmark+, have disadvantages. Personally, I would use
>     >> bookmark+ if were not for the fact that it writes unprompted to
>     >> ~/.emacs.
> 
>     > I don't know what you mean by that.  Could you elaborate?
> 
>     > 1. It never writes to ~/.emacs, unless you've defined that as the
>     > bookmark file you want to write to.
> 
> Well I can only say what I saw, and bookmark+ did indeed write to
> custom-set-variables. It may be that something in ~/.emacs triggered it,
> but I don't intend to pursue the matter further.

(I mistakenly thought you meant that it writes your
_bookmarks_ to your init file.)

But I think I know what you might be referring to.
And it's a good point.

When your bookmarks are saved, if option
`bmkp-last-as-first-bookmark-file' is non-nil then
its value is updated to the current bookmark file.

Likewise, when you load a bookmark file with
overwriting (i.e. you switch bookmark files), if
that option is non-nil then it's updated to reflect
the new bookmark file.

You can customize that option, but it's also updated
when you save bookmarks or switch bookmark files.

So it's a particular kind of user option.  The doc
string tells you about this unusual behavior (in the
"NOTE" part):

`bmkp-last-as-first-bookmark-file':

  Whether to use the last-used bookmark file as the first used.
  If nil then Emacs always uses the value of `bookmark-default-file'
  as the initial bookmark file, in any given session.

  If non-nil, Emacs uses the last bookmark file you used, in the 
  last Emacs session.  If none was recorded then it uses
  `bookmark-default-file'.  The particular non-nil value must be an
  absolute file name (possibly containing `~') - it is not expanded).

  NOTE: A non-nil option value is overwritten by Bookmark+, so that
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  it becomes the last-used bookmark file.  A nil value is never
  overwritten.

  You can customize this variable.

This is a feature (i.e., by design), not a bug.
But if you customize it to nil then Bookmark+
should never update your init file with its new
value.
___

[It's really unrelated, but I recommend using a
separate `custom-file', and thus not letting
Customize (or code like what I just mentioned)
fiddle with your init file.  Code written by
code is better off relegated to a different file
from one you write code in.]