From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Should comments break paragraphs? Date: Tue, 16 Jul 2013 18:01:12 +0200 Message-ID: <87wqoqxznb.fsf@gmail.com> References: <51E443F6.2050104@arfer.net> <87mwpnfybn.fsf@gmail.com> <51E47BC1.7010808@gmail.com> <87ip0byoqg.fsf@gmail.com> <87fvvev771.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz7gV-000609-R8 for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 12:01:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz7gS-0004zv-5M for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 12:01:03 -0400 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:59257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz7gR-0004ze-TZ for emacs-orgmode@gnu.org; Tue, 16 Jul 2013 12:01:00 -0400 Received: by mail-we0-f175.google.com with SMTP id t59so806330wes.34 for ; Tue, 16 Jul 2013 09:00:59 -0700 (PDT) In-Reply-To: <87fvvev771.fsf@gmail.com> (Eric Schulte's message of "Tue, 16 Jul 2013 09:46:26 -0600") 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: Eric Schulte Cc: Christian Wittern , emacs-orgmode@gnu.org Hello, Eric Schulte writes: > When Org-mode is used as a document preparation language inline comments > are very useful. The use case being notes on the surrounding material > which are not to be published. Both HTML and LaTeX support comments and > at least in LaTeX they are extensively used (in my experience) and can > be very helpful. Again, Org is neither LaTeX nor HTML. > Stripping lines starting with "^ *#[^+]" is a trivial pre-processing > step, and would support the traditional Org-mode comments which (as I > recall) could previously appear mid paragraph without causing > problems. > The attached patch worked on some small example files for me. As I explained in a previous post, it's only a kludge hiding the real problem: comments cannot appear anywhere, even if we don't take export into account. Actually, handling comments during export is the easiest part of the problem. > From ce4c30ebe56d4cd66810bca48824d8841e7b130d Mon Sep 17 00:00:00 2001 > From: Eric Schulte > Date: Tue, 16 Jul 2013 09:44:59 -0600 > Subject: [PATCH] support inline comments w/o breaking paragraphs > > * lisp/org-element.el (org-element-parse-buffer): Strip inline comments > as a pre-processing step before exporting. The parser is unrelated to the export process, so export pre-processing shouldn't happen in org-element.el. Also, parsing a buffer mustn't modify it in the process. 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. Regards, -- Nicolas Goaziou