bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#49645: [External] : bug#49645: 28.0.50; Bookmark line highlighting r


From: Drew Adams
Subject: bug#49645: [External] : bug#49645: 28.0.50; Bookmark line highlighting remain stuck
Date: Sun, 25 Jul 2021 22:29:33 +0000

You are all welcome to take a look at the Bookmark+ code
for highlighting bookmark locations.  It doesn't have a
problem wrt movement or deletion of bookmarks.

E.g., if you set a bookmark at one location in a buffer,
and you later set it at a different location in that
buffer, its highlight is automatically moved to the new
location.  And if you delete a bookmark, its highlight
disappears.

The code is in file bookmark+-lit.el, here:

https://www.emacswiki.org/emacs/download/bookmark%2b-lit.el

A description is here:

https://www.emacswiki.org/emacs/BookmarkPlus#HighlightingBookmarkLocations


There, you'll also see this text, which is about a highlight
moving along with the bookmarked text:

 "Note: A region, position, or line highlight acts more or
  less like an Emacs marker: it moves with the surrounding
  text.  As you edit the text in the buffer, the highlighted
  location can thus become out of sync with the recorded
  position.  This is normal.  When you jump to the bookmark,
  its highlight is automatically repositioned to the
  recorded location, possibly adjusted according to the
  surrounding context."

That wasn't the situation raised by this bug, but it's
related.  A bookmark's location needs to keep its highlight,
even as editing text around it moves it around.  That's in
addition to the fact that if you change the bookmark location
then its highlight needs to reflect that.
___

And as for all the pushback wrt the introduction of bookmark
highlighting: Bookmark+ highlighting is OFF by default, and
it's configurable per bookmark.  It's not an all-or-nothing
thing.  The same should be true for vanilla Emacs bookmark
highlighting, IMO.

reply via email to

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