Eric Schulte <eric.schu...@gmx.com> writes: > The code could look something like the following > > ;; -*- emacs-lisp -*- > (let ((buf (org-element-parse-buffer))) ;; convert current buffer to ELisp > (dolist (rule cleanup-rules) ;; run cleanup transformations on the > buffer > (setq buf (funcall rule buf))) > (delete-region (point-min) (point-max)) ;; replace the buffer contents > (insert (org-element-interpret-data buf))) ;; with the cleaned results > > The only catch would be deciding what to add to the cleanup-rules.
One useful clean up operation, also illustrated in 'Mash's example, is to put time-stamps (i.e. SCHEDULED: lines etc.) where they belong, right after the headline. Is there any taker for such a function? It would be a nice addition to org-hacks.org! -- Bastien