From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Should comments break paragraphs? Date: Wed, 17 Jul 2013 10:15:55 +0200 Message-ID: <87fvvdk3es.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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzMu5-0006rF-PJ for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 04:16:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzMu0-00029N-MZ for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 04:16:05 -0400 Received: from mail-we0-x230.google.com ([2a00:1450:400c:c03::230]:44006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzMu0-000295-Hm for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 04:16:00 -0400 Received: by mail-we0-f176.google.com with SMTP id t56so1458742wes.21 for ; Wed, 17 Jul 2013 01:15:59 -0700 (PDT) In-Reply-To: <87mwplk645.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 17 Jul 2013 09:17:30 +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 Cc: Christian Wittern , emacs-orgmode@gnu.org, Eric Schulte Hi Nicolas, Nicolas Goaziou writes: >> I think everyone agrees that comments are an important part of Org. > > Then I, for one, am not in the "everyone" part. FWIW, I think comments > are a minor part of Org and that we're just bikeshedding. Perhaps "part" is not the right word here. The way to know whether comments are important or not is to poll users. My guess is that many of them use comments (I do a lot). That's what I call "important". And I don't think we not bikeshedding: several users explain why they think the current behavior does not match what they expect. If the conversation goes on, it's just that the answer is not what they expect either. >> Nicolas, apart from the current code, what theoretically prevents Org >> from considering them as *empty* lines (not blank lines)? > > This question is too vague. > > What is the difference between an empty line and the way they are > treated actually? (I used the "empty vs. blank" line terminology from the thread.) By considered an empty line, I mean this: This is # a comment within a paragraph. If "# a comment" is considered to be an empty line (i.e. a no-line), then the above is treated as one single paragraph. If it is treated as a blank line, the above is treated as three paragraphs: a first paragraph, a commented paragraph, another paragraph. > More importantly, where, precisely, comments should be > allowed to appear in an Org buffer? I think "no-line" comments they should be allowed anywhere expect in src code blocks, where the comment syntax is different. For example this list: - an item # a comment - another item would be treated as - an item - another item etc. > IOW, you need to define exactly what a comment should be in Org, first, > if the current definition doesn't suit you (or someone else willing to > change it). Then, we'll know where the pitfalls are. I think we have two options: either define comments in Org syntax, either treat them as normal lines and delete them before parsing a buffer for export purposes. 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.) 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? -- Bastien