From f0f1834c0244b7e7b88aaf59d6db4b6caaf84166 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Wed, 5 Jul 2023 09:25:01 -0700 Subject: [PATCH] Better notice of function names in Org files --- ha-org.org | 4 ++-- ha-programming-elisp.org | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ha-org.org b/ha-org.org index 54376c8..5ad8187 100644 --- a/ha-org.org +++ b/ha-org.org @@ -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. =<>= could /jump/ to the =#name= definition. Since [[https://github.com/BurntSushi/ripgrep][ripgrep]] is pretty fast, I’ll 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." diff --git a/ha-programming-elisp.org b/ha-programming-elisp.org index 31f6939..20c8a68 100644 --- a/ha-programming-elisp.org +++ b/ha-programming-elisp.org @@ -84,7 +84,7 @@ While I love packages that add functionality and I don’t 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))