Function: org-ctags-find-tag

org-ctags-find-tag is an interactive and byte-compiled function defined in org-ctags.el.gz.

Signature

(org-ctags-find-tag NAME)

Documentation

This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.

Look for a tag called NAME in the current TAGS table. If it is found, visit the file and location where the tag is found.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-ctags.el.gz
;;; Functions for use with 'org-open-link-functions' hook =================


(defun org-ctags-find-tag (name)
  "This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
Look for a tag called `NAME' in the current TAGS table.  If it is found,
visit the file and location where the tag is found."
  (interactive "sTag: ")
  (let ((old-buf (current-buffer))
        (old-pnt (point-marker))
        (old-mark (copy-marker (mark-marker))))
    (condition-case nil
        (progn (xref-find-definitions name)
               t)
      (error
       ;; only restore old location if find-tag raises error
       (set-buffer old-buf)
       (goto-char old-pnt)
       (set-marker (mark-marker) old-mark)
       nil))))