From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roberto Huelga Subject: Re: Patch org-capure-fill-template Date: Thu, 30 Oct 2014 17:21:57 +0100 Message-ID: References: <8761f1eeya.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkEI8-00065m-6M for emacs-orgmode@gnu.org; Fri, 31 Oct 2014 11:40:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjsUN-0002kb-4E for emacs-orgmode@gnu.org; Thu, 30 Oct 2014 12:22:25 -0400 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]:56814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjsUM-0002jZ-Sm for emacs-orgmode@gnu.org; Thu, 30 Oct 2014 12:22:19 -0400 Received: by mail-pa0-f41.google.com with SMTP id rd3so5821870pab.0 for ; Thu, 30 Oct 2014 09:22:17 -0700 (PDT) In-Reply-To: <8761f1eeya.fsf@nicolasgoaziou.fr> 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: Roberto Huelga , emacs-orgmode@gnu.org Suppose you want to write the parent directory name in your capture so write a template like "* %(file-name-nondirectory (directory-file-name (file-name-directory \"%F\")))" Without the patch, file-name-directory get the useless string "%F" instead of a string with the full path name of the file. The orgmode manual template expansion page describe %(sexp) Evaluate Elisp sexp and replace with the result. For convenience, %:keyword (see below) placeholders within the expression will be expanded prior to this. The sexp must return a string. But without the patch is not true, first is expanded %(sexp) and after that the %OneLetter and later the %:keyword Thanks for your work at the awesome orgmode. 2014-10-30 16:48 GMT+01:00 Nicolas Goaziou : > Hello, > > Roberto Huelga writes: > >> Patch proposal fro org-capture-fill-template > > Thanks for your patch. However, I'd like to know your motivation for it > as I fail to see how it is superior to the current design. > > > Regards, > > -- > Nicolas Goaziou