emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* comments after paragraph remove newline
@ 2013-02-10 18:49 Samuel Wales
  2013-02-10 19:40 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2013-02-10 18:49 UTC (permalink / raw)
  To: emacs-orgmode

If there were a blank line above the comment, the newline removal
would be appropriate, but not when there is no blank line above it.

=== input

*** test
no comments

one

comments
# test

two

=== ascii

no comments

one

comments
two

===

Thanks.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: comments after paragraph remove newline
  2013-02-10 18:49 comments after paragraph remove newline Samuel Wales
@ 2013-02-10 19:40 ` Nicolas Goaziou
  2013-02-18 19:51   ` Samuel Wales
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-02-10 19:40 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hello,

Samuel Wales <samologist@gmail.com> writes:

> If there were a blank line above the comment, the newline removal
> would be appropriate, but not when there is no blank line above it.
>
> === input
>
> *** test
> no comments
>
> one
>
> comments
> # test
>
> two
>
> === ascii
>
> no comments
>
> one
>
> comments
> two
>
> ===

Blank lines below an element belong to that element, by definition. So,
obviously, just add a blank line between "comments" and "# test" and it
will not be removed.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: comments after paragraph remove newline
  2013-02-10 19:40 ` Nicolas Goaziou
@ 2013-02-18 19:51   ` Samuel Wales
  2013-02-22 10:50     ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2013-02-18 19:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

On 2/10/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Blank lines below an element belong to that element, by definition. So,
> obviously, just add a blank line between "comments" and "# test" and it
> will not be removed.

You are saying that the comments get removed with the blank line
because the blank line is considered part of the comments?

If so, I think the expectation of many users is that # comments only
the line itself, and not any other lines.  That, at least, is my own
expectation.

In my case, the proposed solution changes the meaning of the comment.
For example:

===
a
b
c
d
# e
# f

new paragraph
===

If you make e and f a new paragraph, it is intended to be a new
paragraph and no longer refers to the previous paragraph.

I don't know the code, but is it possible that, instead of attaching
blank lines to elements, blank lines can be an element on their own?
Would that allow the needed flexibility and also add orthogonality for
other purposes?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: comments after paragraph remove newline
  2013-02-18 19:51   ` Samuel Wales
@ 2013-02-22 10:50     ` Nicolas Goaziou
  2013-02-24 20:33       ` Samuel Wales
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2013-02-22 10:50 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> On 2/10/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
>> Blank lines below an element belong to that element, by definition. So,
>> obviously, just add a blank line between "comments" and "# test" and it
>> will not be removed.
>
> You are saying that the comments get removed with the blank line
> because the blank line is considered part of the comments?

Is silence following music still music? ;)

Blank lines belong to the "comments" element, but are not commented
themselves.

> In my case, the proposed solution changes the meaning of the comment.
> For example:
>
> ===
> a
> b
> c
> d
> # e
> # f
>
> new paragraph
> ===
>
> If you make e and f a new paragraph, it is intended to be a new
> paragraph and no longer refers to the previous paragraph.
>
> I don't know the code, but is it possible that, instead of attaching
> blank lines to elements, blank lines can be an element on their own?

It's not a matter of "where to store it", but "what to do with it".

> Would that allow the needed flexibility and also add orthogonality for
> other purposes?

I don't think we need it. I have pushed a patch for that. Note that now,
blank lines before the comment and after it will accumulate.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: comments after paragraph remove newline
  2013-02-22 10:50     ` Nicolas Goaziou
@ 2013-02-24 20:33       ` Samuel Wales
  2013-02-25  8:20         ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2013-02-24 20:33 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 2/22/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> I don't think we need it. I have pushed a patch for that. Note that now,
> blank lines before the comment and after it will accumulate.

Thank you.  It works now.

I wonder if we should consider something more fancy for ascii backend
(only).  Delete blank lines between comment and headline, and between
comment and comment.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: comments after paragraph remove newline
  2013-02-24 20:33       ` Samuel Wales
@ 2013-02-25  8:20         ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2013-02-25  8:20 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> I wonder if we should consider something more fancy for ascii backend
> (only).  Delete blank lines between comment and headline

This is not needed: see `org-ascii-headline-spacing'.

>  and between comment and comment.

Done.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-25  8:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-10 18:49 comments after paragraph remove newline Samuel Wales
2013-02-10 19:40 ` Nicolas Goaziou
2013-02-18 19:51   ` Samuel Wales
2013-02-22 10:50     ` Nicolas Goaziou
2013-02-24 20:33       ` Samuel Wales
2013-02-25  8:20         ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).