From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Timestamp practices? Date: Wed, 20 Mar 2013 09:30:06 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b15ac9ff13dbd04d85c0ede Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIK1s-0003YQ-4B for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:30:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIK1n-0008Fr-6Q for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:30:12 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:63244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIK1n-0008FH-0Z for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:30:07 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro8so1399301pbb.32 for ; Wed, 20 Mar 2013 07:30:06 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7b15ac9ff13dbd04d85c0ede Content-Type: text/plain; charset=ISO-8859-1 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. --047d7b15ac9ff13dbd04d85c0ede Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm trying to give each header entry a timestamp. To do this I cre= ate a drawer like this:

:PROPERTIES:
:CU= STOM_ID: [2013-03-19 Tue 14:26]
:END:

Initially, I do C-u M-x org-insert-drawer. This gives me=A0

<= /div>
:PROPERTIES:

:END:

<= div>Then I do C-c C-x p and choose CUSTOM-ID. Then I insert a timestamp. He= re'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-va= lue; in-memory]]
:PROPERTIES:
:CUSTOM_ID: [2013-03-19 T= ue 19:34]
:END:

:PROPERTIES:
:CUSTOM_ID: [2013-03-19 Tue 19:42]
:E= ND:

I'd like to know the best practice for add= ing such timestamps. Am I gaining anything by enclosing the timestamp in su= ch 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 stumblin= g along a blind alley.
--047d7b15ac9ff13dbd04d85c0ede-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Timestamp practices? Date: Wed, 20 Mar 2013 15:39:45 +0100 Message-ID: <877gl2879q.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKBF-0007Lt-7S for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:39:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIKBA-000336-8p for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:39:53 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:63717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKBA-00032v-2I for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 10:39:48 -0400 Received: by mail-wi0-f181.google.com with SMTP id hm6so1904723wib.8 for ; Wed, 20 Mar 2013 07:39:47 -0700 (PDT) In-Reply-To: (Lawrence Bottorff's message of "Wed, 20 Mar 2013 09:30:06 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Lawrence Bottorff Cc: emacs-orgmode@gnu.org Hi Lawrence, Lawrence Bottorff 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Timestamp practices? Date: Wed, 20 Mar 2013 16:13:42 +0100 Message-ID: <87obeep0ih.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKiC-00081a-GR for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 11:13:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIKiB-0007mY-9G for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 11:13:56 -0400 Received: from plane.gmane.org ([80.91.229.3]:33802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIKiB-0007mO-2f for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 11:13:55 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UIKiV-0004HJ-Bm for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 16:14:15 +0100 Received: from e178055100.adsl.alicedsl.de ([85.178.55.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Mar 2013 16:14:15 +0100 Received: from tjolitz by e178055100.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Mar 2013 16:14:15 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Lawrence Bottorff 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 " T") 'bh/toggle-insert-inactive-timestamp) | (global-set-key (kbd " t") 'bh/insert-inactive-timestamp) `--------------------------------------------------------------------- -- cheers, Thorsten From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: Re: Timestamp practices? Date: Thu, 21 Mar 2013 11:15:37 +0100 Message-ID: <87obed2h4m.fsf@konixwork.incubateur.ens-lyon.fr> References: <87obeep0ih.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIcZ3-0004w0-5H for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 06:17:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIcYy-0004xF-QN for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 06:17:41 -0400 Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]:56000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIcYy-0004wx-KH for emacs-orgmode@gnu.org; Thu, 21 Mar 2013 06:17:36 -0400 Received: by mail-we0-f170.google.com with SMTP id z2so665973wey.1 for ; Thu, 21 Mar 2013 03:17:35 -0700 (PDT) In-Reply-To: <87obeep0ih.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Thorsten Jolitz , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thorsten Jolitz writes: > Lawrence Bottorff 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.=20 > If not, you can toggle the behaviour. Nice. > > ,------------------------------------------------------------------------ > | (defvar bh/insert-inactive-timestamp t) > |=20 > | (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"))) > |=20 > | (defun bh/insert-inactive-timestamp () > | (interactive) > | (org-insert-time-stamp nil t t nil nil nil)) > |=20 > | (defun bh/insert-heading-inactive-timestamp () > | (save-excursion > | (when bh/insert-inactive-timestamp > | (org-return) > | (org-cycle) > | (bh/insert-inactive-timestamp)))) > |=20 > | (add-hook 'org-insert-heading-hook > | 'bh/insert-heading-inactive-timestamp 'append) > `------------------------------------------------------------------------- > > ,--------------------------------------------------------------------- > | (global-set-key (kbd " T") 'bh/toggle-insert-inactive-timestamp) > | (global-set-key (kbd " t") 'bh/insert-inactive-timestamp) > `--------------------------------------------------------------------- > > --=20 > 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. =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (add-to-list 'org-capture-templates =E2=94=82 '("t" "Todo Item" entry (file+headline (expand-file-name "to= do.org" org-directory) "Refile") "* TODO %? =E2=94=82 :LOGBOOK: =E2=94=82 - Captured %U =E2=94=82 :END: =E2=94=82 " =E2=94=82 :kill-buffer =E2=94=82 ) =E2=94=82 ) =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 The useful part here is the %U. (see info:org#Template expansion). This is of course to adjust according to your needs. =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJRSt3JAAoJEHXSPO10ORBqcGEIALeAYDVnzO60BR3xroIsCzy5 aVxm4wPZybKtGaf31XnM9GNj7uVw86fVRukWVFG7eIC5UdMq5GHnTepzdOmpAWhi 2AHifdgdWavfijRADAt79zRIkqBc4Qh7ihUikd8fg/KWX9pMHF3TnjC1i1GN/Qtl yJohnKeGWC/dzA4UTjb5UmdAsL6FTGLIJYbO1sha2xKX3SpQHr0iEF6xkbfBcWik OvOYbLcB2EJ7KhaAOuq1qwOIYsUv7vQjKw4DyWh714EGQQ0OOLv8bPEpm1qSwCuv XqJvi+zTEYvKnFCK6jRY7QwW+pr+915k8b2bjpiI5xMxXV9VHtchpRkLu/dqT1k= =Ur3L -----END PGP SIGNATURE----- --=-=-=--