Re: [O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Nicolas Goaziou
> For me, using the "@@comment:..@@" syntax gives exactly the same
> results as using "# ..." (an extra blank line in the output).

Only if you write them on a line on their own.

> Regardless of what the current org syntax is defined as, I am trying
> to argue that it is counter-intuitive, and also makes doing useful
> things difficult.

I already told you how to achieve what you want: simply remove every
line starting with "# " in a hook at the beginning of the export
process.

Regards,



Re: [O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Mark Edgington
On Thu, Jun 30, 2016 at 5:23 PM, Nicolas Goaziou  wrote:
> Mark Edgington  writes:
>
>> I'm inclined to view it more as a bug, because it makes it impossible to
>> place comments within a paragraph.
>
> This is per Org syntax. "# ..." is not meant as an inline paragraph. You
> can comment inline with something like @@comment:...@@.

For me, using the "@@comment:..@@" syntax gives exactly the same
results as using "# ..." (an extra blank line in the output).  Of
course I can do something like "#+LaTeX: % ..." which will work, but
then the convenience of being able to quickly comment and uncomment
lines is lost.

Regardless of what the current org syntax is defined as, I am trying
to argue that it is counter-intuitive, and also makes doing useful
things difficult.



Re: [O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Nicolas Goaziou
Mark Edgington  writes:

> I'm inclined to view it more as a bug, because it makes it impossible to
> place comments within a paragraph.

This is per Org syntax. "# ..." is not meant as an inline paragraph. You
can comment inline with something like @@comment:...@@.

Regards,



Re: [O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Mark Edgington
One other use case:  when you want to comment out a single line in a
paragraph, or have a few different lines within a paragraph that you wish to
be able to select among by leaving only only one of them uncommented.







Re: [O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Mark Edgington
Nicolas Goaziou  nicolasgoaziou.fr> writes:
> Mark Edgington  gmail.com> 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:
> 
> 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.

I'm inclined to view it more as a bug, because it makes it impossible to
place comments within a paragraph.  Paragraphs consist of sentences, and
perhaps you'd like to make a note related to one of those sentences (in fact
I do).

On the other hand, if the behavior was to not create blank lines, it
wouldn't be difficult to add a blank line either before or after a comment
if desired.  Furthermore, the behavior is inconsistent with how LaTeX
comments behave (which may not matter, but it may be easier for people who
know both org-mode and LaTeX for the behavior to be consistent).

At the least, I think it would be helpful to have a built-in option that
allows one to select the preferred behavior.






Re: [O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Nicolas Goaziou
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



[O] Blank lines in LaTeX output due to org-mode comments

2016-06-30 Thread Mark Edgington
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!