markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

Imenu index should use markers

Open rnkn opened this issue 4 years ago • 0 comments

Expected Behavior

When generating a buffer Imenu index, index locations should be recorded as markers, allowing the user to edit the buffer and still navigate between indexes without performing a rescan.

Actual Behavior

When generating a buffer Imenu index, index locations are recorded as buffer positions, which means that if the user inserts or deletes text, any index after that point become inaccurate until performing a rescan.

Steps to Reproduce

  1. $ emacs -Q -l markdown-mode.el
  2. open a Markdown file with several headers
  3. M-x imenu-add-menubar-index
  4. menu > Index > [index item]
  5. enter text somewhere above this point
  6. repeat step 4

Backtrace

n/a

Software Versions

markdown-mode, version 2.4
GNU Emacs 28.0.50 (build 2, x86_64-apple-darwin17.7.0, NS appkit-1561.61 Version 10.13.6 (Build 17G14042)) of 2021-04-06
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G14042

rnkn avatar May 08 '21 06:05 rnkn