[Top][All Lists]

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

Re: [O] angle brackets around timestamps in html export

From: Matt Price
Subject: Re: [O] angle brackets around timestamps in html export
Date: Tue, 3 Sep 2013 09:40:45 -0400

On Tue, Sep 3, 2013 at 9:01 AM, Nicolas Goaziou <address@hidden> wrote:
> Hello,
> Matt Price <address@hidden> writes:
>> I'm trying to get rid of angle brackets in HTML export.  I've set
>> org-export-date-timestamp-format to "%a, %b %d".
> This variable only applies to a timestamp specified in DATE keyword.
>> I also have timestamp overlays turned on, and the displayed custom
>> format set to "<%a, %b %d>" (that seems unlikely to be relevant, but
>> I've changed it just in case).
> This should work with:
>   - `org-display-custom-times' set to t
>   - `org-time-stamp-custom-formats' set to a cons cell with values
>     without angle brackets.
> These variables can be buffer-local.

Hmm.  I have org-diplay-custom-times set to t.
org-time-stamp-custom-formats is customized:
org-time-stamp-custom-formats is a variable defined in `org.el'.
Its value is (" %a, %b. %d " . "<%m/%d/%y %a %H:%M>")
Original value was
("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>")

On html export, the following is generated:
<span class="timestamp-wrapper"><span class="timestamp">&lt;Tue, Sep.

so it looks like it's difficult to remove the brackets with those two

>> Sorry I can't find the answer in the docs, I'm sure it's there
>> somewhere but I'm missing it somehow!
> You can also use a filter on every timestamp exported and make sure any
> angle bracket is removed.

I was able to add this bit of javascript to my wordpress site to
remove the brackets:
     var elements = document.getElementsByClassName("timestamp");
for (var i = 0; i < elements.length; ++i) {
    console.log("removing timestamp");
  elements[i].innerHTML =
Is that what you mean by a filter, or should I be doing something in emacs.

thank you Nicolas!
> Regards,
> --
> Nicolas Goaziou

reply via email to

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