From 4caf1bae12abfb55dfe2ba43e4640e5044e5ef08 Mon Sep 17 00:00:00 2001 From: fpi Date: Thu, 16 Jul 2020 22:49:33 +0200 Subject: Add support function for org-babel workflow --- emacs-init.org | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ("" . org-clock-convenience-fill-gap) ("" . 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 -- cgit v1.2.3