From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Formatting Agenda entries Date: Mon, 30 Jul 2012 14:34:21 -0400 Message-ID: <3694.1343673261@alphaville> References: <87r4rtw1pb.fsf@pank.lan> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svunc-0000t6-K2 for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 14:34:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvunW-0004C8-K0 for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 14:34:36 -0400 Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:48449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvunW-0004A3-G4 for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 14:34:30 -0400 In-Reply-To: Message from Rasmus of "Mon\, 30 Jul 2012 19\:20\:16 BST." <87r4rtw1pb.fsf@pank.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Rasmus wrote: > Hi, >=20 > I use org-google-weather.el to display the weather condition of a couple > of cities in my Agenda. I would like to format the strings so that > certain elements are aligned. >=20 > Sometimes it looks like this:=20 >=20 > W: I Clear, 19-35 =E1=B5=92C (Florence) > W: I Partly Sunny, 19-26 =E1=B5=92C (Berlin) >=20 > (I is the icon). I want it to look like: >=20 > W: I Clear, 19-35 =E1=B5=92C (Florence) > W: I Partly Sunny, 19-26 =E1=B5=92C (Berlin) >=20 > The string I use is: >=20 > (setq org-google-weather-format > "%i %c, %l-%h %s (%L)") >=20 > I tried something like=20 >=20 > (format "%s %-7s %s %s %s" "%i" "%c," "%l-%h" "%s" "(%L)") >=20 > but this obviously doesn't work as the strings are only expanded in the > Agenda buffer. Thus, I need to format my string after placeholders have > been expanded but before it's actually displayed in the Agenda buffer. >=20 > Is that somehow possible? >=20 Have you tried something like (setq org-google-weather-format "%i %-30c, %l-%h %s (%L)") perhaps? Seems to work for me. Nick