emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Eric Schulte <eric.schulte@gmx.com>
Cc: 'Mash <mashdot@toshine.net>, emacs-orgmode@gnu.org
Subject: Re: A tidy file maketh a tidy mind?
Date: Tue, 14 Aug 2012 23:50:51 +0200	[thread overview]
Message-ID: <87ehn9ywg4.fsf@altern.org> (raw)
In-Reply-To: <874no57gtn.fsf@gmx.com> (Eric Schulte's message of "Tue, 14 Aug 2012 07:10:17 -0600")

Eric Schulte <eric.schulte@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

  parent reply	other threads:[~2012-08-14 21:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 23:21 Introducing Octopress Exporter Tom Alexander
2012-08-02  9:45 ` Aurélien Aptel
2012-08-02 13:44   ` Tom Alexander
2012-08-02 14:37   ` Jambunathan K
2012-08-06 22:28   ` Neil Smithline
2012-08-07  2:48     ` Neil Smithline
2012-08-07  9:52       ` The Quantified Shower (was: Introducing Octopress Exporter) Bastien
2012-08-07 12:32         ` The Quantified Shower Christopher J. White
2012-08-09 10:17           ` Aurélien Aptel
2012-08-07 13:07         ` The Quantified Shower (was: Introducing Octopress Exporter) Nick Dokos
2012-08-07 13:13           ` Nick Dokos
2012-08-07 17:27             ` The Quantified Shower Bastien
2012-08-07 20:39               ` brian powell
2012-08-08 12:46             ` Karl Voit
2012-08-08 17:30           ` Jambunathan K
2012-08-10  7:50             ` Bastien
2012-08-13 10:56               ` A tidy file maketh a tidy mind? 'Mash
2012-08-14  7:46                 ` Bastien
2012-08-14 13:10                 ` Eric Schulte
2012-08-14 13:55                   ` 'Mash (Thomas Herbert)
2012-08-14 21:50                   ` Bastien [this message]
2012-08-07 13:08         ` The Quantified Shower (was: Introducing Octopress Exporter) Myles English
2012-08-03  7:15 ` Introducing Octopress Exporter Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehn9ywg4.fsf@altern.org \
    --to=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    --cc=mashdot@toshine.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).