unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: daniela-spit@gmx.it
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Org Capture - Inserting Date and Time
Date: Sat, 28 Nov 2020 10:48:03 +0300	[thread overview]
Message-ID: <X8IAs2DXVZBDA6CO@protected.rcdrun.com> (raw)
In-Reply-To: <trinity-751cd818-851f-4907-9b94-6ba39ce89eb7-1606532304517@3c-app-mailcom-bs12>

* daniela-spit@gmx.it <daniela-spit@gmx.it> [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/rcl.org")
>            ,(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 ()
  (interactive)
  (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:
my-ask-for-meeting

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




  reply	other threads:[~2020-11-28  7:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28  2:58 Org Capture - Inserting Date and Time daniela-spit
2020-11-28  7:48 ` Jean Louis [this message]
2020-11-28  8:12 ` Jean Louis

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=X8IAs2DXVZBDA6CO@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=daniela-spit@gmx.it \
    --cc=help-gnu-emacs@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.
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).