From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Forrest Newsgroups: gmane.emacs.help Subject: Re: Journal package for Emacs? Date: Sun, 8 Sep 2002 23:22:14 -0400 (EDT) Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1031541850 3616 127.0.0.1 (9 Sep 2002 03:24:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Sep 2002 03:24:10 +0000 (UTC) Cc: Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17oF9j-0000w4-00 for ; Mon, 09 Sep 2002 05:24:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oF9j-0006hQ-00; Sun, 08 Sep 2002 23:24:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17oF9T-0006g5-00 for help-gnu-emacs@gnu.org; Sun, 08 Sep 2002 23:23:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17oF9R-0006ft-00 for help-gnu-emacs@gnu.org; Sun, 08 Sep 2002 23:23:51 -0400 Original-Received: from mug.sys.virginia.edu ([128.143.6.251]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oF9R-0006fp-00 for help-gnu-emacs@gnu.org; Sun, 08 Sep 2002 23:23:49 -0400 Original-Received: from localhost (drf5n@localhost) by mug.sys.virginia.edu (8.11.4/8.11.4) with ESMTP id g893MEX10475 for ; Sun, 8 Sep 2002 23:22:14 -0400 In-Reply-To: Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1162 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1162 On Mon, 9 Sep 2002, mike hardy wrote: ... Mike asked about having the journal open and do a time stamp, and I thought it might work with hooks, so I wrote this as a venture into learning elisp. Is this good elisp? (defun my-journal-hook () "Go to the bottom and insert a timestamp on journal files Identified with the is-journal local variable thus: -*- is-journal : t -*- " (if (local-variable-p 'is-journal) (progn (end-of-buffer) ( insert-current-time)) )) (add-hook 'find-file-hooks 'my-journal-hook) ;where insert-current-time is: (defun insert-current-time () "Insert the Current Time in ISO 8601 mode" (interactive) (insert (format-time-string "%Y-%m-%dT%T%z ") ; ISO8601 ) ) Dave -- Dave Forrest drf5n@virginia.edu (804)642-0662h (434)924-3954w http://mug.sys.virginia.edu/~drf5n/