emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joseph Turner <joseph@breatheoutbreathe.in>
To: emacs-orgmode@gnu.org
Cc: Adam Porter <adam@alphapapa.net>
Subject: org-ctags-find-tag should not prompt inside org-open-at-point
Date: Sun, 24 Sep 2023 21:28:00 -0700	[thread overview]
Message-ID: <87a5tax35x.fsf@breatheoutbreathe.in> (raw)

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	other threads:[~2023-09-25  4:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25  4:28 Joseph Turner [this message]
2023-09-26  9:44 ` org-ctags-find-tag should not prompt inside org-open-at-point Ihor Radchenko
2023-09-27  1:27   ` Joseph Turner
2023-10-05 13:45     ` Ihor Radchenko
2023-09-28 15:59 ` Rudolf Adamkovič
2023-09-28 19:25   ` Joseph Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5tax35x.fsf@breatheoutbreathe.in \
    --to=joseph@breatheoutbreathe.in \
    --cc=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).