emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* starting a clock when not in org-mode
@ 2011-05-13  9:17 Eric S Fraga
  2011-05-13 11:43 ` Matt Lundin
  2011-05-13 11:46 ` Sebastien Vauban
  0 siblings, 2 replies; 8+ messages in thread
From: Eric S Fraga @ 2011-05-13  9:17 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have been using the clocking features of org mode more and more as
time goes on.  Brilliant feature.  However, I am having problems with
one specific use case:

The org-clock-in method works very well when I am pro-actively deciding
what tasks to work on, e.g. through the agenda view.  However, in some
cases, I am reacting to external events (emails, somebody coming to see
me, phone call, etc).  I have a number of tasks which are more general
and which capture this type of activity (admin, teaching, ...).  If I
happen to be in an org mode buffer, then "C-u M-x org-clock-in RET"
allows me to pick the particular task (as it will typically be in the
history) and clock it in.  Works well.

If I am *not* in an org buffer (yes, this happens sometimes ;-), I
cannot do this as org-clock-in, even with the C-u arg, wants to find a
headline.  Can anybody suggest how I can clock in to a previously
clocked task from any emacs mode?

My current solution is to tag these general catch-all tasks
with :clocked:, use the agenda search (C-c a m clocked), select the
appropriate one and start the clock.  This seems clumsy and doesn't make
use of the history feature of org clocking, which seems a waste!

I have read Bernt's excellent document [1] but it doesn't help me for
this particular use.  I've also searched the mailing list but to no
avail unfortunately.

Thanks,
eric


Footnotes: 
[1]  http://doc.norang.ca/org-mode.html

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.274.gd6aba.dirty)

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

* Re: starting a clock when not in org-mode
  2011-05-13  9:17 starting a clock when not in org-mode Eric S Fraga
@ 2011-05-13 11:43 ` Matt Lundin
  2011-05-13 11:53   ` Carsten Dominik
  2011-05-13 12:32   ` Bernt Hansen
  2011-05-13 11:46 ` Sebastien Vauban
  1 sibling, 2 replies; 8+ messages in thread
From: Matt Lundin @ 2011-05-13 11:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

[...]

> The org-clock-in method works very well when I am pro-actively deciding
> what tasks to work on, e.g. through the agenda view.  However, in some
> cases, I am reacting to external events (emails, somebody coming to see
> me, phone call, etc).  I have a number of tasks which are more general
> and which capture this type of activity (admin, teaching, ...).  If I
> happen to be in an org mode buffer, then "C-u M-x org-clock-in RET"
> allows me to pick the particular task (as it will typically be in the
> history) and clock it in.  Works well.
>
> If I am *not* in an org buffer (yes, this happens sometimes ;-), I
> cannot do this as org-clock-in, even with the C-u arg, wants to find a
> headline.  Can anybody suggest how I can clock in to a previously
> clocked task from any emacs mode?

I cannot reproduce this. Here are the steps I took.

 - clocked into a headline
 - clocked out
 - switched buffer to *scratch* (I tried it a second time with a TeX
   buffer, which also worked)
 - typed C-u M-x org-clock-in
 - selected 1 (the most recent task)

Org successfully clocked into the task in the background.

Best,
Matt

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

* Re: starting a clock when not in org-mode
  2011-05-13  9:17 starting a clock when not in org-mode Eric S Fraga
  2011-05-13 11:43 ` Matt Lundin
@ 2011-05-13 11:46 ` Sebastien Vauban
  2011-05-13 12:14   ` Eric S Fraga
  1 sibling, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2011-05-13 11:46 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

Eric S Fraga wrote:
> Hello,
>
> I have been using the clocking features of org mode more and more as
> time goes on.  Brilliant feature.  However, I am having problems with
> one specific use case:
>
> The org-clock-in method works very well when I am pro-actively deciding
> what tasks to work on, e.g. through the agenda view.  However, in some
> cases, I am reacting to external events (emails, somebody coming to see
> me, phone call, etc).  I have a number of tasks which are more general
> and which capture this type of activity (admin, teaching, ...).  If I
> happen to be in an org mode buffer, then "C-u M-x org-clock-in RET"
> allows me to pick the particular task (as it will typically be in the
> history) and clock it in.  Works well.
>
> If I am *not* in an org buffer (yes, this happens sometimes ;-), I
> cannot do this as org-clock-in, even with the C-u arg, wants to find a
> headline.  Can anybody suggest how I can clock in to a previously
> clocked task from any emacs mode?

My solution is to use C-c C-x C-j, eventually with C-u prefix, from any Emacs
buffer, thanks to:

#+begin_src emacs-lisp
  (global-set-key (kbd "C-c C-x C-j") 'org-clock-goto)
#+end_src

This is sometimes bound locally by some modes. Then, I disable it locally:

#+begin_src emacs-lisp
  ;; remove the binding of `C-c C-x', used by Org timeclocking commands
  (add-hook 'nxml-mode-hook
            (lambda ()
              (define-key nxml-mode-map (kbd "C-c C-x") nil)))
#+end_src

> My current solution is to tag these general catch-all tasks
> with :clocked:, use the agenda search (C-c a m clocked), select the
> appropriate one and start the clock.  This seems clumsy and doesn't make
> use of the history feature of org clocking, which seems a waste!
>
> I have read Bernt's excellent document [1] but it doesn't help me for
> this particular use.  I've also searched the mailing list but to no
> avail unfortunately.

Does this help?

Best regards,
  Seb

-- 
Sébastien Vauban

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

* Re: starting a clock when not in org-mode
  2011-05-13 11:43 ` Matt Lundin
@ 2011-05-13 11:53   ` Carsten Dominik
  2011-05-13 12:12     ` Eric S Fraga
  2011-05-13 12:32   ` Bernt Hansen
  1 sibling, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2011-05-13 11:53 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode


On May 13, 2011, at 1:43 PM, Matt Lundin wrote:

> Hi Eric,
> 
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> 
> [...]
> 
>> The org-clock-in method works very well when I am pro-actively deciding
>> what tasks to work on, e.g. through the agenda view.  However, in some
>> cases, I am reacting to external events (emails, somebody coming to see
>> me, phone call, etc).  I have a number of tasks which are more general
>> and which capture this type of activity (admin, teaching, ...).  If I
>> happen to be in an org mode buffer, then "C-u M-x org-clock-in RET"
>> allows me to pick the particular task (as it will typically be in the
>> history) and clock it in.  Works well.
>> 
>> If I am *not* in an org buffer (yes, this happens sometimes ;-), I
>> cannot do this as org-clock-in, even with the C-u arg, wants to find a
>> headline.  Can anybody suggest how I can clock in to a previously
>> clocked task from any emacs mode?
> 
> I cannot reproduce this. Here are the steps I took.

I cannot reproduce it either.  debug-on-error, and make a backtrace???

- Carsten

> 
> - clocked into a headline
> - clocked out
> - switched buffer to *scratch* (I tried it a second time with a TeX
>   buffer, which also worked)
> - typed C-u M-x org-clock-in
> - selected 1 (the most recent task)
> 
> Org successfully clocked into the task in the background.
> 
> Best,
> Matt
> 

- Carsten

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

* Re: starting a clock when not in org-mode
  2011-05-13 11:53   ` Carsten Dominik
@ 2011-05-13 12:12     ` Eric S Fraga
  2011-05-13 12:18       ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2011-05-13 12:12 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On May 13, 2011, at 1:43 PM, Matt Lundin wrote:

[...]

>> 
>> I cannot reproduce this. Here are the steps I took.
>
> I cannot reproduce it either.  debug-on-error, and make a backtrace???


Argghhh... I cannot reproduce now either.  Sigh.  Very strange. <blush>

Everything works as I would like/expect!  Sorry for the noise.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.274.gd6aba.dirty)

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

* Re: starting a clock when not in org-mode
  2011-05-13 11:46 ` Sebastien Vauban
@ 2011-05-13 12:14   ` Eric S Fraga
  0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2011-05-13 12:14 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

[...]

> My solution is to use C-c C-x C-j, eventually with C-u prefix, from any Emacs
> buffer, thanks to:

Yes, this is the alternative approach I have been using (as opposed to
agenda search).  However, it would appear that C-u org-clock-in actually
works as it should from any buffer, as Matt and Carsten have kindly
pointed out...  I must have been doing something incredibly silly
earlier.

Thanks,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.274.gd6aba.dirty)

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

* Re: starting a clock when not in org-mode
  2011-05-13 12:12     ` Eric S Fraga
@ 2011-05-13 12:18       ` Eric S Fraga
  0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2011-05-13 12:18 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Matt Lundin, emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> On May 13, 2011, at 1:43 PM, Matt Lundin wrote:
>
> [...]
>
>>> 
>>> I cannot reproduce this. Here are the steps I took.
>>
>> I cannot reproduce it either.  debug-on-error, and make a backtrace???
>
>
> Argghhh... I cannot reproduce now either.  Sigh.  Very strange. <blush>
>
> Everything works as I would like/expect!  Sorry for the noise.

Actually, to help redeem myself a little... the problem was that I was
trying to bind the org-clock-in command *with* argument to a key and
that's where I was going wrong.  Silly elisp error:  I did

: (global-set-key (kbd "<f9> <f9>") '(lambda () (interactive) (org-clock-in 4)))

instead of the correct

: (global-set-key (kbd "<f9> <f9>") '(lambda () (interactive) (org-clock-in '(4))))

Note the argument to org-clock-in.  As the argument was wrong,
org-clock-in was trying to find a headline to clock in on, which is
perfectly logical of course!

Again, sorry for the noise and thanks for the speedy responses!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.274.gd6aba.dirty)

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

* Re: starting a clock when not in org-mode
  2011-05-13 11:43 ` Matt Lundin
  2011-05-13 11:53   ` Carsten Dominik
@ 2011-05-13 12:32   ` Bernt Hansen
  1 sibling, 0 replies; 8+ messages in thread
From: Bernt Hansen @ 2011-05-13 12:32 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> Hi Eric,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
> [...]
>
>> The org-clock-in method works very well when I am pro-actively deciding
>> what tasks to work on, e.g. through the agenda view.  However, in some
>> cases, I am reacting to external events (emails, somebody coming to see
>> me, phone call, etc).  I have a number of tasks which are more general
>> and which capture this type of activity (admin, teaching, ...).  If I
>> happen to be in an org mode buffer, then "C-u M-x org-clock-in RET"
>> allows me to pick the particular task (as it will typically be in the
>> history) and clock it in.  Works well.
>>
>> If I am *not* in an org buffer (yes, this happens sometimes ;-), I
>> cannot do this as org-clock-in, even with the C-u arg, wants to find a
>> headline.  Can anybody suggest how I can clock in to a previously
>> clocked task from any emacs mode?
>
> I cannot reproduce this. Here are the steps I took.
>
>  - clocked into a headline
>  - clocked out
>  - switched buffer to *scratch* (I tried it a second time with a TeX
>    buffer, which also worked)
>  - typed C-u M-x org-clock-in
>  - selected 1 (the most recent task)
>
> Org successfully clocked into the task in the background.


I can't reproduce this either.  Clocking in from any buffer works for
me.

Regards,
Bernt

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

end of thread, other threads:[~2011-05-13 12:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13  9:17 starting a clock when not in org-mode Eric S Fraga
2011-05-13 11:43 ` Matt Lundin
2011-05-13 11:53   ` Carsten Dominik
2011-05-13 12:12     ` Eric S Fraga
2011-05-13 12:18       ` Eric S Fraga
2011-05-13 12:32   ` Bernt Hansen
2011-05-13 11:46 ` Sebastien Vauban
2011-05-13 12:14   ` Eric S Fraga

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).