* Timestamp practices?
@ 2013-03-20 14:30 Lawrence Bottorff
2013-03-20 14:39 ` Bastien
2013-03-20 15:13 ` Thorsten Jolitz
0 siblings, 2 replies; 4+ messages in thread
From: Lawrence Bottorff @ 2013-03-20 14:30 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
I'm trying to give each header entry a timestamp. To do this I create a
drawer like this:
:PROPERTIES:
:CUSTOM_ID: [2013-03-19 Tue 14:26]
:END:
Initially, I do C-u M-x org-insert-drawer. This gives me
:PROPERTIES:
:END:
Then I do C-c C-x p and choose CUSTOM-ID. Then I insert a timestamp. Here's
what it looks like (expanded):
** Links
*** [[http://www.neo4j.org/][The World's Leading Graph Database]]
:PROPERTIES:
:CUSTOM_ID: [2013-03-19 Tue 14:26]
:END:
*** [[http://www.manning.com/carlson/][Redis: NoSQL; key-value; in-memory]]
:PROPERTIES:
:CUSTOM_ID: [2013-03-19 Tue 19:34]
:END:
**** [[
http://justinsboringpage.blogspot.com/2011/07/eredis-redis-client-in-emacs-lisp.html][eredis:
a Redis client in emacs lisp]]
:PROPERTIES:
:CUSTOM_ID: [2013-03-19 Tue 19:42]
:END:
I'd like to know the best practice for adding such timestamps. Am I gaining
anything by enclosing the timestamp in such an elaborate drawer? Are these
two commands the best way to do this? Or is there a more automated approach?
In general, I can't help but marvel at the ad-hoc, on-the-fly data
management possibilities org-mode offers. It seems like the sky's the
limit. But I'd like opinions on whether I'm stumbling along a blind alley.
[-- Attachment #2: Type: text/html, Size: 1840 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Timestamp practices?
2013-03-20 14:30 Timestamp practices? Lawrence Bottorff
@ 2013-03-20 14:39 ` Bastien
2013-03-20 15:13 ` Thorsten Jolitz
1 sibling, 0 replies; 4+ messages in thread
From: Bastien @ 2013-03-20 14:39 UTC (permalink / raw)
To: Lawrence Bottorff; +Cc: emacs-orgmode
Hi Lawrence,
Lawrence Bottorff <galaxybeinglambda@gmail.com> writes:
> I'd like to know the best practice for adding such timestamps. Am I
> gaining anything by enclosing the timestamp in such an elaborate
> drawer?
It really depends on what you want to achieve, but I'd say no, in
general.
> Are these two commands the best way to do this? Or is there a
> more automated approach?
I would simply use a bare time-stamp like this
* Headline
<2013-03-20 mer.>
Use C-c . to insert the active time-stamp, or C-c ! to insert an
inactive one, or use shift-up/down on the brackets to switch from
active to inactive.
> In general, I can't help but marvel at the ad-hoc, on-the-fly data
> management possibilities org-mode offers. It seems like the sky's the
> limit. But I'd like opinions on whether I'm stumbling along a blind
> alley.
In any case, using a time-stamp in CUSTOM_ID does not seem to be a
good idea, as this id will be used as an anchor in various contexts
(link search, HTML, etc.) So better use a bare time-stamp I'd say.
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Timestamp practices?
2013-03-20 14:30 Timestamp practices? Lawrence Bottorff
2013-03-20 14:39 ` Bastien
@ 2013-03-20 15:13 ` Thorsten Jolitz
2013-03-21 10:15 ` Samuel Loury
1 sibling, 1 reply; 4+ messages in thread
From: Thorsten Jolitz @ 2013-03-20 15:13 UTC (permalink / raw)
To: emacs-orgmode
Lawrence Bottorff <galaxybeinglambda@gmail.com> writes:
> I'm trying to give each header entry a timestamp.
This is from Bernt Hansen and automagically inserts a timestamp each
time you insert a new header - if you want so.
If not, you can toggle the behaviour. Nice.
,------------------------------------------------------------------------
| (defvar bh/insert-inactive-timestamp t)
|
| (defun bh/toggle-insert-inactive-timestamp ()
| (interactive)
| (setq bh/insert-inactive-timestamp (not bh/insert-inactive-timestamp))
| (message "Heading timestamps are %s"
| (if bh/insert-inactive-timestamp "ON" "OFF")))
|
| (defun bh/insert-inactive-timestamp ()
| (interactive)
| (org-insert-time-stamp nil t t nil nil nil))
|
| (defun bh/insert-heading-inactive-timestamp ()
| (save-excursion
| (when bh/insert-inactive-timestamp
| (org-return)
| (org-cycle)
| (bh/insert-inactive-timestamp))))
|
| (add-hook 'org-insert-heading-hook
| 'bh/insert-heading-inactive-timestamp 'append)
`-------------------------------------------------------------------------
,---------------------------------------------------------------------
| (global-set-key (kbd "<f9> T") 'bh/toggle-insert-inactive-timestamp)
| (global-set-key (kbd "<f9> t") 'bh/insert-inactive-timestamp)
`---------------------------------------------------------------------
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Timestamp practices?
2013-03-20 15:13 ` Thorsten Jolitz
@ 2013-03-21 10:15 ` Samuel Loury
0 siblings, 0 replies; 4+ messages in thread
From: Samuel Loury @ 2013-03-21 10:15 UTC (permalink / raw)
To: Thorsten Jolitz, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Lawrence Bottorff <galaxybeinglambda@gmail.com> writes:
>
>> I'm trying to give each header entry a timestamp.
>
> This is from Bernt Hansen and automagically inserts a timestamp each
> time you insert a new header - if you want so.
> If not, you can toggle the behaviour. Nice.
>
> ,------------------------------------------------------------------------
> | (defvar bh/insert-inactive-timestamp t)
> |
> | (defun bh/toggle-insert-inactive-timestamp ()
> | (interactive)
> | (setq bh/insert-inactive-timestamp (not bh/insert-inactive-timestamp))
> | (message "Heading timestamps are %s"
> | (if bh/insert-inactive-timestamp "ON" "OFF")))
> |
> | (defun bh/insert-inactive-timestamp ()
> | (interactive)
> | (org-insert-time-stamp nil t t nil nil nil))
> |
> | (defun bh/insert-heading-inactive-timestamp ()
> | (save-excursion
> | (when bh/insert-inactive-timestamp
> | (org-return)
> | (org-cycle)
> | (bh/insert-inactive-timestamp))))
> |
> | (add-hook 'org-insert-heading-hook
> | 'bh/insert-heading-inactive-timestamp 'append)
> `-------------------------------------------------------------------------
>
> ,---------------------------------------------------------------------
> | (global-set-key (kbd "<f9> T") 'bh/toggle-insert-inactive-timestamp)
> | (global-set-key (kbd "<f9> t") 'bh/insert-inactive-timestamp)
> `---------------------------------------------------------------------
>
> --
> cheers,
> Thorsten
>
>
Moreover, if you also use org-capture. You may precise a timestamp to be
put in the captured template. IIRC, This is also inspired from Bernt's
configuration.
╭────
│ (add-to-list 'org-capture-templates
│ '("t" "Todo Item" entry (file+headline (expand-file-name "todo.org" org-directory) "Refile") "* TODO %?
│ :LOGBOOK:
│ - Captured %U
│ :END:
│ "
│ :kill-buffer
│ )
│ )
╰────
The useful part here is the %U. (see info:org#Template expansion).
This is of course to adjust according to your needs.
--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-21 10:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 14:30 Timestamp practices? Lawrence Bottorff
2013-03-20 14:39 ` Bastien
2013-03-20 15:13 ` Thorsten Jolitz
2013-03-21 10:15 ` Samuel Loury
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).