emacs-orgmode
[Top][All Lists]
Advanced

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

org-ctags-find-tag should not prompt inside org-open-at-point


From: Joseph Turner
Subject: org-ctags-find-tag should not prompt inside org-open-at-point
Date: Sun, 24 Sep 2023 21:28:00 -0700

Hello!

When org-ctags-find-tag is a member of org-open-link-functions, fuzzy
links and custom-id links are broken. Instead of following those links,
Emacs prompts for a filename with "Visit tags table (default TAGS)".

To reproduce this issue with emacs -Q:

(require 'org-ctags)

Then open an org-mode buffer with the following:

--8<---------------cut here---------------start------------->8---
[[*header]]

* Header
--8<---------------cut here---------------end--------------->8---

Put point on the link and run org-open-at-point (C-c C-o).

Instead of jumping to the header, Emacs opens a prompt.

One potential solution is to avoid calling xref-find-definitions inside
org-ctags-find-tag, since xref-find-definitions prompts when there’s no
identifier at point.

I'm sure how org-ctags is getting required in my Emacs, but I think
(require 'org-ctags) probably shouldn't call org-ctags-enable.

Until this issue is fixed, a workaround for now is to set
org-ctags-open-link-functions to nil so that org-ctags-find-tag is never
added to org-open-link-functions. Add the following to init.el:

(setopt org-ctags-open-link-functions nil)

This may break some ctags functionality.

Thanks!

Joseph Turner



reply via email to

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