emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Redshank gets loaded when exporting ELisp code blocks to HTML!?
Date: Fri, 02 May 2014 15:10:30 +0200	[thread overview]
Message-ID: <86fvksfhrt.fsf@somewhere.org> (raw)
In-Reply-To: 86bnwdrws3.fsf@sachachua.com

Hello Sacha and Nicolas,

Answering after a (too) long time with very intermittent Internet
access...

Sacha Chua wrote:
> Sebastien Vauban writes:
>
>> Why are Emacs Lisp minor modes loaded for exporting the Org document
>> to HTML?  If not necessary, this seems suboptimal (performance-wise).
>
> org-export-format-source-code-or-example loads the mode associated
> with the language in org-src-lang-modes in order to fontify the
> block.

Only to fontify, not to indent, right?

> You could check if org-export-current-backend is nil before
> loading anything that you want to use only interactively.
>
> Maybe like so?
>
>   (add-hook 'emacs-lisp-mode-hook (lambda ()
>     (unless org-export-current-backend
>       (turn-on-redshank-mode))))

This seems to be a solution (although I did not test it), but it seems
as well impractical: I'd have to chase almost all minor modes of all
languages...

Can't we assume that the major modes have all the information to fontify
the code blocks, and -- if yes -- have a manner to forbid loading all
the minor modes at once (as, then, they'd be completely useless for the
export process)?

Best regards,
  Seb

-- 
Sebastien Vauban

  reply	other threads:[~2014-05-02 13:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 14:38 Redshank gets loaded when exporting ELisp code blocks to HTML!? Sebastien Vauban
2014-04-07 15:20 ` Sacha Chua
2014-05-02 13:10   ` Sebastien Vauban [this message]
2014-04-07 15:26 ` Nicolas Goaziou
2014-04-07 15:37   ` Nicolas Goaziou

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=86fvksfhrt.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).