emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: emacs-orgmode@gnu.org
Subject: Remember templates and time stamp rounding.
Date: Fri, 17 Mar 2006 08:28:51 +0100	[thread overview]
Message-ID: <7cf02f796be26d1c55a294fb6626051f@science.uva.nl> (raw)

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

             reply	other threads:[~2006-03-17  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17  7:28 Carsten Dominik [this message]
2006-03-17  8:02 ` Remember templates and time stamp rounding Alex Bochannek
     [not found]   ` <ff7823fe9c92fcb41c9a3b45b6949ecd@science.uva.nl>
2006-03-17 18:40     ` Alex Bochannek
2006-03-19 22:23 ` Philip Rooke
2006-03-20 13:24   ` Jason F. McBrayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cf02f796be26d1c55a294fb6626051f@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).