[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Org Capture - Inserting Date and Time

From: Jean Louis
Subject: Re: Org Capture - Inserting Date and Time
Date: Sat, 28 Nov 2020 10:48:03 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* <> [2020-11-28 05:59]:
> Have posted an entry of my Org Capture Setup.  I ask for a date using %^U 
> which is
> introduced in the headline.   I would like to also put it in the field 
> "Scheduled:".
> Can this be done?
> Would like something as below
> * MEETING [2020-12-02 Wed 03:55] Walk
>   Scheduled: <2020-12-02 Wed 03:55>
>   With: Pete
>   Entered: <2020-11-28 Sat 03:55>
>  ("m" "+ Meeting" entry
>            (file "~/histr/")
>            ,(concat
>                "* MEETING %^U %^{Topic}\n"
>                "  Scheduled:\n  With: %^{With}%?\n  Entered: %T"))

I find those customizations way too complex for people who would like
to make schedule their meeting. Org is in the context of org-capture
still pretty much high level. The above setting is to me about same
level complexity as learning how to write Emacs Lisp functions.

(defun my-ask-for-meeting ()
  (let* ((date (calendar-read-date))
         (calendar-date-display-form '((format "%04.f-%02.f-%02.f"
                                               (string-to-number year)
                                               (string-to-number month)
                                               (string-to-number day))))
         (date (calendar-date-string date))
         (topic (read-from-minibuffer "Meeting for topic: "))
         (with (read-from-minibuffer "With: ")))
    (format "* MEETING %s %s
    Scheduled: %s
    With: %s
    Entered: %s

" date topic date with date)))

In the org-capture-template you can then under "Template"
enter "Function" and just name of the function:

But I think properties must appear in upper case letters like
SCHEDULED: instead of Scheduled.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]