emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: clocking in and out in remember buffers - seems to be bugg


From: Rainer Stengele
Subject: [Orgmode] Re: clocking in and out in remember buffers - seems to be buggy
Date: Thu, 24 Jan 2008 16:34:08 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

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.
>>> address@hidden
>>> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]