emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bala Ramadurai <nikimonikado@gmail.com>
To: emacs-orgmode@gnu.org
Subject: help with sexp in org-capture-template
Date: Wed, 1 Apr 2020 10:40:50 +0530	[thread overview]
Message-ID: <CABp2F2aro=kiN2NDC6gRHWjQVWoRspC2WcFB6CR1Cz3yS8yBkg@mail.gmail.com> (raw)
In-Reply-To: <mailman.57.1585670407.11838.emacs-orgmode@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 567 bytes --]

Hello All,
  Hope everyone's safe.

I am working on a org-capture-template and one of the entries is a date (30
days later) I want in European format.

My solution is this:
| *Due Date*: %(concat (substring (org-read-date nil nil "+30d") 8 10) "-"
(substring(org-read-date nil nil "+30d") 5 7) "-" (substring(org-read-date
nil nil "+30d") 0 4)) |

Although this does the job, it is extremely inelegant and only reflects my
poor knowledge in elisp.

Can any of you please help me in making this code better?

Thanks and have a safe day!
Bala

http://balaramadurai.net

[-- Attachment #2: Type: text/html, Size: 1107 bytes --]

       reply	other threads:[~2020-04-01  5:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.57.1585670407.11838.emacs-orgmode@gnu.org>
2020-04-01  5:10 ` Bala Ramadurai [this message]
2020-04-05 20:36   ` help with sexp in org-capture-template Kyle Meyer

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='CABp2F2aro=kiN2NDC6gRHWjQVWoRspC2WcFB6CR1Cz3yS8yBkg@mail.gmail.com' \
    --to=nikimonikado@gmail.com \
    --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).