aboutsummaryrefslogtreecommitdiff
path: root/shoshin-config.org
diff options
context:
space:
mode:
Diffstat (limited to 'shoshin-config.org')
-rw-r--r--shoshin-config.org17
1 files changed, 17 insertions, 0 deletions
diff --git a/shoshin-config.org b/shoshin-config.org
index e9accc2..b67f689 100644
--- a/shoshin-config.org
+++ b/shoshin-config.org
@@ -397,6 +397,23 @@ config might get what i want with vanilla built ins.
#+end_src
** org mode
+*** jump to top level parent heading
+
+a friend was wanting this functionality, so i dug around in the org functions
+to find one i could build a command out of:
+
+#+begin_src emacs-lisp
+ (defun my-org-top-level-heading ()
+ (interactive)
+ (let ((moo 1))
+ (while moo (setq moo (org-up-heading-safe)))))
+#+end_src
+
+~org-up-heading-safe~ is designed not to throw an error and returns the level
+of the headline found (as it goes up) or nil if no higher level is found.
+this just uses a dumb while loop to call it until it returns nil, which should
+get us where we are looking to go 😃
+
*** exporting
#+begin_src
(require 'ox-md)