From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kiwon Um Subject: Re: org-clock mode-line format configuration Date: Wed, 27 Jan 2010 23:23:18 +0900 Message-ID: References: <9599D4D8-9556-4676-9754-82EA3FEF9E01@gmail.com> <48AC00D2-F7E0-47AE-8384-B4A59C63C9CE@gmail.com> <8D7DA60E-87DD-4816-8C21-542A534EF8EE@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na8no-0003RL-Ts for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 09:23:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na8ni-0003HX-6I for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 09:23:27 -0500 Received: from [199.232.76.173] (port=51775 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na8nh-0003Gt-N7 for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 09:23:21 -0500 Received: from mail-iw0-f188.google.com ([209.85.223.188]:54072) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Na8nh-0000s3-1B for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 09:23:21 -0500 Received: by iwn26 with SMTP id 26so6272606iwn.14 for ; Wed, 27 Jan 2010 06:23:20 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org 2010/1/27 Carsten Dominik : > > On Jan 27, 2010, at 2:33 PM, Kiwon Um wrote: > >> Carsten Dominik writes: >> >>> Hi Um, >>> >>> not, the result value has to be a string. >>> >> >> Hi Carsten, hmmm... If you are right, it's an easy problem as long as >> I'm able to know the variable name containing the string for the mode >> line at the moment, isn't it? > > No, you are misunderstanding. > > the variable org-clock-heading-function hast to be set to a function. > A form starting with `lambda' is a function. > > The function needs to return a string, and that string will automatically > end up > in the variable `org-clock-heading', which is then used to create the str= ing > in the mode line. > > Clearer now? > > I had a typo in the function: > > (setq org-clock-heading-function > =A0 =A0 (lambda () > =A0 =A0 =A0 =A0(replace-regexp-in-string > =A0 =A0 =A0 =A0 "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" > =A0 =A0 =A0 =A0 (nth 4 (org-heading-components))))) > Cool! Now it's clear. Really thanks for your kind replies. :)