emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: Bruno Barbier <brubar.cs@gmail.com>
Cc: Uwe Brauer <oub@mat.ucm.es>, emacs-orgmode@gnu.org
Subject: Re: export to html, colored dates: org-mime export works but org to html does not
Date: Sat, 11 Feb 2023 10:07:51 +0100	[thread overview]
Message-ID: <87ttzsvac8.fsf@mat.ucm.es> (raw)
In-Reply-To: 63e757b0.050a0220.88abf.16a2@mx.google.com

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

>>> "BB" == Bruno Barbier <brubar.cs@gmail.com> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
> ..

>> (add-to-list 'org-export-filter-plain-text-functions 'my-html-red)
> ..

>> But if I have 
>> #<2023-02-11>#
>> in an org file and export it to html, no color is added to the timestamp.
>> 
>> I don't know how to debug this.
>> 
>> Any idea?

> In org, "<2023-02-11>" is a date, not plain text. Thus, your function
> doesn't get called with a text matching your date.

> Note that using macros, you could get almost what you want. 

> #+MACRO: IDATE @@html:<span style="color: red">$1</span>@@

> {{{IDATE(<2023-02-11>)}}}

> And maybe ther is a way to also customize date format to get rid of the
> brackets.

Thanks, did you test it?
I am asking because for me 

#+LANGUAGE: 
#+EXPORT_FILE_NAME: /home/oub/Desktop/testdate.html
#+OPTIONS: toc:nil  
#+HTML_HEAD_EXTRA: <style> body {font-size:150%}</style>
#+MACRO: IDATE @@html:<span style="color: red">$1</span>@@

* Title {{{<2023-02-11>}}}
{{{(<2023-02-11>)}}}


Does not work when exporting to html, and I have recent developer org
version installed

Uwe 
-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2023-02-11  9:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11  8:27 export to html, colored dates: org-mime export works but org to html does not Uwe Brauer
2023-02-11  8:54 ` Bruno Barbier
2023-02-11  9:07   ` Uwe Brauer [this message]
2023-02-11  9:58     ` Ihor Radchenko
2023-02-11 10:16       ` Uwe Brauer
2023-02-11 10:34         ` Ihor Radchenko
2023-02-11 11:08           ` Uwe Brauer
2023-02-11 11:41             ` Ihor Radchenko
     [not found]               ` <8846480D-F028-4660-B3E8-26FF99F54F23@mat.ucm.es>
2023-02-11 14:13                 ` Ihor Radchenko
2023-02-11 14:20                   ` Uwe Brauer
2023-02-11 10:05     ` Bruno Barbier

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=87ttzsvac8.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=brubar.cs@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).