Better notice of function names in Org files

This commit is contained in:
Howard Abrams 2023-07-05 09:25:01 -07:00
parent 043778da0a
commit f0f1834c02
2 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ A literate programming file for configuring org-mode and those files.
#+end_src
* Use Package
Org is a /large/ complex beast with a gazillion settings, so I discuss these later in this document.
#+begin_src emacs-lisp
#+begin_src emacs-lisp :noweb yes
(use-package org
;; TODO: Using the latest org-mode
;; :straight (:type built-in)
@ -361,7 +361,7 @@ And turn on ALL the languages:
A noweb definition, e.g. =<<something-something>>= could /jump/ to the =#name= definition.
Since [[https://github.com/BurntSushi/ripgrep][ripgrep]] is pretty fast, Ill call it instead of attempting to build a [[https://stackoverflow.com/questions/41933837/understanding-the-ctags-file-format][CTAGS]] table. Oooh, the =rg= takes a =—json= option, which makes it easier to parse.
#+begin_src emacs-lisp
#+begin_src emacs-lisp :noweb no
(defun ha-org-noweb-block-jump (str pos)
"Go to a literate org file containing a symbol, STR.
The POS is ignored."

View file

@ -84,7 +84,7 @@ While I love packages that add functionality and I dont have to learn anythin
(when (string-match (rx "=" (group (one-or-more any)) "=") str)
(setq str (match-string 1 str)))
;; In an org-file, a function may pick up the initial #'
(when (string-match (rx (optional "#") "'" (group (one-or-more any))) str)
(when (string-match (rx (optional "#") (optional "'" ) (group (one-or-more any))) str)
(setq str (match-string 1 str)))
(ignore-errors
(let* ((default-directory (projectile-project-root))