From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Should comments break paragraphs? Date: Wed, 17 Jul 2013 06:54:28 -0600 Message-ID: <871u6xmjnf.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRHa-0005gL-Ji for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 08:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzRHY-000225-W5 for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 08:56:38 -0400 Received: from mail-pd0-x22b.google.com ([2607:f8b0:400e:c02::22b]:44505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzRHY-00021w-Oo for emacs-orgmode@gnu.org; Wed, 17 Jul 2013 08:56:36 -0400 Received: by mail-pd0-f171.google.com with SMTP id y14so1799039pdi.2 for ; Wed, 17 Jul 2013 05:56:35 -0700 (PDT) In-Reply-To: <87sizexuj9.fsf@gmail.com> (Nicolas Goaziou's message of "Tue, 16 Jul 2013 19:51:38 +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: > Eric Schulte writes: > >> So are you proposing to remove comments from Org-mode entirely? > > Certainly not. > Great, then I think we're much closer together on this than I originally thought. > > I'm on the "good enough" side and I simply suggest to live with it. > Also, if you badly need inline comments, there's the empty "comment" > macro: > > #+MACRO: comment > > Some text {{{comment(This is my comment)}}} and some more. > I'm not suggesting adding inline comments, only that comment lines be treated as "" instead of "\n". > >> But if we treat comments as semantically empty, then maybe they should >> be ignored by the parser? > > Yes, we can ignore them at the parser level. But what about the rest of > Org? There are many places that do not rely on the parser and do not > ignore comments (lists being an example, agenda being another one, and > I'm pretty sure comments at some locations can break Babel too). > > Something could be done, but again, it would certainly not be > a one-liner in org-element.el or ox.el. > I'm happy to work to fix places where babel is breaking comments. > >>> Even if you move it to ox.el, this is not an acceptable solution. Think >>> about the following example >>> >>> - item 1 >>> >>> # with a comment >>> >>> - item 2 >>> >>> If you simply delete matching lines, you break the list. >>> >> >> Yes, I would argue that this list should be broken, because with or >> without the comment the items are separated by two blank lines. > > On the other hand, visually, this list looks perfectly correct. > >> In my opinion comments as semantically empty lines is a simple rule >> for both users and parsers to understand. > > Comments are already almost semantically empty lines. That's why: > > Text > # Comment > Other Text > > generates two paragraphs in Org (and in every back-end excepted `latex', > but that's a different problem). They basically act as a paragraph > separator, much like blank lines. > > Also, note that if they really are empty lines, they cannot be inlined > within paragraphs either. > Sorry I was unclear, see above, by "semantically empty" I meant replacing comment lines with "" instead of the current behavior (except in the latex exporter) which replaces them with "\n". Cheers, > > > Regards, -- Eric Schulte http://cs.unm.edu/~eschulte