From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Remember templates and time stamp rounding. Date: Fri, 17 Mar 2006 08:28:51 +0100 Message-ID: <7cf02f796be26d1c55a294fb6626051f@science.uva.nl> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FK9OL-0001Au-Nq for emacs-orgmode@gnu.org; Fri, 17 Mar 2006 02:28:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FK9OK-0001Ai-M0 for emacs-orgmode@gnu.org; Fri, 17 Mar 2006 02:28:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FK9OK-0001Af-HF for emacs-orgmode@gnu.org; Fri, 17 Mar 2006 02:28:56 -0500 Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FK9T9-0006HR-IW for emacs-orgmode@gnu.org; Fri, 17 Mar 2006 02:33:55 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I have put a new test version of org.el onto my site, version 4.11a: http://www.astro.uva.nl/~dominik/Tools/org/org-test.zip This contains only org.el, no further documentation. In this test version, I have incorporates Alex' time rounding patch (in a modified version). Also there is support for templates for remember. Time-stamp rounding ------------------- The default is no rounding of time stamps. I originally thought that every place in the code using times should honor the rounding variable, but with some more thinking I now agree with Alex that it is enough to do that in the few commands that actually insert a time corresponding to the current time. That means that you can still modify times either by entering them at the time/date prompt, or by using the S-cursor keys, and these modifications will not be modified by the rounding setting. One change I added is that if you use a double C-u for a time stamp command, then the default time is exact, not rounded. In this way you can use rounded times most of the time, but still get an exact time if you need it. Thanks to Alex for the patch (and also for the bug fix in org-read-date, in the string-replacement...). Remember templates ------------------ To activate the templates you need, in addition to the other remember configuration, this line in .emacs: (add-hook 'remember-mode-hook 'org-remember-apply-template) If you don't set any templates, then the only change you will notice with the new code is that the remember buffer is now in org-mode, so that you can use all the org-mode commands. You need to exit with C-c C-c. Normally remember also allows C-x C-s, but this is not possible anymore in my version, for technical reasons. There is a new variable, org-remember-templates, which can be set to a list of templates to use. If you only specify a single template, it will always be used. If you specify several templates, then each time you use remember you need to hit one additional character to select a template. That is why you need to specify a selection character for each template. In the template you can use several % escape sequences to insert information like a time stamp, this annotation link to the original file etc, please check the documentation string of `org-remember-templates' for the full list. Following the discussion here, I am providing 2 examples: ;; Template for Charles Cave's journal file. (setq org-remember-templates '((?j . "* Topic: %T %?\n"))) ;; Templates for Philip Rooke, journal and TODO with a deadline of today (setq org-remember-templates '((?j . "* %U %?\n %i\n\n %a") (?t . "* TODO %?\n DEADLINE: %T\n %i\n\n %a"))) I think this might be a flexible way to set things up. Give it a try and let us know what additional % escapes and/or other changes you think would be useful. - Carsten -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477