diff options
author | fpi | 2020-07-16 22:49:33 +0200 |
---|---|---|
committer | fpi | 2020-07-16 22:49:33 +0200 |
commit | 4caf1bae12abfb55dfe2ba43e4640e5044e5ef08 (patch) | |
tree | dbc0712cf41d2c8f21a072ddbf48defee66c469e | |
parent | Fix biblio mode map key binding (diff) |
Add support function for org-babel workflow
-rw-r--r-- | emacs-init.org | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs-init.org b/emacs-init.org index fc57fa7..5831b64 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -2980,6 +2980,14 @@ Gives an overview of time spent on defined budgets this week. Great to track if ("<C-right>" . org-clock-convenience-fill-gap) ("<C-left>" . org-clock-convenience-fill-gap-both))) #+end_src +*** Babel +This function is handy to use in header arguments to create names based on the current org heading. E.g. =:var data=(fpi/format-headline "/tmp/prefix_")= +#+begin_src emacs-lisp +(defun fpi/format-headline (&optional pre post) + (let ((pre (or pre "")) + (post (or post ""))) + (format "%s%s%s" pre (nth 4 (org-heading-components)) post))) +#+end_src *** ox-reveal #+BEGIN_SRC emacs-lisp (use-package ox-reveal |