Skip to content

Fix treemacs-tag-follow-mode in gfm-mode#1174

Open
knu wants to merge 1 commit intoAlexander-Miller:masterfrom
knu:patch-1
Open

Fix treemacs-tag-follow-mode in gfm-mode#1174
knu wants to merge 1 commit intoAlexander-Miller:masterfrom
knu:patch-1

Conversation

@knu
Copy link
Copy Markdown

@knu knu commented Dec 25, 2025

In gfm-mode, which is a derived mode from markdown-mode, treemacs-tag-follow-mode fails with the following error message.

[Treemacs] Encountered error while following tag at point: (wrong-type-argument markerp 150)

The problem is in treemacs--flatten&sort-imenu-index that chooses a compare function not suitable for the mode.

;; is still stored as a text property
(semantic? (and (consp first) (overlayp (cdr first))))
(compare-func (if (memq major-mode '(markdown-mode adoc-mode))
(compare-func (if (derived-mode-p 'markdown-mode 'adoc-mode)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The signature is (derived-mode-p MODES &rest DEPRECATED-ARGS) so the mods should stay in a list.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

In gfm-mode, which is a derived mode from markdown-mode, treemacs-tag-follow-mode fails with the following error message.

```
[Treemacs] Encountered error while following tag at point: (wrong-type-argument markerp 150)
```

The problem is in treemacs--flatten&sort-imenu-index that chooses a compare function not suitable for the mode.
@stale
Copy link
Copy Markdown

stale bot commented Feb 26, 2026

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

@stale stale bot added the stale label Feb 26, 2026
@knu
Copy link
Copy Markdown
Author

knu commented Feb 26, 2026

This is a one-line fix.

@stale stale bot removed the stale label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants