2025-06-24-09-20

33 阅读1分钟
#+name: drawer-searcher
#+begin_src emacs-lisp :eval no
  (lambda (option)
    (when (string-match-p "^:[^: \t]*:$" option)
      (goto-char (point-min))
      (catch 'found
        (while (re-search-forward option nil t)
          (when (org-element-type-p
                 (org-element-context) 'drawer)
            (throw 'found 'drawer))))))
#+end_src