From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-clock mode-line format configuration Date: Wed, 27 Jan 2010 13:59:35 +0100 Message-ID: <48AC00D2-F7E0-47AE-8384-B4A59C63C9CE@gmail.com> References: <9599D4D8-9556-4676-9754-82EA3FEF9E01@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Na7Um-0001JO-5H for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 07:59:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Na7Uh-0001Dw-8T for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 07:59:43 -0500 Received: from [199.232.76.173] (port=43445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Na7Ug-0001Di-T6 for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 07:59:38 -0500 Received: from mail-fx0-f216.google.com ([209.85.220.216]:56869) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Na7Ug-0001tX-Em for emacs-orgmode@gnu.org; Wed, 27 Jan 2010 07:59:38 -0500 Received: by fxm8 with SMTP id 8so4879674fxm.26 for ; Wed, 27 Jan 2010 04:59:37 -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: Kiwon Um Cc: emacs-orgmode@gnu.org On Jan 27, 2010, at 10:25 AM, Kiwon Um wrote: > Carsten Dominik writes: > >> On Jan 26, 2010, at 11:00 AM, Kiwon Um wrote: >> >>> Dear orgmode dev team: >>> >>> When the clock is started on an item, the item is shown on the mode >>> line. But the string on the mode line just shows the raw string of >>> the >>> item, so sometimes it looks ugly when it contains a link. >>> >>> So I suggest to make it customizable, >> >> It is customizable, see the variable org-clock-heading-function >> > > Would you please show me the function defun doing what I want? I have > no idea to how to build org-clock-heading. Untested: (setq org-clock-heading-function (lambda () (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" (nth 4 org-heading-components)))) > >>> or to vanish the link string, e.g. >>> using >>> (replace-regexp-in-string "\\[\\[.*\\]\\[\\(.*\\)\\]\\]" "\\1" str) >> >> Yes, that makes sense, I have added this. I have changed the "*" >> parts >> to non-greedy though, in case there are several links in the line. >> > > Cool. I missed that. > (replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" "\\1" s)) > > Kiwon Um - Carsten