unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnu.org>
To: "Stéphane Travostino" <stephane.travostino@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Rendering buffer to HTML from command line script
Date: Fri, 05 Aug 2016 21:10:51 +0200	[thread overview]
Message-ID: <877fbvowuc.fsf@zigzag.favinet> (raw)
In-Reply-To: <CAPnpZcCAuR8fRVOkV1LDH58oJyb-SrXYjYY_59pzYC4y2vjnbQ@mail.gmail.com> ("Stéphane Travostino"'s message of "Sat, 20 Feb 2016 17:20:29 +0000")

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

() Stéphane Travostino <stephane.travostino@gmail.com>
() Sat, 20 Feb 2016 17:20:29 +0000

   For example: (defface 'foo (((min-colors 88) (class color) etc.))

   If I modify the theme to disable these terminal requirements
   options, htmlfontify renders correctly.

Did you try to set a terminal that has fulfills those
requirements?  You can use ‘toe -a’:

 $ toe -a
 dumb            80-column dumb tty
 pcansi          ibm-pc terminal programs claiming to be ansi
 ansi            ansi/pc-term compatible with color
 rxvt-unicode    rxvt-unicode terminal (X Window System)
 rxvt            rxvt terminal emulator (X Window System)
 [...]

to find a name, such as ‘foo’ and then:

 $ TERM=foo emacs -q -Q --batch \
      -eval '(message "%s" (getenv "TERM"))'
 foo

The basic technique lies in the ‘TERM=foo’ portion of the
command, prior to the executable name (in this case, "emacs").
This sets the environment variable ‘TERM’ only for that process.
Maybe Emacs will consult the env var and DTRT for your
application.

Another (better) idea, from browsing ‘emacs --help’, is to use:

--color, --color=MODE     override color mode for character terminals;
                            MODE defaults to `auto', and
                            can also be `never', `always',
                            or a mode name like `ansi8'

which, being explicitly documented as character terminal
support, should have a higher probability of success.

-- 
Thien-Thi Nguyen -----------------------------------------------
  (if you're human and you know it) read my lisp:
    (defun responsep (type via)
      (case type
        (technical (eq 'mailing-list via))
        ...))
---------------------------------------------- GPG key: 4C807502

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2016-08-05 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-20 17:20 Rendering buffer to HTML from command line script Stéphane Travostino
2016-08-05 19:10 ` Thien-Thi Nguyen [this message]
     [not found] <mailman.5246.1456006059.843.help-gnu-emacs@gnu.org>
2016-02-24 20:41 ` Gene

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fbvowuc.fsf@zigzag.favinet \
    --to=ttn@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=stephane.travostino@gmail.com \
    /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.
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).