emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [PATCH] org-capture, removing whitespace from new captures


From: David Maus
Subject: Re: [O] [PATCH] org-capture, removing whitespace from new captures
Date: Sat, 18 Feb 2012 16:50:11 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.0.93 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Bastien,
Hi Paul,

At Sat, 29 Oct 2011 14:08:52 +0200,
Bastien wrote:
>
> Hi Paul,
>
> Paul <address@hidden> writes:
>
> > In fact adding whitespace-cleanup to org-capture-before-finalize-hook
> > was what I tried first, but it didn't do what I wanted.  This hook is
> > called _after_ the buffer is widened - making whitespace-cleanup
> > operate on the _entire_ buffer, not just the newly added capture.
> >
> > I believe the patch is still required - I should have explained
> > org-capture-before-finalize-hook's behaviour more explicitly in my
> > original submission.
>
> I'm willing to apply this patch -- could you provide it with a
> well-formatted ChangeLog entry?

Instead of adding the :whitespace-cleanup property to the template
definition (what requires you to specify e.g. whitespace-cleanup in
every single template) why not define a new hook that is run before
the finalization starts? I.e. with capture buffer current and still
narrowed.

See attached patch that such a hook called
`org-capture-prepare-finalize-hook'.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: 0001-New-hook-Run-before-the-finalization-process-starts.patch
Description: Text document

Attachment: pgpze1FCqCMw7.pgp
Description: PGP signature


reply via email to

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