From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Export: Override headline numbering via properties Date: Mon, 13 May 2013 12:54:36 +0200 Message-ID: <87hai7taj7.fsf@gmail.com> References: <87ppwvtnbw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbqP2-0006kf-AE for emacs-orgmode@gnu.org; Mon, 13 May 2013 06:54:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbqOy-0000X4-TK for emacs-orgmode@gnu.org; Mon, 13 May 2013 06:54:48 -0400 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:43740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbqOy-0000Wt-OE for emacs-orgmode@gnu.org; Mon, 13 May 2013 06:54:44 -0400 Received: by mail-wg0-f47.google.com with SMTP id e11so6282616wgh.14 for ; Mon, 13 May 2013 03:54:43 -0700 (PDT) In-Reply-To: (Mark Edgington's message of "Mon, 13 May 2013 05:42:52 -0400") 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: Mark Edgington Cc: emacs-orgmode@gnu.org Hello, Mark Edgington writes: > A couple possible use-cases: > > 1. a document (or chapter of a document) where the first headline > contains general "introduction" information explaining what the rest > of the document (chapter) is about (similar to an abstract, but not > identical -- something that might contain sub-headings, lists, tables, > etc.), and the remainder of the document (chapter) is the "real" > content of the document -- the place where you want the numbering to > begin. You can still number these parts manually with, e.g., #+latex: \section*{Introduction} before the first section in your Org document. > 2. a document where only one of the headlines and its child-headlines > halfway through the document should be un-numbered (maybe they > represent an "example docoument" embedded within an > instruction-manual). I may be wrong, but this sounds like a hypothetical use case to me. Anyway, your patch will not work on back-ends that rely on Org to compute section numbers (e.g., ascii, html...) because even if you ignore numbering for a particular headline, it still adds up internally. IOW, you also need to patch `org-export--collect-headline-numbering'. But that's not quite it, yet. Some back-ends (e.g., html) use that internal number as a unique identifier for the headline. Actually, the "artificial restriction" you are talking about is a way to allow every headline to be numbered in a unique way, even if that number doesn't appear in the output. Therefore, you need to generate a unique identifier for all headlines, a function to return it, and modify each back-end accordingly. This is obviously doable, but it cannot fit in a TINYPATCH. Since I wouldn't use this, I can hardly judge, but I would appreciate some feedback from other users before we go too far in the implementation. Regards, -- Nicolas Goaziou