Re: [O] Standard Format for Org Outlines?

2018-11-29 Thread David Masterson
Nicolas Goaziou  writes:

> David Masterson  writes:
>
>> Good try, but I think you got it backwards.  I pulled down a daily
>> development snapshot tarball from yesterday (not good with git yet) and
>> tried it again.  This time, it broke M-return by adding an extra blank
>> line after the header (ie. two blank lines), but still did not put in a
>> blank line after the header on C-return.
>
> Again, I need a recipe to reproduce your issue. I tried again with your
> previous example and in both cases, I get:
>
> * Header 1
>
> * 
>
> * Header 2

Hrph.  Okay, I'll dig further.  Thanks.
--
David



Re: [O] Standard Format for Org Outlines?

2018-11-29 Thread Nicolas Goaziou
Hello,

David Masterson  writes:

> Good try, but I think you got it backwards.  I pulled down a daily
> development snapshot tarball from yesterday (not good with git yet) and
> tried it again.  This time, it broke M-return by adding an extra blank
> line after the header (ie. two blank lines), but still did not put in a
> blank line after the header on C-return.

Again, I need a recipe to reproduce your issue. I tried again with your
previous example and in both cases, I get:

--8<---cut here---start->8---
* Header 1

* 

* Header 2
--8<---cut here---end--->8---


Regards,

-- 
Nicolas Goaziou



Re: [O] Standard Format for Org Outlines?

2018-11-28 Thread David Masterson
Nicolas Goaziou  writes:

> David Masterson  writes:
>
>> * Header 1
>>
>> * Header 2
>>
>> Position the cursor on '1' and M-return will create a new header with a
>> blank line before and after it, but C-return will create a new header
>> with a blank line before, but not after it.

> I see. I pushed a fix in master branch. Please let me know if it 
> behaves better there.

Good try, but I think you got it backwards.  I pulled down a daily
development snapshot tarball from yesterday (not good with git yet) and
tried it again.  This time, it broke M-return by adding an extra blank
line after the header (ie. two blank lines), but still did not put in a
blank line after the header on C-return.

--
David



Re: [O] Standard Format for Org Outlines?

2018-11-27 Thread Nicolas Goaziou
Hello,

David Masterson  writes:

> * Header 1
>
> * Header 2
>
> Position the cursor on '1' and M-return will create a new header with a
> blank line before and after it, but C-return will create a new header
> with a blank line before, but not after it.

I see. I pushed a fix in master branch. Please let me know if it 
behaves better there.

Regards,

-- 
Nicolas Goaziou



Re: [O] Standard Format for Org Outlines?

2018-11-27 Thread David Masterson
Nicolas Goaziou  writes:

> David Masterson  writes:

>> My example is simple.
>>
>> * emacs --no-init
>> * edit an org file with an outline
>> * position cursor at the end of an outline entry
>> * M-Return
>> ** result: a new header with a blank line before and after
>> * C-Return
>> ** result: a new header with a blank line before but not after

> I cannot reproduce your issue. The only difference that could occur is
> when you have sub-trees, since  inserts the new headline at its
> end.

Hmm.  Tried again.  Severely trimmed my .emacs to the following:

;;
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-switchb)
(custom-set-variables
 '(package-archives
   (quote
(("gnu" . "https://elpa.gnu.org/packages/;)
 ("org" . "https://orgmode.org/;)
 ("melpa-stable" . "https://stable.melpa.org/packages/;
 '(package-selected-packages
   (quote
(org adaptive-wrap auctex auto-correct python)))
 '(text-mode-hook
   (quote
(turn-on-flyspell visual-line-mode text-mode-hook-identify
(custom-set-faces
 '(cursor ((t (:background "blue")
;;

I am running Emacs v26.1 on Cygwin under Windows with Org v9.1.14.
Everything seems to work fine (slow at times, but...).  A simple file
produces the problem (and, of course, it is seen in much more complex
files).

* Header 1

* Header 2

Position the cursor on '1' and M-return will create a new header with a
blank line before and after it, but C-return will create a new header
with a blank line before, but not after it.

Not a Lisp person, but I was wondering if there is something different
in the way org-meta-return is doing its processing to determine if it
should handle a header, list, or a table?  That extra processing doesn't
appear to be in C-return.

--
David



Re: [O] Standard Format for Org Outlines?

2018-11-27 Thread Nicolas Goaziou
Hello,

David Masterson  writes:

> My example is simple.
>
> * emacs --no-init
> * edit an org file with an outline
> * position cursor at the end of an outline entry
> * M-Return
> ** result: a new header with a blank line before and after
> * C-Return
> ** result: a new header with a blank line before but not after

I cannot reproduce your issue. The only difference that could occur is
when you have sub-trees, since  inserts the new headline at its
end.

Regards,

-- 
Nicolas Goaziou



Re: [O] Standard Format for Org Outlines?

2018-11-26 Thread David Masterson
Nicolas Goaziou  writes:

> David Masterson  writes:

>> It apparently only affects org-insert-heading, but not
>> org-insert-heading-respect-content -- I'm not sure why.  Is that
>> a bug?

> They should behave the same way, indeed. Again a minimal example would
> help.

My example is simple.

* emacs --no-init
* edit an org file with an outline
* position cursor at the end of an outline entry
* M-Return
** result: a new header with a blank line before and after
* C-Return
** result: a new header with a blank line before but not after

--
David



Re: [O] Standard Format for Org Outlines?

2018-11-26 Thread Nicolas Goaziou
Hello,

David Masterson  writes:

> It apparently only affects org-insert-heading, but not
> org-insert-heading-respect-content -- I'm not sure why.  Is that
> a bug?

They should behave the same way, indeed. Again a minimal example would
help.

Regards,

-- 
Nicolas Goaziou



Re: [O] Standard Format for Org Outlines?

2018-11-25 Thread David Masterson
Nicolas Goaziou  writes:

> David Masterson  writes:

>> Why does org-insert-heading insert a heading with a blank line after it
>> inserts the heading while org-insert-heading-respect-context does not?

> It may be a bug. Do you have an ECM for it?

No.  Thought it might be a mistake on my part.  How do you file ECMs?

>> Am I missing a setting?  Or have I (accidently) set a setting without
>> realizing it?  I seem to recall reading something about this in the Org
>> manual(s), but I can't find it now.

> See `org-blank-before-new-entry'.

Bingo!

Its value is ((heading . auto) (plain-list-item . auto))

It apparently only affects org-insert-heading, but not
org-insert-heading-respect-content -- I'm not sure why.  Is that a bug?

--
David



Re: [O] Standard Format for Org Outlines?

2018-11-25 Thread Nicolas Goaziou
Hello,

David Masterson  writes:

> Why does org-insert-heading insert a heading with a blank line after it
> inserts the heading while org-insert-heading-respect-context does not?

It may be a bug. Do you have an ECM for it?

> Am I missing a setting?  Or have I (accidently) set a setting without
> realizing it?  I seem to recall reading something about this in the Org
> manual(s), but I can't find it now.

See `org-blank-before-new-entry'.

Regards,

-- 
Nicolas Goaziou



Re: [O] Standard Format for Org Outlines?

2018-11-25 Thread David Masterson
Nicolas Goaziou  writes:

> Neil Jerram  writes:

>> On 23 November 2018 23:23:27 GMT, David Masterson  
>> wrote:

>>>Probably a dumb question, but is there a standard format for Org
>>>outlines. I'm particularly wondering about the use of blank lines. I
>>>prefer to have blank lines before my headings for readability, but I
>>>think a lot of other people work without the blank lines.  I recently
>>>ran into a case with BeOrg where it, in fact, removed the blank lines
>>>when it synced my change back to my original file.  That led me to
>>>think what is the standard format for an Org outline.  Should I
>>>expect the tools to adjust to me or should I adjust to them?

>> Great question; I've seen and wondered the same thing. In my case it's
>> Orgzly that seems to like removing some blank lines - although happily
>> it doesn't seem to mind when I add some of them back again.

> Blank lines before a headline are not significant in Org syntax.

Why does org-insert-heading insert a heading with a blank line after it
inserts the heading while org-insert-heading-respect-context does not?
Am I missing a setting?  Or have I (accidently) set a setting without
realizing it?  I seem to recall reading something about this in the Org
manual(s), but I can't find it now.

--
David



Re: [O] Standard Format for Org Outlines?

2018-11-24 Thread Nicolas Goaziou
Hello,

Neil Jerram  writes:

> On 23 November 2018 23:23:27 GMT, David Masterson  
> wrote:
>>Probably a dumb question, but is there a standard format for Org
>>outlines. I'm particularly wondering about the use of blank lines. I
>>prefer to have blank lines before my headings for readability, but I
>>think a lot of other people work without the blank lines.  I recently
>>ran into a case with BeOrg where it, in fact, removed the blank lines
>>when it synced my change back to my original file.  That led me to
>>think
>>what is the standard format for an Org outline.  Should I expect the
>>tools to adjust to me or should I adjust to them?
>>--
>>David
>
> Great question; I've seen and wondered the same thing. In my case it's
> Orgzly that seems to like removing some blank lines - although happily
> it doesn't seem to mind when I add some of them back again.

Blank lines before a headline are not significant in Org syntax.

Regards,

-- 
Nicolas Goaziou



Re: [O] Standard Format for Org Outlines?

2018-11-24 Thread Neil Jerram



On 23 November 2018 23:23:27 GMT, David Masterson  
wrote:
>Probably a dumb question, but is there a standard format for Org
>outlines. I'm particularly wondering about the use of blank lines. I
>prefer to have blank lines before my headings for readability, but I
>think a lot of other people work without the blank lines.  I recently
>ran into a case with BeOrg where it, in fact, removed the blank lines
>when it synced my change back to my original file.  That led me to
>think
>what is the standard format for an Org outline.  Should I expect the
>tools to adjust to me or should I adjust to them?
>--
>David

Great question; I've seen and wondered the same thing. In my case it's Orgzly 
that seems to like removing some blank lines - although happily it doesn't seem 
to mind when I add some of them back again.

Best wishes,
 Neil