From mboxrd@z Thu Jan 1 00:00:00 1970 From: phillip.lord@russet.org.uk (Phillip Lord) Subject: Re: Adding new switch or header Date: Tue, 03 Nov 2015 21:57:49 +0000 Message-ID: <87r3k6vj8i.fsf@russet.org.uk> References: <87r3k7xen4.fsf@russet.org.uk> <87d1vrhvf4.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtjaX-0006Tl-RO for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 16:57:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtjaT-0006ck-QK for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 16:57:57 -0500 Received: from cheviot12.ncl.ac.uk ([128.240.234.12]:57896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtjaT-0006ce-Kk for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 16:57:53 -0500 Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot12.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1ZtjaQ-0005R0-AA for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 21:57:50 +0000 Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1ZtjaP-0003fW-W5 for emacs-orgmode@gnu.org; Tue, 03 Nov 2015 21:57:50 +0000 In-Reply-To: <87d1vrhvf4.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Tue, 3 Nov 2015 16:58:23 +0000") 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: emacs-orgmode@gnu.org Eric S Fraga writes: > On Tuesday, 3 Nov 2015 at 15:54, Phillip Lord wrote: >> I am trying to implement a new backend based on the HTML export. I need >> to do some post-processing to the source blocks that needs to be >> optional. For some blocks I need to replace "[" with "\[" and for some I >> don't. >> >> I am not sure whether to use headers or switches. > > What about neither? Maybe something along #+ATTR_XXX: instead, where > XXX is the name of your derived backend, along the lines of ATTR_HTML > and ATTR_LATEX? > > Others may tell us that my suggestion is worse but I think playing > around with the babel syntax is asking for trouble... That's a good call, I think. The latex example is very clear, so I've got that implemented now. Are these form of attributes specific to the source block which they precede? Or is it possible to do any kind of inheritance with them? For my use case, all the code blocks inside a Header One block will behave in the same way (either with \[ escaping or without). Not a major problem if not, I can template it if not, but useful to know. Phil