* clocking in and out in remember buffers - seems to be buggy
@ 2008-01-22 21:04 Rainer Stengele
2008-01-22 21:42 ` Austin Frank
2008-01-24 8:33 ` Carsten Dominik
0 siblings, 2 replies; 9+ messages in thread
From: Rainer Stengele @ 2008-01-22 21:04 UTC (permalink / raw)
To: emacs-orgmode
I use to clock in a task when beginning to write in a remember buffer.
For example when receive a phone call from a customer I pop up a
remember template and the first thing I do is to start the clock.
- it would be very nice to have a way to do this automatically, maybe a
certain variable ...
After writing down notes and doing some stuff, documenting further in
the clocked in remember buffer, I finally want to save and close the
remember template.
After for example "C-u C-c C-c" I am asked if I want to clock out...
Answering "yes" I get "Clock start time is gone" and I am back in the
remember buffer.
Answering "no" the template is saved, the emacs status bar shows the
clock is running but trying to jump to the active clock with
org-goto-clocked-in-entry I get "No active clock".
That seems to be a bug or else I assume clocking in while being in a
remember buffer was never intended to be a feature?
Is there someone out there using the clock in the remember buffer?
By the way, the remember templates are an awesome mechanism and I try to
create more and more "rich" templates for different reoccuring tasks -
having then mostly only to choose between the predefined alternatives!
rainer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: clocking in and out in remember buffers - seems to be buggy
2008-01-22 21:04 clocking in and out in remember buffers - seems to be buggy Rainer Stengele
@ 2008-01-22 21:42 ` Austin Frank
2008-01-24 8:33 ` Carsten Dominik
1 sibling, 0 replies; 9+ messages in thread
From: Austin Frank @ 2008-01-22 21:42 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1396 bytes --]
On Tue, Jan 22 2008, Rainer Stengele wrote:
> I use to clock in a task when beginning to write in a remember buffer.
> For example when receive a phone call from a customer I pop up a
> remember template and the first thing I do is to start the clock.
>
> After writing down notes and doing some stuff, documenting further in
> the clocked in remember buffer, I finally want to save and close the
> remember template.
Here's what I would tried, but none of them worked
--8<---------------cut here---------------start------------->8---
;; try to use advice to start and stop the clock
(defadvice remember (after clock-in-on-remember-open)
"Call org-clock-in after opening a remember buffer."
;; also tried adding advice to org-remember and
;; org-remember-apply-template, neither worked
(org-clock-in))
(defadvice remember-finalize (before clock-out-on-remember-close)
"Call org-clock-out before closing a remember buffer."
(org-clock-out))
;; try to add clock starting to the remember mode hook
(add-hook 'remember-mode-hook 'org-clock-in)
--8<---------------cut here---------------end--------------->8---
Maybe one of these will give you an idea that will get you started in
the right direction. Sorry I couldn't actually figure it out.
/au
--
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc
[-- Attachment #1.2: Type: application/pgp-signature, Size: 185 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: clocking in and out in remember buffers - seems to be buggy
2008-01-22 21:04 clocking in and out in remember buffers - seems to be buggy Rainer Stengele
2008-01-22 21:42 ` Austin Frank
@ 2008-01-24 8:33 ` Carsten Dominik
2008-01-24 15:14 ` Rainer Stengele
1 sibling, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2008-01-24 8:33 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1488 bytes --]
On Jan 22, 2008, at 10:04 PM, Rainer Stengele wrote:
> I use to clock in a task when beginning to write in a remember buffer.
> For example when receive a phone call from a customer I pop up a
> remember template and the first thing I do is to start the clock.
>
> - it would be very nice to have a way to do this automatically,
> maybe a certain variable ...
You could use remember-mode-hook to run org-clock-in, maybe depending
on some string that you find and remove in the buffer. The string could
be part of the template, for example CLOCK-IN:
(add-hook 'remember-mode-hook 'my-start-clock-if-needed)
(defun my-start-clock-if-needed ()
(save-excursion
(goto-char (point-min))
(when (re-search-forward " *CLOCK-IN *" nil t)
(replace-match "")
(org-clock-in))))
> After writing down notes and doing some stuff, documenting further
> in the clocked in remember buffer, I finally want to save and close
> the remember template.
> After for example "C-u C-c C-c" I am asked if I want to clock out...
The query happens when the buffer gets killed - by then it is too
late, the
content of the buffer has already been filed away.
I will (in 5.20) have a check if the clock is running in the remember
buffer
before allowing you it file it. This will not be an automatic clock-out
because that would lead to trouble with possibly adding a note about
clocking out. But it will stop you from exiting without clocking out
first.
- Carsten
[-- Attachment #1.2: Type: text/html, Size: 2373 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: clocking in and out in remember buffers - seems to be buggy
2008-01-24 8:33 ` Carsten Dominik
@ 2008-01-24 15:14 ` Rainer Stengele
2008-01-24 15:26 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Rainer Stengele @ 2008-01-24 15:14 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik schrieb:
>
> On Jan 22, 2008, at 10:04 PM, Rainer Stengele wrote:
>
>> I use to clock in a task when beginning to write in a remember buffer.
>> For example when receive a phone call from a customer I pop up a
>> remember template and the first thing I do is to start the clock.
>>
>> - it would be very nice to have a way to do this automatically, maybe
>> a certain variable ...
>
> You could use remember-mode-hook to run org-clock-in, maybe depending
> on some string that you find and remove in the buffer. The string could
> be part of the template, for example CLOCK-IN:
>
> (add-hook 'remember-mode-hook 'my-start-clock-if-needed)
> (defun my-start-clock-if-needed ()
> (save-excursion
> (goto-char (point-min))
> (when (re-search-forward " *CLOCK-IN *" nil t)
> (replace-match "")
> (org-clock-in))))
>
>> After writing down notes and doing some stuff, documenting further in
>> the clocked in remember buffer, I finally want to save and close the
>> remember template.
>> After for example "C-u C-c C-c" I am asked if I want to clock out...
>
> The query happens when the buffer gets killed - by then it is too late, the
> content of the buffer has already been filed away.
>
> I will (in 5.20) have a check if the clock is running in the remember buffer
> before allowing you it file it. This will not be an automatic clock-out
> because that would lead to trouble with possibly adding a note about
> clocking out. But it will stop you from exiting without clocking out first.
>
> - Carsten
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Hello Carsten,
thank's a lot! Good idea!
I tried it, using different regexes. It does not work when starting the remember buffer.
Being inside the remember buffer and calling the function it does work!
How can I track that down?
Btw, I cannot see a modeline telling me that I am in "remember mode" when I am in the Remember buffer.
Also "C-h m" doesn't show me anything about remember?
rainer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: clocking in and out in remember buffers - seems to be buggy
2008-01-24 15:14 ` Rainer Stengele
@ 2008-01-24 15:26 ` Carsten Dominik
2008-01-24 15:34 ` Rainer Stengele
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2008-01-24 15:26 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
On Jan 24, 2008, at 4:14 PM, Rainer Stengele wrote:
> Carsten Dominik schrieb:
>>
>> On Jan 22, 2008, at 10:04 PM, Rainer Stengele wrote:
>>
>>> I use to clock in a task when beginning to write in a remember
>>> buffer.
>>> For example when receive a phone call from a customer I pop up a
>>> remember template and the first thing I do is to start the clock.
>>>
>>> - it would be very nice to have a way to do this automatically,
>>> maybe
>>> a certain variable ...
>>
>> You could use remember-mode-hook to run org-clock-in, maybe depending
>> on some string that you find and remove in the buffer. The string
>> could
>> be part of the template, for example CLOCK-IN:
>>
>> (add-hook 'remember-mode-hook 'my-start-clock-if-needed)
>> (defun my-start-clock-if-needed ()
>> (save-excursion
>> (goto-char (point-min))
>> (when (re-search-forward " *CLOCK-IN *" nil t)
>> (replace-match "")
>> (org-clock-in))))
>>
>>> After writing down notes and doing some stuff, documenting further
>>> in
>>> the clocked in remember buffer, I finally want to save and close the
>>> remember template.
>>> After for example "C-u C-c C-c" I am asked if I want to clock out...
>>
>> The query happens when the buffer gets killed - by then it is too
>> late, the
>> content of the buffer has already been filed away.
>>
>> I will (in 5.20) have a check if the clock is running in the
>> remember buffer
>> before allowing you it file it. This will not be an automatic
>> clock-out
>> because that would lead to trouble with possibly adding a note about
>> clocking out. But it will stop you from exiting without clocking
>> out first.
>>
>> - Carsten
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> Hello Carsten,
>
> thank's a lot! Good idea!
>
> I tried it, using different regexes. It does not work when starting
> the remember buffer.
> Being inside the remember buffer and calling the function it does
> work!
> How can I track that down?
> Btw, I cannot see a modeline telling me that I am in "remember mode"
> when I am in the Remember buffer.
> Also "C-h m" doesn't show me anything about remember?
Yes, when you use Org-mode together with remember, the
buffer is actually in Org-mode, to make it easier
to use org-mode specific stuff. However, remember first puts
the buffer into remember-mode, therefore the hook is run.
I am not sure why things don't work. Take a look at the variable
`remember-mode-hook'. What is its value?
- Carsten
>
>
> rainer
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: clocking in and out in remember buffers - seems to be buggy
2008-01-24 15:26 ` Carsten Dominik
@ 2008-01-24 15:34 ` Rainer Stengele
2008-01-24 15:38 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Rainer Stengele @ 2008-01-24 15:34 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik schrieb:
>
> On Jan 24, 2008, at 4:14 PM, Rainer Stengele wrote:
>
>> Carsten Dominik schrieb:
>>>
>>> On Jan 22, 2008, at 10:04 PM, Rainer Stengele wrote:
>>>
>>>> I use to clock in a task when beginning to write in a remember buffer.
>>>> For example when receive a phone call from a customer I pop up a
>>>> remember template and the first thing I do is to start the clock.
>>>>
>>>> - it would be very nice to have a way to do this automatically, maybe
>>>> a certain variable ...
>>>
>>> You could use remember-mode-hook to run org-clock-in, maybe depending
>>> on some string that you find and remove in the buffer. The string could
>>> be part of the template, for example CLOCK-IN:
>>>
>>> (add-hook 'remember-mode-hook 'my-start-clock-if-needed)
>>> (defun my-start-clock-if-needed ()
>>> (save-excursion
>>> (goto-char (point-min))
>>> (when (re-search-forward " *CLOCK-IN *" nil t)
>>> (replace-match "")
>>> (org-clock-in))))
>>>
>>>> After writing down notes and doing some stuff, documenting further in
>>>> the clocked in remember buffer, I finally want to save and close the
>>>> remember template.
>>>> After for example "C-u C-c C-c" I am asked if I want to clock out...
>>>
>>> The query happens when the buffer gets killed - by then it is too
>>> late, the
>>> content of the buffer has already been filed away.
>>>
>>> I will (in 5.20) have a check if the clock is running in the remember
>>> buffer
>>> before allowing you it file it. This will not be an automatic clock-out
>>> because that would lead to trouble with possibly adding a note about
>>> clocking out. But it will stop you from exiting without clocking out
>>> first.
>>>
>>> - Carsten
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> Hello Carsten,
>>
>> thank's a lot! Good idea!
>>
>> I tried it, using different regexes. It does not work when starting
>> the remember buffer.
>> Being inside the remember buffer and calling the function it does work!
>> How can I track that down?
>> Btw, I cannot see a modeline telling me that I am in "remember mode"
>> when I am in the Remember buffer.
>> Also "C-h m" doesn't show me anything about remember?
>
> Yes, when you use Org-mode together with remember, the
> buffer is actually in Org-mode, to make it easier
> to use org-mode specific stuff. However, remember first puts
> the buffer into remember-mode, therefore the hook is run.
>
> I am not sure why things don't work. Take a look at the variable
> `remember-mode-hook'. What is its value?
>
> - Carsten
>
>>
looks ok, includes the new function:
(my-start-clock-if-needed org-remember-apply-template)
is the template already "in" at that moment?
rainer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: clocking in and out in remember buffers - seems to be buggy
2008-01-24 15:34 ` Rainer Stengele
@ 2008-01-24 15:38 ` Carsten Dominik
2008-01-25 12:57 ` Rainer Stengele
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2008-01-24 15:38 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
On Jan 24, 2008, at 4:34 PM, Rainer Stengele wrote:
>>>>
>> I am not sure why things don't work. Take a look at the variable
>> `remember-mode-hook'. What is its value?
>>
>> - Carsten
>>
>>>
>
> looks ok, includes the new function:
>
> (my-start-clock-if-needed org-remember-apply-template)
>
> is the template already "in" at that moment?
No, it is not OK, the sequence is wrong. Try an 'append argument when
adding the
my-start-clock-if-needed function, and make sure this line is called
after
the template functin has been added to the hook. The restart emacs and
double-check, it has to be:
(org-remember-apply-template my-start-clock-if-needed)
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: clocking in and out in remember buffers - seems to be buggy
2008-01-24 15:38 ` Carsten Dominik
@ 2008-01-25 12:57 ` Rainer Stengele
2008-01-25 13:12 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Rainer Stengele @ 2008-01-25 12:57 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik schrieb:
>
> On Jan 24, 2008, at 4:34 PM, Rainer Stengele wrote:
>>>>>
>>> I am not sure why things don't work. Take a look at the variable
>>> `remember-mode-hook'. What is its value?
>>>
>>> - Carsten
>>>
>>>>
>>
>> looks ok, includes the new function:
>>
>> (my-start-clock-if-needed org-remember-apply-template)
>>
>> is the template already "in" at that moment?
>
>
> No, it is not OK, the sequence is wrong. Try an 'append argument when
> adding the
> my-start-clock-if-needed function, and make sure this line is called after
> the template functin has been added to the hook. The restart emacs and
> double-check, it has to be:
>
> (org-remember-apply-template my-start-clock-if-needed)
>
> - Carsten
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
Excellent, the clock is now started whenever I have a "CLOCK-IN" string in the template!
Leaving with C-u C-c C-c it I am asked if I want clock out.
Answering "y" it says:
"Clock start time is gone"
and the remeber buffer stays open.
- Answering "n" the buffer is saved. Trying to find the clocked in item by calling
org-gotro-clocked-in-entry
results in:
"No active clock"
Both cases do not make sense for me.
Anyone has a comment/help?
- Rainer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: clocking in and out in remember buffers - seems to be buggy
2008-01-25 12:57 ` Rainer Stengele
@ 2008-01-25 13:12 ` Carsten Dominik
0 siblings, 0 replies; 9+ messages in thread
From: Carsten Dominik @ 2008-01-25 13:12 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
This will be fixed in 5.20, by forcing you to explicitly clock out
before
storing the note. For now, just do it willingly.
- Carsten
On Jan 25, 2008, at 1:57 PM, Rainer Stengele wrote:
> Carsten Dominik schrieb:
>>
>> On Jan 24, 2008, at 4:34 PM, Rainer Stengele wrote:
>>>>>>
>>>> I am not sure why things don't work. Take a look at the variable
>>>> `remember-mode-hook'. What is its value?
>>>>
>>>> - Carsten
>>>>
>>>>>
>>>
>>> looks ok, includes the new function:
>>>
>>> (my-start-clock-if-needed org-remember-apply-template)
>>>
>>> is the template already "in" at that moment?
>>
>>
>> No, it is not OK, the sequence is wrong. Try an 'append argument
>> when
>> adding the
>> my-start-clock-if-needed function, and make sure this line is
>> called after
>> the template functin has been added to the hook. The restart emacs
>> and
>> double-check, it has to be:
>>
>> (org-remember-apply-template my-start-clock-if-needed)
>>
>> - Carsten
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
> Excellent, the clock is now started whenever I have a "CLOCK-IN"
> string in the template!
> Leaving with C-u C-c C-c it I am asked if I want clock out.
>
>
> Answering "y" it says:
>
> "Clock start time is gone"
>
> and the remeber buffer stays open.
>
> - Answering "n" the buffer is saved. Trying to find the clocked in
> item by calling
> org-gotro-clocked-in-entry
> results in:
>
> "No active clock"
>
>
> Both cases do not make sense for me.
> Anyone has a comment/help?
>
> - Rainer
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-01-25 13:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-22 21:04 clocking in and out in remember buffers - seems to be buggy Rainer Stengele
2008-01-22 21:42 ` Austin Frank
2008-01-24 8:33 ` Carsten Dominik
2008-01-24 15:14 ` Rainer Stengele
2008-01-24 15:26 ` Carsten Dominik
2008-01-24 15:34 ` Rainer Stengele
2008-01-24 15:38 ` Carsten Dominik
2008-01-25 12:57 ` Rainer Stengele
2008-01-25 13:12 ` Carsten Dominik
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).