From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Schockaert Subject: Re: Several %(expression) in org-agenda-prefix-format Date: Fri, 15 Apr 2016 00:37:19 +0200 Message-ID: <87shynbyw0.fsf@artlab.createcnix.lan> References: <14bdd0027a3034e92aae833e31c0e5d3@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqpth-0002qS-RL for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 18:38:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqptc-000387-PL for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 18:38:01 -0400 Received: from smtp1.tech.numericable.fr ([82.216.111.37]:55461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqptc-00037y-IN for emacs-orgmode@gnu.org; Thu, 14 Apr 2016 18:37:56 -0400 In-reply-to: <14bdd0027a3034e92aae833e31c0e5d3@posteo.de> 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: laurent.jucquois@posteo.de Cc: org-mode-email laurent.jucquois@posteo.de writes: > Hi list, > > I'm trying to setup some custom agenda views that would be useful for m= y=20 > work but i'm unable to define a custom org-agenda-prefix-format with=20 > several %expression successfully. > [...] > I've come up with the following (mal-functionning)=20 > org-agenda-prefix-format: > > %(org-get-entry (point) "Case" t) %(org-entry-get (point) "CaseNum" t)=20 > %(org-entry-get (point) "FiscalYear" t) Hi Laurent, I encountered the same limitation when I tried something alike. I finally solved it using 'concat' in one unique %expression=C2=A0: (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) \"\") \" \"))") 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. > I would really appreciate that someone points me into the right=20 > direction. > > Thanks, > > Laurent Well, I hope you'll be able to get something from this direction :-) Christophe --=20 ---------------> mailto:R3vLibre@citadels.eu Once it's perfectly aimed, the flying arrow goes straight to its target. Thus, don't worry when things go right. There will be enough time to worry about if they go wrong. Then, it's time to fire a new arrow towards another direction. Don't sink. Adapt yourself ! The archer has to shoot accurately and qui= ckly. [Words of Erenthar, the bowman ranger] <---------------<<<<