emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* date added into logbook?
@ 2012-05-28 19:01 Michael Gilbert
  2012-05-28 19:56 ` John Hendy
  2012-06-01  3:03 ` Sacha Chua
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Gilbert @ 2012-05-28 19:01 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

Hi all —

I've been slowly studying LISP to the point where I can at least READ some of the code written by the amazing people in the Org-Mode community, but I'm not yet at the point where I am willing to try to write to much myself, especially given my need to learn much more about the variables and functions in org-mode. (Well, I have been willing, but since it takes me five hours still to do something I can do in a few minutes in Python, I'm obviously just not there yet.) So, I am turning to you for this one.

I have a desire to better track the history of notes and tasks, as they get created, refiled, etc. This involves several elements, but one of them involves a piece that I've wanted for a while: a way to keep the data that is lost when I refile an item from my default date-tree file — the date the item was created/added.

Perhaps there is some obvious (but mysterious to me) variable I can set for this, but I haven't found it. What I want is to be able to have a string similar to the others added to the logbook (like " - Refiled on [2012-05-28 Mon 11:33]"), but for the date/time the item first appeared. 

Is anyone else already doing this?

— Michael


http://nonprofitnews.org
http://gilbert.org

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

* Re: date added into logbook?
  2012-05-28 19:01 date added into logbook? Michael Gilbert
@ 2012-05-28 19:56 ` John Hendy
  2012-05-28 21:58   ` Michael C Gilbert
  2012-06-01  3:03 ` Sacha Chua
  1 sibling, 1 reply; 8+ messages in thread
From: John Hendy @ 2012-05-28 19:56 UTC (permalink / raw)
  To: Michael Gilbert; +Cc: emacs-orgmode Mailinglist

On Mon, May 28, 2012 at 2:01 PM, Michael Gilbert <mcg@gilbert.org> wrote:
> Hi all —
>

[snip]

> I have a desire to better track the history of notes and tasks, as they get created, refiled, etc. This involves several elements, but one of them involves a piece that I've wanted for a while: a way to keep the data that is lost when I refile an item from my default date-tree file — the date the item was created/added.
>
> Perhaps there is some obvious (but mysterious to me) variable I can set for this, but I haven't found it. What I want is to be able to have a string similar to the others added to the logbook (like " - Refiled on [2012-05-28 Mon 11:33]"), but for the date/time the item first appeared.
>

Bernt Hansen does this (I think this is what you're looking for). Can this help?
-- http://doc.norang.ca/org-mode.html#sec-15-21

#+begin_src elisp
(defun bh/insert-inactive-timestamp ()
  (interactive)
  (org-insert-time-stamp nil t t nil nil nil))

(defun bh/insert-heading-inactive-timestamp ()
  (save-excursion
    (org-return)
    (org-cycle)
    (bh/insert-inactive-timestamp)))

(add-hook 'org-insert-heading-hook
'bh/insert-heading-inactive-timestamp 'append)
#+end_src

Best regards,
John

> Is anyone else already doing this?
>
> — Michael
>
>
> http://nonprofitnews.org
> http://gilbert.org
>
>
>
>

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

* Re: date added into logbook?
  2012-05-28 19:56 ` John Hendy
@ 2012-05-28 21:58   ` Michael C Gilbert
  2012-05-28 22:51     ` John Hendy
  0 siblings, 1 reply; 8+ messages in thread
From: Michael C Gilbert @ 2012-05-28 21:58 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

On May 28, 2012, at 12:56 PM, John Hendy wrote:

> On Mon, May 28, 2012 at 2:01 PM, Michael Gilbert <mcg@gilbert.org> wrote:
> 
>> I have a desire to better track the history of notes and tasks, as they get created, refiled, etc. This involves several elements, but one of them involves a piece that I've wanted for a while: a way to keep the data that is lost when I refile an item from my default date-tree file — the date the item was created/added.
>> 
>> Perhaps there is some obvious (but mysterious to me) variable I can set for this, but I haven't found it. What I want is to be able to have a string similar to the others added to the logbook (like " - Refiled on [2012-05-28 Mon 11:33]"), but for the date/time the item first appeared.
> 
> Bernt Hansen does this (I think this is what you're looking for). Can this help?
> -- http://doc.norang.ca/org-mode.html#sec-15-21


Thank you! There it is, on the web, 80% of what I was looking for (of course). This certainly has the same intent. It does not add any metadata (such as a prefix " - Added on "), but the documentation for org-insert-time-stamp makes it obvious how to do that. What eludes me is how to make it obey the org-clock-into-drawer setting. I'm assuming it doesn't.

— Michael

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

* Re: date added into logbook?
  2012-05-28 21:58   ` Michael C Gilbert
@ 2012-05-28 22:51     ` John Hendy
  2012-05-29 13:04       ` Jonathan Leech-Pepin
  0 siblings, 1 reply; 8+ messages in thread
From: John Hendy @ 2012-05-28 22:51 UTC (permalink / raw)
  To: Michael C Gilbert; +Cc: emacs-orgmode Mailinglist

On Mon, May 28, 2012 at 4:58 PM, Michael C Gilbert <mcg@gilbert.org> wrote:
> On May 28, 2012, at 12:56 PM, John Hendy wrote:
>
>> On Mon, May 28, 2012 at 2:01 PM, Michael Gilbert <mcg@gilbert.org> wrote:
>>
>>> I have a desire to better track the history of notes and tasks, as they get created, refiled, etc. This involves several elements, but one of them involves a piece that I've wanted for a while: a way to keep the data that is lost when I refile an item from my default date-tree file — the date the item was created/added.
>>>
>>> Perhaps there is some obvious (but mysterious to me) variable I can set for this, but I haven't found it. What I want is to be able to have a string similar to the others added to the logbook (like " - Refiled on [2012-05-28 Mon 11:33]"), but for the date/time the item first appeared.
>>
>> Bernt Hansen does this (I think this is what you're looking for). Can this help?
>> -- http://doc.norang.ca/org-mode.html#sec-15-21
>
>
> Thank you! There it is, on the web, 80% of what I was looking for (of course). This certainly has the same intent. It does not add any metadata (such as a prefix " - Added on "), but the documentation for org-insert-time-stamp makes it obvious how to do that. What eludes me is how to make it obey the org-clock-into-drawer setting. I'm assuming it doesn't.
>
> — Michael
>
>

Yes, I'm not sure about that either... I wonder if looking at the code
for what makes todo state changes and properties log into :LOGBOOK:
might help? I don't know any elisp to make sense of that. Perhaps
Bernt will see this and illuminate us both?

John

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

* Re: date added into logbook?
  2012-05-28 22:51     ` John Hendy
@ 2012-05-29 13:04       ` Jonathan Leech-Pepin
  2012-05-29 17:50         ` Michael C Gilbert
  0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Leech-Pepin @ 2012-05-29 13:04 UTC (permalink / raw)
  To: Michael C Gilbert; +Cc: emacs-orgmode Mailinglist

Hello,

I'm not sure that you can automatically include the note into a
:LOGBOOK: drawer, however if you're mostly/only working from capture
templates you could add a property for CREATED and have it
automatically fill with an inactive timestamp.

#+begin_src emacs-lisp
  ("x"
   "Example capture"
   entry
   (file+headline "~/org/todo.org" "Example")
   "* [headline info]\n:PROPERTIES:\n:CREATED: %U\n:END: [body]"
   :empty-lines 1)
#+end_src

It isn't quite the same as having it in the logbook, but it does
provide the information when you look for it.

Regards,

Jonathan

On Mon, May 28, 2012 at 6:51 PM, John Hendy <jw.hendy@gmail.com> wrote:
> On Mon, May 28, 2012 at 4:58 PM, Michael C Gilbert <mcg@gilbert.org> wrote:
>> On May 28, 2012, at 12:56 PM, John Hendy wrote:
>>
>>> On Mon, May 28, 2012 at 2:01 PM, Michael Gilbert <mcg@gilbert.org> wrote:
>>>
>>>> I have a desire to better track the history of notes and tasks, as they get created, refiled, etc. This involves several elements, but one of them involves a piece that I've wanted for a while: a way to keep the data that is lost when I refile an item from my default date-tree file — the date the item was created/added.
>>>>
>>>> Perhaps there is some obvious (but mysterious to me) variable I can set for this, but I haven't found it. What I want is to be able to have a string similar to the others added to the logbook (like " - Refiled on [2012-05-28 Mon 11:33]"), but for the date/time the item first appeared.
>>>
>>> Bernt Hansen does this (I think this is what you're looking for). Can this help?
>>> -- http://doc.norang.ca/org-mode.html#sec-15-21
>>
>>
>> Thank you! There it is, on the web, 80% of what I was looking for (of course). This certainly has the same intent. It does not add any metadata (such as a prefix " - Added on "), but the documentation for org-insert-time-stamp makes it obvious how to do that. What eludes me is how to make it obey the org-clock-into-drawer setting. I'm assuming it doesn't.
>>
>> — Michael
>>
>>
>
> Yes, I'm not sure about that either... I wonder if looking at the code
> for what makes todo state changes and properties log into :LOGBOOK:
> might help? I don't know any elisp to make sense of that. Perhaps
> Bernt will see this and illuminate us both?
>
> John
>

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

* Re: date added into logbook?
  2012-05-29 13:04       ` Jonathan Leech-Pepin
@ 2012-05-29 17:50         ` Michael C Gilbert
  0 siblings, 0 replies; 8+ messages in thread
From: Michael C Gilbert @ 2012-05-29 17:50 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

On May 29, 2012, at 6:04 AM, Jonathan Leech-Pepin wrote:

> I'm not sure that you can automatically include the note into a
> :LOGBOOK: drawer, however if you're mostly/only working from capture
> templates you could add a property for CREATED and have it
> automatically fill with an inactive timestamp.


<snip>

Thank you. That's another useful approach. 

I had this hunch that, in the interest of synergy and re-usability, it would make sense to tap into the existing framework for managing the logbook. But from perusing the code, it seems that much of that is kind baked-in. I'm wondering if someone more familiar with the code base in question might comment.

Am I mistaken? Is there a way to tap into the logbook related loops?

— Michael

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

* Re: date added into logbook?
  2012-05-28 19:01 date added into logbook? Michael Gilbert
  2012-05-28 19:56 ` John Hendy
@ 2012-06-01  3:03 ` Sacha Chua
  2012-06-10 16:59   ` Michael C Gilbert
  1 sibling, 1 reply; 8+ messages in thread
From: Sacha Chua @ 2012-06-01  3:03 UTC (permalink / raw)
  To: emacs-orgmode

Michael Gilbert <mcg@gilbert.org> writes:

Hello, Michael!

> one of them involves a piece that I've wanted for a while: a way to
> keep the data that is lost when I refile an item from my default
> date-tree file ― the date the item was created/added.

Have you considered using org-capture with the clock options? I like
using this because it automatically grabs the timestamp as well, and
when I press C-c C-c, it clocks out. Handy - I've been using it to
calculate my words per minute (dismally low for blog posts sometimes!).

Here's a snippet from my config:

(setq org-capture-templates '(
 ;; Lots of other lines here 
 ("r" "Notes" entry
  (file+datetree "~/personal/organizer.org" "Inbox")
  "* %?\n\n%i\n" :clock-in :clock-resume)
  ))

(global-set-key (kbd "C-c r") 'org-capture)

Anyway, if you happen to use org-capture a lot, then it's a good way of
capturing creation times too. =)

Hope that helps!

Sacha

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

* Re: date added into logbook?
  2012-06-01  3:03 ` Sacha Chua
@ 2012-06-10 16:59   ` Michael C Gilbert
  0 siblings, 0 replies; 8+ messages in thread
From: Michael C Gilbert @ 2012-06-10 16:59 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

On May 31, 2012, at 8:03 PM, Sacha Chua wrote:

> Have you considered using org-capture with the clock options? I like
> using this because it automatically grabs the timestamp as well, and
> when I press C-c C-c, it clocks out. Handy - I've been using it to
> calculate my words per minute (dismally low for blog posts sometimes!).
> 
> Here's a snippet from my config:
> 
> <snip>


I would eventually love to have better access to the existing framework for logbook entries, but I think using org-capture seems the way to go for now. Thank you (and others) very much.

— Michael

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

end of thread, other threads:[~2012-06-10 16:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-28 19:01 date added into logbook? Michael Gilbert
2012-05-28 19:56 ` John Hendy
2012-05-28 21:58   ` Michael C Gilbert
2012-05-28 22:51     ` John Hendy
2012-05-29 13:04       ` Jonathan Leech-Pepin
2012-05-29 17:50         ` Michael C Gilbert
2012-06-01  3:03 ` Sacha Chua
2012-06-10 16:59   ` Michael C Gilbert

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