From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Redshank gets loaded when exporting ELisp code blocks to HTML!? Date: Mon, 07 Apr 2014 17:26:30 +0200 Message-ID: <874n25jh3t.fsf@gmail.com> References: <86fvlpryql.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXBRV-0007Ys-IM for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 11:26:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXBRM-00006Y-Am for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 11:26:37 -0400 Received: from plane.gmane.org ([80.91.229.3]:43594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXBRM-00006T-3u for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 11:26:28 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WXBRI-0008UC-Q6 for emacs-orgmode@gnu.org; Mon, 07 Apr 2014 17:26:24 +0200 In-Reply-To: <86fvlpryql.fsf@somewhere.org> (Sebastien Vauban's message of "Mon, 07 Apr 2014 16:38:26 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Hello, Sebastien Vauban writes: > What I don't understand is: > > Why are Emacs Lisp minor modes loaded for exporting > the Org document to HTML? As a final filter, `set-auto-mode' is called in order to indent the buffer properly. See `org-html-final-function'. When the major mode switch happens, all associated minor modes are installed. It also happens when exporting to a temporary buffer. Of course, this doesn't explain why Emacs lisp minor modes are attached to an HTML buffer. I guess there is something funny happening with `set-auto-mode'. > If not necessary, this seems suboptimal (performance-wise). > > Is it really necessary? Not really. We could be more careful when generating code, i.e., we could generate code already indented. Another option is to change major mode only when `org-html-indent' is non-nil. > So, is there a way to disactivate those minor modes during export? Not at the moment. Regards, -- Nicolas Goaziou