From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Formatting Agenda entries Date: Mon, 30 Jul 2012 19:20:16 +0100 Message-ID: <87r4rtw1pb.fsf@pank.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svua1-0006Ca-1h for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 14:20:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvuZx-0006bM-1T for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 14:20:32 -0400 Received: from plane.gmane.org ([80.91.229.3]:33508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvuZw-0006bB-RV for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 14:20:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SvuZv-0007hW-UJ for emacs-orgmode@gnu.org; Mon, 30 Jul 2012 20:20:27 +0200 Received: from 194.66.250.127 ([194.66.250.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jul 2012 20:20:27 +0200 Received: from rasmus by 194.66.250.127 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jul 2012 20:20:27 +0200 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: emacs-orgmode@gnu.org Hi, 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. Sometimes it looks like this: W: I Clear, 19-35 ᵒC (Florence) W: I Partly Sunny, 19-26 ᵒC (Berlin) (I is the icon). I want it to look like: W: I Clear, 19-35 ᵒC (Florence) W: I Partly Sunny, 19-26 ᵒC (Berlin) The string I use is: (setq org-google-weather-format "%i %c, %l-%h %s (%L)") I tried something like (format "%s %-7s %s %s %s" "%i" "%c," "%l-%h" "%s" "(%L)") 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. Is that somehow possible? Thanks, Rasmus -- In theory, practice and theory are the same. In practice they are not