all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Kiwon Um <um.kiwon@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-clock mode-line format configuration
Date: Wed, 27 Jan 2010 14:39:21 +0100	[thread overview]
Message-ID: <C71F07BF-556F-4462-9E09-0EB9778FCDBA@gmail.com> (raw)
In-Reply-To: <m3iqanekpz.fsf@gmail.com>


On Jan 27, 2010, at 2:33 PM, Kiwon Um wrote:

> Carsten Dominik <carsten.dominik@gmail.com> 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  
string
in the mode line.

Clearer now?

I had a typo in the function:

(setq org-clock-heading-function
      (lambda ()
	(replace-regexp-in-string
	 "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1"
	 (nth 4 (org-heading-components)))))

  reply	other threads:[~2010-01-27 13:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 10:00 org-clock mode-line format configuration Kiwon Um
2010-01-26 13:07 ` Manish
2010-01-26 22:02 ` Carsten Dominik
2010-01-27  9:25   ` Kiwon Um
2010-01-27 12:59     ` Carsten Dominik
2010-01-27 13:12       ` Kiwon Um
2010-01-27 13:22         ` Carsten Dominik
2010-01-27 13:33           ` Kiwon Um
2010-01-27 13:39             ` Carsten Dominik [this message]
2010-01-27 14:23               ` Kiwon Um

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C71F07BF-556F-4462-9E09-0EB9778FCDBA@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=um.kiwon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.