From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Re: angle brackets around timestamps in html export Date: Tue, 3 Sep 2013 09:40:45 -0400 Message-ID: References: <87d2oq3vqa.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGqqf-0001fR-Cn for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:40:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGqqd-0002If-7q for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:40:49 -0400 Received: from mail-ea0-x236.google.com ([2a00:1450:4013:c01::236]:52150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGqqc-0002IB-Mq for emacs-orgmode@gnu.org; Tue, 03 Sep 2013 09:40:46 -0400 Received: by mail-ea0-f182.google.com with SMTP id o10so3051471eaj.27 for ; Tue, 03 Sep 2013 06:40:45 -0700 (PDT) In-Reply-To: <87d2oq3vqa.fsf@gmail.com> 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Org Mode On Tue, Sep 3, 2013 at 9:01 AM, Nicolas Goaziou wrote: > Hello, > > Matt Price 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: ----- <Tue, Sep. 10> ----- so it looks like it's difficult to remove the brackets with those two variables. >> 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 = elements[i].innerHTML.replace(/(<|>|\[|\])/g,''); } --------- Is that what you mean by a filter, or should I be doing something in emacs. thank you Nicolas! Matt > > > Regards, > > -- > Nicolas Goaziou