From b6cbfea53dbf9c53dd96e09c812488a02e55712d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 2 Jul 2025 11:18:26 +0200 Subject: [PATCH] refactor(org): remove +org--follow-search-string-a This was upstreamed. Ref: https://cgit.git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=95554543b --- modules/lang/org/config.el | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 08703ce75..214dbd600 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -631,29 +631,6 @@ relative to `org-directory', unless it is an absolute path." (find-file (doom-path doom-docs-dir "changelog.org")) (org-match-sparse-tree nil link)))) - ;; TODO PR this upstream - (defadvice! +org--follow-search-string-a (fn link &optional arg) - "Support ::SEARCH syntax for id: links." - :around #'org-id-open - :around #'org-roam-id-open - (save-match-data - (cl-destructuring-bind (id &optional search) - (split-string link "::") - (prog1 (funcall fn id arg) - (cond ((null search)) - ((string-match-p "\\`[0-9]+\\'" search) - ;; Move N lines after the ID (in case it's a heading), instead - ;; of the start of the buffer. - (forward-line (string-to-number option))) - ((string-match "^/\\([^/]+\\)/$" search) - (let ((match (match-string 1 search))) - (save-excursion (org-link-search search)) - ;; `org-link-search' only reveals matches. Moving the point - ;; to the first match after point is a sensible change. - (when (re-search-forward match) - (goto-char (match-beginning 0))))) - ((org-link-search search))))))) - ;; Add "lookup" links for packages and keystrings; useful for Emacs ;; documentation -- especially Doom's!