emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Brown <brown@fastmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "Emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: html-email in org-mode
Date: Tue, 01 Nov 2016 06:58:44 -0500	[thread overview]
Message-ID: <87pomf76ob.fsf@air.ericcbrown.com> (raw)
In-Reply-To: <m2mvhlo6j2.fsf@Johns-MacBook-Air.local> (John Kitchin's message of "Sun, 30 Oct 2016 17:45:21 -0400")

John Kitchin <jkitchin@andrew.cmu.edu> 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	other threads:[~2016-11-01 11:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-29 18:37 html-email in org-mode John Kitchin
2016-10-30 14:34 ` Eric Brown
2016-10-30 15:09   ` Marcin Borkowski
2016-10-30 21:45   ` John Kitchin
2016-11-01 11:58     ` Eric Brown [this message]
2016-11-01 19:25 ` Alan Schmitt
2016-11-05  0:13   ` Matt Price
2016-11-07  2:55     ` John Kitchin
2016-11-07 15:37 ` Joseph Vidal-Rosset
  -- strict thread matches above, loose matches on Subject: below --
2016-10-30 15:44 tbanelwebmin
2016-11-01 16:10 (no subject) John Kitchin
2016-11-06  0:27 ` html-email in org-mode Eric Brown

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=87pomf76ob.fsf@air.ericcbrown.com \
    --to=brown@fastmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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).