[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add user option to disable location in bookmarks

From: Yuri Khan
Subject: Re: [PATCH] Add user option to disable location in bookmarks
Date: Sun, 21 Jun 2020 16:13:06 +0700

On Sun, 21 Jun 2020 at 06:34, Drew Adams <drew.adams@oracle.com> wrote:

> If this is about save-place then save-place should
> do the right thing.  See above.  If there's an option
> to be added in that regard, it's a save-place option:
> `save-place-ignore-bookmark-position'.  The hook
> function (see above) can move to the save-place place
> if the option is non-nil, and just do nothing if it's
> nil.

I think you are too quick in punting the change to ‘save-place’.

I think it’s a matter of user expectations.

You expect that a bookmark targets a particular location in the file.
(There are bookmarks that do not target a file; let’s ignore them for
now.) Activating the bookmark visits that file (if not already
visited), displays that file’s buffer, and jumps to the bookmarked
location (adjusting it by searching for context if necessary).

Jamie expects that a bookmark targets the file in its entirety.
Activating the bookmark then should visit the file (if not already
visited) and display the file’s buffer. If the file had to be
re-visited, save-place kicks in and restores the point and scroll
position to the values saved when the file’s buffer was killed. If
save-place is not active, the point and scroll position should remain
whatever they end up by default (top of buffer?).

I dare say both expectations are valid for files. Therefore, the fix
should allow the user to avoid saving a location in bookmarks
targeting files, perhaps by introducing a setting like
‘bookmark-set-save-location’, boolean, default t. Other bookmark types
would then decide if it makes sense to honor that setting, and how.
E.g. an Info buffer technically contains a whole Info manual but,
through narrowing, makes an appearance of displaying only a single
Info page; it would make sense to bookmark the page but not the exact
line and context.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]