From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Patch org-capure-fill-template Date: Sun, 02 Nov 2014 10:44:22 +0100 Message-ID: <87wq7eaqdl.fsf@nicolasgoaziou.fr> References: <8761f1eeya.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkrhI-0005tL-3N for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 04:43:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xkrh7-0005gZ-Us for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 04:43:44 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:58290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xkrh7-0005gP-Oj for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 04:43:33 -0500 In-Reply-To: (Roberto Huelga's message of "Thu, 30 Oct 2014 17:21:57 +0100") 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 Cc: emacs-orgmode@gnu.org Roberto Huelga writes: > 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 Understood. Applied, thank you. Regards,