From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] org-capture, removing whitespace from new captures Date: Sat, 29 Oct 2011 14:08:52 +0200 Message-ID: <87bot080ff.fsf@gnu.org> References: <20110913211926.GB15861@shift> <87ipovcy3s.fsf@rat.lan> <20110914111415.GE15861@shift> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK7hg-000195-Mr for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 08:08:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RK7hf-0004a1-2q for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 08:08:00 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:38338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK7he-0004Zs-QF for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 08:07:58 -0400 Received: by wwe32 with SMTP id 32so3335474wwe.0 for ; Sat, 29 Oct 2011 05:07:57 -0700 (PDT) In-Reply-To: <20110914111415.GE15861@shift> (Paul's message of "Wed, 14 Sep 2011 21:14:15 +1000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Paul Cc: emacs-orgmode@gnu.org Hi Paul, Paul 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? Thanks! > Further to this, can anybody suggest a better documentation string for > org-capture-before-finalize-hook? (Preferably in tandem with my > proposed patch.) Currently it is: > > Hook that is run right before a capture process is finalized. > The capture buffer is still current when this hook runs. > > I feel the "finalized" part is somewhat ambiguous. What it means is > "after the capture buffer is widened, and before it is saved". I > expected it to mean "BEFORE the capture buffer is widened". > > Maybe: > Hook that is run after the capture buffer is widened and prior to > being finalized. The capture buffer is still current when this > hook runs. Thanks for the suggestion -- I've updated the docstring like this: "Hook that is run right before a capture process is finalized. The capture buffer is still current when this hook runs and it is widened to the entire buffer." The convention is that the first sentence should be readable on one single line. Best, -- Bastien