From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Should comments break paragraphs? Date: Wed, 17 Jul 2013 14:57:13 +0200 Message-ID: <878v15jqdy.fsf@bzg.ath.cx> References: <51E443F6.2050104@arfer.net> <87mwpnfybn.fsf@gmail.com> <51E47BC1.7010808@gmail.com> <87ip0byoqg.fsf@gmail.com> <87fvvev771.fsf@gmail.com> <87wqoqxznb.fsf@gmail.com> <87ppuitp8y.fsf@gmail.com> <87sizexuj9.fsf@gmail.com> <87li55lpqd.fsf@bzg.ath.cx> <87mwplk645.fsf@gmail.com> <87fvvdk3es.fsf@bzg.ath.cx> <87ip09k1d4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRIH-0006ON-It for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 08:57:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzRIE-0002An-4R for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 08:57:21 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:58670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRID-0002Ab-Ud for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 08:57:18 -0400 Received: by mail-wg0-f52.google.com with SMTP id b12so1751218wgh.7 for ; Wed, 17 Jul 2013 05:57:17 -0700 (PDT) In-Reply-To: <87ip09k1d4.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 17 Jul 2013 11:00:07 +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: Nicolas Goaziou Cc: Christian Wittern , emacs-orgmode@gnu.org, Eric Schulte Nicolas Goaziou writes: > 1. an item > # a normal line breaking the list > 1. an item in another list > > but, upon exporting, both items will belong to the same list. This is > just nonsensical. Users who want comments to be equivalent to empty lines will not write the above. If they do, it's their responsability. >> A simple (setq org-export-ignore-comments t) would put the user in >> the second situation, where comments are deleted before parsing and >> exporting, and treated as standard citizens when manipulating or >> buffers. (Eric's patch goes into that direction.) > > And the direction is wrong... Parsing shouldn't modify the buffer being > parsed, ever. But you can use a hook for that purpose. I didn't suggest that parsing should modify the before: I said "where comments are deleted before parsing and exporting". There should be an easy solution for that. >> Then (setq org-export-ignore-comments nil) would put us in the first >> situation, which is the current one, where comments are defines as >> elements within Org syntax, with some constraints when parsing or >> exporting them (such as separating a paragraph.) >> >> What do you think? > > I still think the same. Comments belong to Org syntax (if they don't, > you can't even fill them correctly, for example). If you redefine them, > there's no easy workaround. I didn't suggest to redefine comments. > You have to change every part of Org that > assumes there will be no comment in its way (lists, agenda, babel, > parser and probably more I can't think of). > > If it's an HTML/ODT export issue, it's far easier to patch the export > back-ends instead. 10 lines of code in each one, maybe. This is a general pre-export issue, it does not depend on the exporters themselves. So again, what prevents us to make it easy for users to treat comments as no-line before parsing and exporting? -- Bastien