Re: [O] date added into logbook?

2012-06-10 Thread Michael C Gilbert
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






Re: [O] date added into logbook?

2012-05-31 Thread Sacha Chua
Michael Gilbert m...@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




Re: [O] date added into logbook?

2012-05-29 Thread Jonathan Leech-Pepin
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.he...@gmail.com wrote:
 On Mon, May 28, 2012 at 4:58 PM, Michael C Gilbert m...@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 m...@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




Re: [O] date added into logbook?

2012-05-29 Thread Michael C Gilbert
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




[O] date added into logbook?

2012-05-28 Thread Michael Gilbert
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






Re: [O] date added into logbook?

2012-05-28 Thread John Hendy
On Mon, May 28, 2012 at 2:01 PM, Michael Gilbert m...@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







Re: [O] date added into logbook?

2012-05-28 Thread Michael C Gilbert
On May 28, 2012, at 12:56 PM, John Hendy wrote:

 On Mon, May 28, 2012 at 2:01 PM, Michael Gilbert m...@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




Re: [O] date added into logbook?

2012-05-28 Thread John Hendy
On Mon, May 28, 2012 at 4:58 PM, Michael C Gilbert m...@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 m...@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