Try the following functions.
Below it's your function adapted to split top level headlines into different Org files.
(defun my-org-export-each-level-1-headline-to-org (&optional scope)
(let* ((title (car (last (org-get-outline-path t))))
(dir (file-name-directory buffer-file-name))
I think what you are looking for is related to the library of babel. In this example, I construct something similar to the babel-call org element and use it to get the info needed for org-babel-execute-src-block to execute it with the argument.
| x | 1 | a |
| value | 2 | b |
#+BEGIN_SRC emacs-lisp :var name="" table=...
(setq org-confirm-shell-link-function nil)
Shell links can be dangerous: just think about a link
[[shell:rm -rf ~/*][Google Search]]
This link would show up in your Org document as "Google Search",
but really it would remove your entire home directory.
Therefore we advise against setting this variable to nil.
Just change it to ‘y-or-n-p’ if ...
This works for me:
#+BEGIN: clocktable :scope org-agenda-files :tstart "<2021-07-01 Thu>" :tend "<2021-07-25 Sun>" :maxlevel 8 :hidefiles t :fileskip0 t :link t
Looks like you should write "<2021-07-25"> instead of "<2021-7-25">. (P.S. no :block needed).
Cf. C-h f org-parse-time-string and C-h ...
You will need to enable the #+BIND keyword by adding this to your init file
and restarting emacs
(setq org-export-allow-org-bind-keywords t)
You can also customize this variable (which allows you to skip the restart).
Then you can assign to export-related variables even if there is no option for them (as in this case), by adding the following header to your ...
Try this function:
(defun my/org-export-headline (&optional backend async subtreep visible-only body-only ext-plist)
"Export the current Org headline using BACKEND.
The available backends are the ones of `org-export-backends' and
When optional argument SUBTREEP is non-nil, transcode the
sub-tree at point, extracting information from the ...
This seems to give the expected result for me:
(defun custom-org-fill ()
(cl-loop for el in (reverse
'(paragraph quote-block item) #'identity))
(goto-char (org-element-property :contents-begin el))