From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cook, Malcolm" Subject: Re: ox-html HOWTO? exporting #+RESULTS inside div Date: Fri, 6 Nov 2015 19:45:50 +0000 Message-ID: <791733313b1f4448bf69bde84a0f45ca@exchsrv2.sgc.loc> References: , <1445494436616.55293@stowers.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZumxU-0005PT-NM for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 14:46:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZumxP-0007u8-NI for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 14:46:00 -0500 Received: from smtp01.stowers.org ([40.141.174.61]:51641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZumxP-0007ty-H3 for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 14:45:55 -0500 In-Reply-To: Content-Language: en-US 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: "'Charles C. Berry'" Cc: "emacs-orgmode@gnu.org" > > Charles, Thanks again for you suggestion. Alas, using 'header-args > >:wrap org-results-container' has the unforeseen (by me) side effect > >of masking my use of `#+ATTR_HTML :class dataTable` on selected > >exported tables (which I use to allow for search/sortable/scrollable > >tables). Now, the ':class dataTable' attribute is placed on the new > >
instead of the with undesired outcome. >=20 > > Do you have any thoughts on how to accomplish both my goals (apply > > :class table to selected results, and making ALL results be > > addressable using javascript. FYI - My application is to hide all > > source blocks on html open. Clicking on a source block caption > > shows the source. This provides an HTML view that hides the source > > until desired. My recipients of such analysis write-ups really like > > this. >=20 > [snip] >=20 > > # #+PROPERTY: header-args :wrap org-results-container > > # >=20 > This creates a special block and attributes on the results will apply > to it - not its contents. >=20 > What you want can be obtained by creating a different special block > and then applying a filter. So, wrap like this >=20 > #+PROPERTY: header-args :wrap org-results-container-to-filter >=20 > and add a filter to `org-export-filter-special-block-functions' that > strips the 'to-filter' and adds the `dataTable' where it is needed. Hi Charles - ok - you've got me looking at ox aspects I've not yet explored= .... good! If I understand your suggestion, the filter you propose would need to someh= ow "know" which tables I desire to be adorned with `class :dataTable`. How do you reckon I might declare that? Upon reflection, I wonder if following source block header syntax might rat= her be considered "in the spirit of things" and worthy of implementation: =09 #+begin_src R :exports value table :prefix '#+attr_html :class dataTable' which would be interpreted by ob-sbe (somehow) to emit and #+attr_html :class dataTable Immediately prior to the #+results, all of which might be further :wrapped. Or am I putting the cart before the horse? Reminder (in part to self): my goal is two-fold=20 (a) declare to the ox-html exporter a :class (i.e. dataTable) to adorn sel= ected exported results tables (b) have a means of addressing the exported html results of a code block a= llowing to conditionally hide or expose it (i.e. toggle exposure when user = click on the export source code. This is what "> #+PROPERTY: header-args := wrap org-results-container" provided for me, except that the introduction o= f the new
was blocking my means of doing (a) Cheers, Malcolm >=20 > HTH, >=20 > Chuck