all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Time stamped TODOs with current-time from everywhere.
@ 2017-08-04 17:26 Michaël Cadilhac
  2017-08-05  2:27 ` Adam Porter
  0 siblings, 1 reply; 4+ messages in thread
From: Michaël Cadilhac @ 2017-08-04 17:26 UTC (permalink / raw)
  To: emacs-orgmode

Hi there people;

I have a few TODO templates of the form:

          ("td" "Todo deadline (with reminders)" entry
           (file "~/org/todos.org")
           "* TODO %^{Todo}\n DEADLINE: %^t\n %U\n%i%?")

The goal is to have two time stamps: an inactivated one (%U),
recording the time the TODO was created, and a queried time (%^t), for
the deadline.  If I'm just out of the blue thinking of a TODO, I can
easily add it this way.

However, suppose I'm in Calfw; I jump to some date, hit SPACE and I'm
now in Org-Agenda mode, ready to hit k to capture (because Calfw-Org
does not offer this directly).  Now I expect %U to still be the
current time stamp, and %^t to be prefilled with the date of the
Agenda.  It so happens that *both* time stamps are the one of the
Agenda.  Is this tweakable so that %U is always (current-time)?

Thanks!

Cheers;
Michaël

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Time stamped TODOs with current-time from everywhere.
  2017-08-04 17:26 Time stamped TODOs with current-time from everywhere Michaël Cadilhac
@ 2017-08-05  2:27 ` Adam Porter
  2017-08-05  9:59   ` Michaël Cadilhac
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Porter @ 2017-08-05  2:27 UTC (permalink / raw)
  To: emacs-orgmode

Michaël Cadilhac <michael@cadilhac.name> writes:

> However, suppose I'm in Calfw; I jump to some date, hit SPACE and I'm
> now in Org-Agenda mode, ready to hit k to capture (because Calfw-Org
> does not offer this directly).  Now I expect %U to still be the
> current time stamp, and %^t to be prefilled with the date of the
> Agenda.  It so happens that *both* time stamps are the one of the
> Agenda.  Is this tweakable so that %U is always (current-time)?

I'm not sure if that's a bug, since it seems like %^t should always
prompt, or if it's intended that the agenda date fulfill the prompt.
But either way, you should be able to use a %(sexp) form in the capture
template to insert the current date.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Time stamped TODOs with current-time from everywhere.
  2017-08-05  2:27 ` Adam Porter
@ 2017-08-05  9:59   ` Michaël Cadilhac
  2017-08-05 10:46     ` Adam Porter
  0 siblings, 1 reply; 4+ messages in thread
From: Michaël Cadilhac @ 2017-08-05  9:59 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

On 5 August 2017 at 04:27, Adam Porter <adam@alphapapa.net> wrote:
> Michaël Cadilhac <michael@cadilhac.name> writes:
>
>> However, suppose I'm in Calfw; I jump to some date, hit SPACE and I'm
>> now in Org-Agenda mode, ready to hit k to capture (because Calfw-Org
>> does not offer this directly).  Now I expect %U to still be the
>> current time stamp, and %^t to be prefilled with the date of the
>> Agenda.  It so happens that *both* time stamps are the one of the
>> Agenda.  Is this tweakable so that %U is always (current-time)?
>
> I'm not sure if that's a bug, since it seems like %^t should always
> prompt, or if it's intended that the agenda date fulfill the prompt.
> But either way, you should be able to use a %(sexp) form in the capture
> template to insert the current date.

Thanks for your expertise Adam.  It seems indeed that
org-agenda-capture (or equivalently, setting
org-capture-use-agenda-date) affects the default date at all stages,
i.e., for %u and for the default value of %^t.  This is done through
setting org-overriding-default-time.  I don't think there's any reason
to change this behavior, but it may be worth adding that info in
org-capture-template's docstring.  At the moment, it only says "time
stamp".

Cheers;
M.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Time stamped TODOs with current-time from everywhere.
  2017-08-05  9:59   ` Michaël Cadilhac
@ 2017-08-05 10:46     ` Adam Porter
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Porter @ 2017-08-05 10:46 UTC (permalink / raw)
  To: emacs-orgmode

Michaël Cadilhac <michael@cadilhac.name> writes:

> Thanks for your expertise Adam.  

Glad I could help, but I think you did the sleuthing here.  ;)

> It seems indeed that org-agenda-capture (or equivalently, setting
> org-capture-use-agenda-date) affects the default date at all stages,
> i.e., for %u and for the default value of %^t.  This is done through
> setting org-overriding-default-time.  I don't think there's any reason
> to change this behavior, but it may be worth adding that info in
> org-capture-template's docstring.  At the moment, it only says "time
> stamp".

If you could send a TINYCHANGE patch to the docstring, I'm sure Nicolas
would be grateful!  :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-05 10:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 17:26 Time stamped TODOs with current-time from everywhere Michaël Cadilhac
2017-08-05  2:27 ` Adam Porter
2017-08-05  9:59   ` Michaël Cadilhac
2017-08-05 10:46     ` Adam Porter

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.