From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: [PATCH] org-capture - using `file' as template Date: Wed, 14 Jul 2010 22:01:39 +0200 Message-ID: References: <87bpaavlpo.fsf@alterecco.net> <87sk3l99g6.fsf@alterecco.net> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=49163 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZ89K-0000aZ-I6 for emacs-orgmode@gnu.org; Wed, 14 Jul 2010 16:01:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZ89J-0006QB-22 for emacs-orgmode@gnu.org; Wed, 14 Jul 2010 16:01:46 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:47313) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZ89I-0006Pt-Tj for emacs-orgmode@gnu.org; Wed, 14 Jul 2010 16:01:45 -0400 Received: by ewy28 with SMTP id 28so43787ewy.0 for ; Wed, 14 Jul 2010 13:01:43 -0700 (PDT) In-Reply-To: <87sk3l99g6.fsf@alterecco.net> 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: Johan Friis Cc: emacs-orgmode@gnu.org Hi Johan, thanks for checking after me - sometimes I should just shut up and trust others. Thanks! - Carsten On Jul 14, 2010, at 8:58 PM, Johan Friis wrote: > > Hi Carsten, > > I did not have time to try out capture until now, and there is still a > bug. When providing (file "...") as template `org-capture-set-plist' > still generates a default template. Using the patch from David seems > to > work fine. Here is a diff against current head. > > - Johan > > diff --git a/lisp/org-capture.el b/lisp/org-capture.el > index f79a20b..0f3a29b 100644 > --- a/lisp/org-capture.el > +++ b/lisp/org-capture.el > @@ -981,7 +981,7 @@ Point will remain at the first line after the > inserted text." > (org-capture-put :key (car entry) :description (nth 1 entry) > :target (nth 3 entry)) > (let ((txt (nth 4 entry)) (type (or (nth 2 entry) 'entry))) > - (when (or (not (stringp txt)) (not (string-match "\\S-" txt))) > + (when (or (not txt) (and (stringp txt) (not (string-match "\ > \S-" txt)))) > ;; The template may be empty or omitted for special types. > ;; Here we insert the default templates for such cases. > (cond > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten