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 10:10:02 +0200 Message-ID: References: <14bdd0027a3034e92aae833e31c0e5d3@posteo.de> <87shynbyw0.fsf@artlab.createcnix.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqypN-0008Ex-KX for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 04:10:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqypI-0003xK-L5 for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 04:10:09 -0400 Received: from mout01.posteo.de ([185.67.36.65]:56124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqypI-0003wi-GE for emacs-orgmode@gnu.org; Fri, 15 Apr 2016 04:10:04 -0400 Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 6F991209E1 for ; Fri, 15 Apr 2016 10:10:02 +0200 (CEST) In-Reply-To: <87shynbyw0.fsf@artlab.createcnix.lan> 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: Christophe Schockaert Cc: Emacs-orgmode , org-mode-email Hi Christophe, Thanks for the pointer! I had already tried this solution but I wasn't entirely satisfied=20 because of alignment reasons. Not all my properties have the same length, so my agenda now looks like=20 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=20 isn't ideal for readability. Do you know if, like org-agenda-prefix-format, I could align the result=20 of concat or define the number of character the first string can occupy? Thanks in advance, Laurent Am 15.04.2016 00:37 schrieb Christophe Schockaert: > laurent.jucquois@posteo.de writes: >=20 >> Hi list, >>=20 >> I'm trying to setup some custom agenda views that would be useful for=20 >> my >> work but i'm unable to define a custom org-agenda-prefix-format with >> several %expression successfully. >>=20 > [...] >> I've come up with the following (mal-functionning) >> org-agenda-prefix-format: >>=20 >> %(org-get-entry (point) "Case" t) %(org-entry-get (point) "CaseNum" t) >> %(org-entry-get (point) "FiscalYear" t) >=20 > Hi Laurent, >=20 > I encountered the same limitation when I tried something alike. >=20 > I finally solved it using 'concat' in one unique %expression=C2=A0: >=20 > (org-agenda-prefix-format > "%((concat (or (org-entry-get (point) \"Case\" t) \"\") \" \" > (or (org-entry-get (point) \"CaseNum\" t) \"\") \" \" > (or (org-entry-get (point) \"FiscalYear\" t) \"\") \"=20 > \"))") >=20 > For better readability in the agenda, or more complex expressions, I > thought I could write an entire function for handling them, but I never > dit. >=20 >> I would really appreciate that someone points me into the right >> direction. >>=20 >> Thanks, >>=20 >> Laurent > Well, I hope you'll be able to get something from this direction :-) >=20 > Christophe