From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josiah Schwab Subject: Customizing TOCs in Derived Exporters Date: Mon, 16 Sep 2013 13:11:47 -0700 Message-ID: <87li2wbk70.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLf9N-0007k2-Fk for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 16:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLf9F-0006mC-0W for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 16:12:01 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:37934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLf9E-0006lz-RP for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 16:11:52 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so4569777pdj.22 for ; Mon, 16 Sep 2013 13:11:51 -0700 (PDT) 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 --=-=-= Content-Type: text/plain Hi All, I'm working on writing a derived exporter and I've been using ox-md.el as a template/guide. If I use the markdown exporter to export the following org file --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=example.org * Meeting Notes ** First Topic *** Subtopic 1 + a point + an *important* point *** Subtopic 2 + another point + an /interesting/ point ** Second Topic One long announcement without any particular structure. --=-=-= Content-Type: text/plain an html table of contents appears at the top of the exported file. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=example.md # Meeting Notes ## First Topic ### Subtopic 1 - a point - an **important** point ### Subtopic 2 - another point - an *interesting* point ## Second Topic One long announcement without any particular structure. --=-=-= Content-Type: text/plain How does one go about overriding org-html-toc, which unlike something like org-html-bold, does not appear in org-export-define-backend? I don't want the TOC not to appear, rather want it to be generated by another function, org-md-toc or what have you. Thanks, Josiah --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Customizing TOCs in Derived Exporters Date: Tue, 17 Sep 2013 15:49:08 +0200 Message-ID: <8738p3tv6z.fsf@gmx.us> References: <87li2wbk70.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLvei-0004fq-Kw for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 09:49:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLvea-0001D7-Ml for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 09:49:28 -0400 Received: from plane.gmane.org ([80.91.229.3]:46547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLvea-0001Cx-EJ for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 09:49:20 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VLveZ-0002Ne-2i for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 15:49:19 +0200 Received: from 192.167.90.140 ([192.167.90.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Sep 2013 15:49:19 +0200 Received: from rasmus by 192.167.90.140 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Sep 2013 15:49:19 +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: emacs-orgmode@gnu.org Hi Josiah, Josiah Schwab writes: > How does one go about overriding org-html-toc, which unlike something > like org-html-bold, does not appear in org-export-define-backend? I > don't want the TOC not to appear, rather want it to be generated by > another function, org-md-toc or what have you. I'm not sure whether this would work with md simply 'cause I haven't worked with the html+friends exporter(s), but perhaps you could replace the inner-template, i.e. write a replacement for org-html-inner-template. –Rasmus -- Together we'll stand, divided we'll fall From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josiah Schwab Subject: Re: Customizing TOCs in Derived Exporters Date: Wed, 18 Sep 2013 14:15:58 -0700 Message-ID: <87a9j9esq9.fsf@gmail.com> References: <87li2wbk70.fsf@berkeley.edu> <8738p3tv6z.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMP6R-0007vz-Bv for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 17:16:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMP6P-0006vR-Qu for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 17:16:03 -0400 Received: from mail-pb0-x22b.google.com ([2607:f8b0:400e:c01::22b]:56122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMP6P-0006vE-Jc for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 17:16:01 -0400 Received: by mail-pb0-f43.google.com with SMTP id md4so7518279pbc.30 for ; Wed, 18 Sep 2013 14:16:00 -0700 (PDT) In-reply-to: <8738p3tv6z.fsf@gmx.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: Rasmus Cc: emacs-orgmode@gnu.org Rasmus writes: > Josiah Schwab writes: > >> How does one go about overriding org-html-toc, which unlike something >> like org-html-bold, does not appear in org-export-define-backend? I >> don't want the TOC not to appear, rather want it to be generated by >> another function, org-md-toc or what have you. > > I'm not sure whether this would work with md simply 'cause I haven't > worked with the html+friends exporter(s), but perhaps you could > replace the inner-template, i.e. write a replacement for > org-html-inner-template. Yes, this suggestion worked for me. Thank you for the advice. Little by little I will come to understand the new exporter (not that I understood the old one). Independent of the confusion it caused me while trying to figure out how things work, it seems strange that the ox-md exporter generates a non-markdown TOC using org-html-toc. But I will leave that for those who really use the markdown exporter, which is neither you or me. Best, Josiah From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Customizing TOCs in Derived Exporters Date: Thu, 19 Sep 2013 00:12:49 +0200 Message-ID: <87y56tsrry.fsf@gmx.us> References: <87li2wbk70.fsf@berkeley.edu> <8738p3tv6z.fsf@gmx.us> <87a9j9esq9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMPzd-0007lL-Rh for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 18:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMPzR-0006hD-L9 for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 18:13:05 -0400 Received: from mout.gmx.net ([212.227.17.22]:65463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMPzR-0006h1-C6 for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 18:12:53 -0400 Received: from pank ([94.34.240.188]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MMBun-1VHDKh2Q3B-007ydO for ; Thu, 19 Sep 2013 00:12:50 +0200 In-Reply-To: <87a9j9esq9.fsf@gmail.com> (Josiah Schwab's message of "Wed, 18 Sep 2013 14:15:58 -0700") 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: jschwab@gmail.com Cc: emacs-orgmode@gnu.org Josiah Schwab writes: > Rasmus writes: > >> Josiah Schwab writes: >> >>> How does one go about overriding org-html-toc, which unlike something >>> like org-html-bold, does not appear in org-export-define-backend? I >>> don't want the TOC not to appear, rather want it to be generated by >>> another function, org-md-toc or what have you. >> >> I'm not sure whether this would work with md simply 'cause I haven't >> worked with the html+friends exporter(s), but perhaps you could >> replace the inner-template, i.e. write a replacement for >> org-html-inner-template. > > Yes, this suggestion worked for me. Thank you for the advice. Little > by little I will come to understand the new exporter (not that I > understood the old one). > > Independent of the confusion it caused me while trying to figure out how > things work, it seems strange that the ox-md exporter generates a > non-markdown TOC using org-html-toc. But I will leave that for those > who really use the markdown exporter, which is neither you or me. Is there a vanilla-markdown TOC-keyword? My understanding is that markdown always understand plain html, whence the html-toc is reusable. If there is exists a vanilla-markdown TOC perhaps it should be used. =E2=80=93Rasmus --=20 Dung makes an excellent fertilizer From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josiah Schwab Subject: Re: Customizing TOCs in Derived Exporters Date: Wed, 18 Sep 2013 15:53:37 -0700 Message-ID: <874n9heo7i.fsf@gmail.com> References: <87li2wbk70.fsf@berkeley.edu> <8738p3tv6z.fsf@gmx.us> <87a9j9esq9.fsf@gmail.com> <87y56tsrry.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMQcv-00058n-U1 for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 18:53:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMQcv-0001H7-0w for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 18:53:41 -0400 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]:46458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMQcu-0001Gz-Q1 for emacs-orgmode@gnu.org; Wed, 18 Sep 2013 18:53:40 -0400 Received: by mail-pa0-f45.google.com with SMTP id bg4so8856712pad.18 for ; Wed, 18 Sep 2013 15:53:39 -0700 (PDT) In-reply-to: <87y56tsrry.fsf@gmx.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: Rasmus Cc: emacs-orgmode@gnu.org Rasmus writes: > Josiah Schwab writes: >> Independent of the confusion it caused me while trying to figure out how >> things work, it seems strange that the ox-md exporter generates a >> non-markdown TOC using org-html-toc. But I will leave that for those >> who really use the markdown exporter, which is neither you or me. > > Is there a vanilla-markdown TOC-keyword? My understanding is that > markdown always understand plain html, whence the html-toc is > reusable. If there is exists a vanilla-markdown TOC perhaps it should > be used. It sounds likely this is simply a confusion about the markdown specification on my end then. Thanks, Josiah