From mboxrd@z Thu Jan 1 00:00:00 1970 From: laurent.jucquois@posteo.de Subject: Re: Several %(expression) in org-agenda-prefix-format Date: Fri, 15 Apr 2016 17:56:29 +0200 Message-ID: <0483f3284463a622066cf846310c4fb4@posteo.de> References: <14bdd0027a3034e92aae833e31c0e5d3@posteo.de> <87shynbyw0.fsf@artlab.createcnix.lan> <87r3e7q6dh.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar66n-0002rd-EP for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 11:56:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ar66j-0008Qb-ES for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 11:56:37 -0400 Received: from mout01.posteo.de ([185.67.36.65]:57705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ar66j-0008Q6-7q for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 11:56:33 -0400 Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 95882209EB for ; Fri, 15 Apr 2016 17:56:29 +0200 (CEST) In-Reply-To: <87r3e7q6dh.fsf@alphaville.usersys.redhat.com> 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" To: Nick Dokos Cc: Emacs-orgmode , emacs-orgmode@gnu.org Hi Nick, That is indeed what I needed ! Here is what I've come up with: (format "%-12s %-12s %-8s" (or (org-entry-get (point) "Case" t) "--") (or (org-entry-get (point) "CaseNum" t) "--") (or (org-entry-get (point) "FiscalYear" t) "--")) It does exactly what I wanted, so thanks for the pointer! Laurent Am 15.04.2016 16:44 schrieb Nick Dokos: > laurent.jucquois@posteo.de writes: > >> Hi Christophe, >> >> Thanks for the pointer! >> >> I had already tried this solution but I wasn't entirely satisfied >> because of alignment reasons. >> >> Not all my properties have the same length, so my agenda now looks >> like this: >> >> DUPOND 12/RG/569 (10) : My task >> DURAND 16/1689/A (05; 10-12; 14) : My task >> >> So it's better than not knowing to which case my todos relate but it >> isn't ideal for readability. >> >> Do you know if, like org-agenda-prefix-format, I could align the >> result of concat or define the number of character the first string >> can occupy? >> > > Can't you use something like: > > (format "%-40s" (concat ...)) > > ? > > -- > Nick