emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] A tidy file maketh a tidy mind?


From: Bastien
Subject: Re: [O] A tidy file maketh a tidy mind?
Date: Tue, 14 Aug 2012 23:50:51 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Eric Schulte <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]