emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [patch] Formatting of {{{DATE}}}
Date: Mon, 09 Feb 2015 01:55:06 +0100	[thread overview]
Message-ID: <87vbjbucnp.fsf@gmx.us> (raw)
In-Reply-To: <87egq0q78r.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 09 Feb 2015 01:05:40 +0100")

Hi Nicolas,

Thanks for the tips.

Pushed as 8f38f03.  I added a org-NEWS entry, but I don't know if it
should be there.  Feel free to let me know or remove it yourself if it
shouldn't.

BTW: when figuring out how the heck macros works I came across two other
undocumented macros, namely {{{input-file}}} and
{{{property(PROPERTY-NAME)}}}.  I also added those to the manual.

>   (cons "date"
>         (let* ((date (plist-get info :date))
>                (value (or (org-element-interpret-data date) "")))
>           (if (and (null (cdr date))
>                    (eq (org-element-type (car date)) 'timestamp))
>               (format "(eval (if (org-string-nw-p \"$1\") %s %S))"
>                       (format "(org-timestamp-format '%S \"$1\")"
>                               ;; Remove parent to avoid
>                               ;; read error.
>                               `(timestamp
>                                 ,(org-combine-plists
>                                   (nth 1 (car date))
>                                   '(:parent nil))))
>                       value)
>             value)))

Okay, that's cool.  I wasn't aware of %S.

> I think the later part could use an `org-element-copy' function (to be
> implemented).

Seems like it.  Perhaps next weekend!

—Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio

  reply	other threads:[~2015-02-09  0:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-08 21:16 [patch] Formatting of {{{DATE}}} Rasmus
2015-02-08 23:37 ` Nicolas Goaziou
2015-02-09  0:05   ` Nicolas Goaziou
2015-02-09  0:55     ` Rasmus [this message]
2015-02-09  8:28       ` Nicolas Goaziou

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=87vbjbucnp.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).