emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request: custom clock headings
@ 2007-11-26 12:29 Tom Weissmann
  2007-11-27 15:15 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Weissmann @ 2007-11-26 12:29 UTC (permalink / raw)
  To: emacs-orgmode

Many of my subtasks have the same name, so the current modeline isn't always
very useful - if I'm working on a particular bug it might tell me 
"[1:20 Reproduce the error]", 
whereas I'd prefer it to say 
"[1:20 Bug #12303 Disappearing accounts ... Reproduce the error]"

Could we have the option to create a custom function to create clock headings?

Eg, somewhere in `org-clock-in':

...
(if org-custom-clock-heading
  ;; custom clock heading
  (funcall org-custom-clock-heading)
  ;; business as usual
  (if (looking-at org-todo-line-regexp)
    (setq org-clock-heading (match-string 3))
...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: custom clock headings
  2007-11-26 12:29 Feature request: custom clock headings Tom Weissmann
@ 2007-11-27 15:15 ` Bastien
  2007-11-27 17:39   ` Tom Weissmann
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2007-11-27 15:15 UTC (permalink / raw)
  To: emacs-orgmode

Tom Weissmann <trmsw@yahoo.co.uk> writes:

> Many of my subtasks have the same name, so the current modeline isn't always
> very useful - if I'm working on a particular bug it might tell me 
> "[1:20 Reproduce the error]", 
> whereas I'd prefer it to say 
> "[1:20 Bug #12303 Disappearing accounts ... Reproduce the error]"
>
> Could we have the option to create a custom function to create clock
> headings?

FWIW, I think it's a good idea.

-- 
Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: custom clock headings
  2007-11-27 15:15 ` Bastien
@ 2007-11-27 17:39   ` Tom Weissmann
  2007-11-28 15:18     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Weissmann @ 2007-11-27 17:39 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg <at> altern.org> writes:

> > Could we have the option to create a custom function to create clock
> > headings?
> 
> FWIW, I think it's a good idea.
> 

I've been trying out a version using advice, and it's proving very useful, not
least because you can propertise the mode-line: if I click the top level task it
opens the bug (it tends to be a bug :) in our bug tracking system, and if I
click the sub-task it takes me to it in my org file.

Regards,
TomSW

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: Feature request: custom clock headings
  2007-11-27 17:39   ` Tom Weissmann
@ 2007-11-28 15:18     ` Bastien
  2007-11-28 18:51       ` Tom Weissmann
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2007-11-28 15:18 UTC (permalink / raw)
  To: emacs-orgmode

Hi Tom,

Tom Weissmann <trmsw@yahoo.co.uk> writes:

> Bastien <bzg <at> altern.org> writes:
>
>> > Could we have the option to create a custom function to create clock
>> > headings?
>> 
>> FWIW, I think it's a good idea.
>> 
>
> I've been trying out a version using advice, and it's proving very useful, not
> least because you can propertise the mode-line: if I click the top level task it
> opens the bug (it tends to be a bug :) in our bug tracking system, and if I
> click the sub-task it takes me to it in my org file.

Looks nice.  Can you share your advice on this list?  Thanks!

-- 
Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: custom clock headings
  2007-11-28 15:18     ` Bastien
@ 2007-11-28 18:51       ` Tom Weissmann
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Weissmann @ 2007-11-28 18:51 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg <at> altern.org> writes:

> Looks nice.  Can you share your advice on this list?  Thanks!

Yes, of course:

(defvar org-custom-clock-heading nil
  "Function that returns a custom \(propertised\) value for the
`org-clock-heading' variable.
Called with point at the new clock")


(defadvice org-clock-in (after org-clock-in-custom-modeline activate)
  "Customise the modeline
NB this feature has been requested and may be standard in future versions of
Org-mode"
  (when org-custom-clock-heading
    (let ((custom-heading (funcall org-custom-clock-heading)))
      (when custom-heading
	(setq org-clock-heading custom-heading)
	(org-update-mode-line)))))

 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-11-28 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 12:29 Feature request: custom clock headings Tom Weissmann
2007-11-27 15:15 ` Bastien
2007-11-27 17:39   ` Tom Weissmann
2007-11-28 15:18     ` Bastien
2007-11-28 18:51       ` Tom Weissmann

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).