From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bala Ramadurai Subject: help with sexp in org-capture-template Date: Wed, 1 Apr 2020 10:40:50 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e8986d05a233b57c" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58837) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJVeb-00053T-S0 for emacs-orgmode@gnu.org; Wed, 01 Apr 2020 01:11:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJVea-0002xt-Nx for emacs-orgmode@gnu.org; Wed, 01 Apr 2020 01:11:05 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:36617) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJVea-0002vc-Iy for emacs-orgmode@gnu.org; Wed, 01 Apr 2020 01:11:04 -0400 Received: by mail-qt1-x833.google.com with SMTP id m33so20652923qtb.3 for ; Tue, 31 Mar 2020 22:11:04 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --000000000000e8986d05a233b57c Content-Type: text/plain; charset="UTF-8" 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 --000000000000e8986d05a233b57c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello All,
=C2=A0 H= ope 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*: %(con= cat (substring (org-read-date nil nil "+30d") 8 10) "-"= (substring(org-read-date nil nil "+30d") 5 7) "-" (sub= string(org-read-date nil nil "+30d") 0 4)) |

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

C= an any of you please help me in making this code better?

Thanks and have a safe day!
Bala
--000000000000e8986d05a233b57c--