emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] html-email in org-mode


From: Eric Brown
Subject: Re: [O] html-email in org-mode
Date: Tue, 01 Nov 2016 06:58:44 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix)

John Kitchin <address@hidden> writes:

> Do you mean monospace in the whole html message, e.g. something like Courier?
>
> Or just in a table? I do not think you can control the font in plain
> text emails.
>
> You can set the font in the td elements of a table like this (I used
> cursive because it was easy to see.
>
> #+BEGIN_SRC emacs-lisp
> (defun italicize-table (data backend info)
>   (with-temp-buffer
>     (insert data)
>     (goto-char (point-min))
>     (while (re-search-forward "<td" nil t)
>       (replace-match "<td style=\"font-family:cursive;\""))
>     (message"got %s" (buffer-string))
>     (buffer-string)))
>
>
> (add-to-list 'org-export-filter-table-functions 'italicize-table)
> #+END_SRC
>
> After you run that, the tables in html have italicized/cursive elements
> in them. And probably all other exports to html too ;)
>

Thanks, this is extremely useful, as well.  In retrospect, I think my
question may be a bit moot, as the HTML formatting would probably allow
tables to remain aligned regardless of length of any one cell.

My comment was motivated by other usage where I wish that I could simply
wrap an entire simple text, whitespace-formatted email message,
e.g. generated from org export to a plain text buffer, with a Monospace
directive so that webmail users could appreciate what I see with Sans
Mono.



reply via email to

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