From db43a31640a5dbd1105f3bd42f94c52a4254f692 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Fri, 23 Jun 2023 11:38:37 +0200 Subject: [PATCH] Add `grok-org-element-lineage' and documentation strings --- README.org | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 9d9ada9..7d7739a 100644 --- a/README.org +++ b/README.org @@ -3921,16 +3921,19 @@ non-interactive =org-element= functions to an =Emacs-lisp= buffer. "Grok Org output buffer name.") (defun grok-org-element-at-point () + "Call `org-element-at-point' interactively and pretty-print." (interactive) (pp-display-expression (org-element-at-point) grok-org-output)) (defun grok-org-element-context () + "Call `org-element-context' interactively and pretty-print." (interactive) (pp-display-expression (org-element-context) grok-org-output)) (defun grok-org-element-parse-buffer () + "Call `org-element-parse-buffer' interactively and pretty-print." (interactive) (let ((what (completing-read "granularity: " @@ -3940,9 +3943,17 @@ non-interactive =org-element= functions to an =Emacs-lisp= buffer. (org-element-parse-buffer what) grok-org-output))) (defun grok-org-heading-components () + "Call `org-heading-components' interactively and pretty-print." (interactive) (pp-display-expression - (org-heading-components) grok-org-output)))) + (org-heading-components) grok-org-output)) + + (defun grok-org-element-lineage () + "Call `org-element-lineage' interactively and pretty-print." + (interactive) + (org-load-modules-maybe) + (pp-display-expression + (org-element-lineage (org-element-context) nil t) grok-org-output)))) #+end_src ** Grammar, spelling, and style tools