[Top][All Lists]
[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
- Re: [O] The Quantified Shower (was: Introducing Octopress Exporter), (continued)
- Re: [O] The Quantified Shower, Karl Voit, 2012/08/08
- Re: [O] The Quantified Shower, Jambunathan K, 2012/08/08
- Re: [O] The Quantified Shower, Bastien, 2012/08/10
- [O] A tidy file maketh a tidy mind?, 'Mash, 2012/08/13
- Re: [O] A tidy file maketh a tidy mind?, Bastien, 2012/08/14
- Re: [O] A tidy file maketh a tidy mind?, Eric Schulte, 2012/08/14
- Re: [O] A tidy file maketh a tidy mind?, 'Mash (Thomas Herbert), 2012/08/14
- Re: [O] A tidy file maketh a tidy mind?,
Bastien <=
Re: [O] Introducing Octopress Exporter, Bastien, 2012/08/03