From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Blank lines in LaTeX output due to org-mode comments Date: Thu, 30 Jun 2016 21:19:47 +0200 Message-ID: <87y45mzdpo.fsf@saiph.selenimh> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhVG-00059k-Ac for emacs-orgmode@gnu.org; Thu, 30 Jun 2016 15:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIhVE-0003Dd-BI for emacs-orgmode@gnu.org; Thu, 30 Jun 2016 15:19:57 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:36766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIhVE-0003DW-4j for emacs-orgmode@gnu.org; Thu, 30 Jun 2016 15:19:56 -0400 In-Reply-To: (Mark Edgington's message of "Thu, 30 Jun 2016 15:06:25 -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" To: Mark Edgington Cc: emacs-orgmode Hello, Mark Edgington writes: > Assume we have the following sample org-mode document: > > * Test Heading > test test test test test test test > test test test test test test test > test test test test test test test > # HERE IS A COMMENT > TEST TEST TEST TEST TEST TEST TEST > TEST TEST TEST TEST TEST TEST TEST > TEST TEST TEST TEST TEST TEST TEST > > I would assume that in org-mode the comment line would be completely > ignored when exporting the document, however this seems not to be the > case -- notice the difference when exporting the following to LaTeX: > > * Test Heading > test test test test test test test > test test test test test test test > test test test test test test test > TEST TEST TEST TEST TEST TEST TEST > TEST TEST TEST TEST TEST TEST TEST > TEST TEST TEST TEST TEST TEST TEST > > In the first example, there is a blank line inserted at the location > of the comment, and in the second example, obviously there is not a > blank line at this location. Let me know if there's a way to make it > so that org-mode doesn't insert the blank line. Thanks! The behavior is correct. Actually, what you suggest was reported as a bug a couple of years ago. Comments separate paragraphs, so you really have two paragraphs in the first example, but only one in the second example. You can handle comments differently by adding a function in, e.g. `org-export-before-processing-hook', that will take care of removing commented lines. These are easy to recognize. See `org-export--delete-comments' for an example. Regards, -- Nicolas Goaziou