From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: %i indentation in capture templates Date: Wed, 11 Aug 2010 11:11:31 +0200 Message-ID: References: <8762zo87zk.fsf@mundaneum.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=43864 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oj7LU-0005S5-5W for emacs-orgmode@gnu.org; Wed, 11 Aug 2010 05:11:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oj7LS-0004We-Vx for emacs-orgmode@gnu.org; Wed, 11 Aug 2010 05:11:36 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:35057) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oj7LS-0004WQ-R9 for emacs-orgmode@gnu.org; Wed, 11 Aug 2010 05:11:34 -0400 Received: by eydd26 with SMTP id d26so4667155eyd.0 for ; Wed, 11 Aug 2010 02:11:34 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thomas Jack Cc: emacs-orgmode@gnu.org On Aug 6, 2010, at 12:11 PM, Thomas Jack wrote: > 2010/8/6 S=E9bastien Vauban : >> But just wanted to confirm you this seems, then, a bug to me =20 >> (regarding what >> the doc promises). > > Thanks for the confirmation. > > The following patch seems to fix the problem: > > diff --git a/lisp/org-capture.el b/lisp/org-capture.el > index 111f7f7..1e407f1 100644 > --- a/lisp/org-capture.el > +++ b/lisp/org-capture.el > @@ -1045,6 +1045,7 @@ Lisp programs can force the template by setting > KEYS to a string." > "Fill a template and return the filled template as a string. > The template may still contain \"%?\" for cursor positioning." > (setq template (or template (org-capture-get :template))) > + (setq initial (or initial (org-capture-get :initial))) > (when (stringp initial) > (setq initial (org-no-properties initial)) > (remove-text-properties 0 (length initial) '(read-only t) =20 > initial)) Applied, at a slightly different place in that function. Thanks! - Carsten