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