emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Standard Format for Org Outlines?
@ 2018-11-23 23:23 David Masterson
  2018-11-24  9:04 ` Neil Jerram
  0 siblings, 1 reply; 14+ messages in thread
From: David Masterson @ 2018-11-23 23:23 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

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

* Re: Standard Format for Org Outlines?
  2018-11-23 23:23 Standard Format for Org Outlines? David Masterson
@ 2018-11-24  9:04 ` Neil Jerram
  2018-11-24  9:20   ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: Neil Jerram @ 2018-11-24  9:04 UTC (permalink / raw)
  To: emacs-orgmode, David Masterson



On 23 November 2018 23:23:27 GMT, David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-24  9:04 ` Neil Jerram
@ 2018-11-24  9:20   ` Nicolas Goaziou
  2018-11-25 20:53     ` David Masterson
  0 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-11-24  9:20 UTC (permalink / raw)
  To: Neil Jerram; +Cc: David Masterson, emacs-orgmode

Hello,

Neil Jerram <neil@ossau.homelinux.net> writes:

> On 23 November 2018 23:23:27 GMT, David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-24  9:20   ` Nicolas Goaziou
@ 2018-11-25 20:53     ` David Masterson
  2018-11-25 22:25       ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: David Masterson @ 2018-11-25 20:53 UTC (permalink / raw)
  To: Neil Jerram; +Cc: emacs-orgmode@gnu.org

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Neil Jerram <neil@ossau.homelinux.net> writes:

>> On 23 November 2018 23:23:27 GMT, David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-25 20:53     ` David Masterson
@ 2018-11-25 22:25       ` Nicolas Goaziou
  2018-11-26  0:23         ` David Masterson
  0 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-11-25 22:25 UTC (permalink / raw)
  To: David Masterson; +Cc: Neil Jerram, emacs-orgmode@gnu.org

Hello,

David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-25 22:25       ` Nicolas Goaziou
@ 2018-11-26  0:23         ` David Masterson
  2018-11-26  9:52           ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: David Masterson @ 2018-11-26  0:23 UTC (permalink / raw)
  To: Neil Jerram; +Cc: emacs-orgmode@gnu.org

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-26  0:23         ` David Masterson
@ 2018-11-26  9:52           ` Nicolas Goaziou
  2018-11-26 17:29             ` David Masterson
  0 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-11-26  9:52 UTC (permalink / raw)
  To: David Masterson; +Cc: Neil Jerram, emacs-orgmode@gnu.org

Hello,

David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-26  9:52           ` Nicolas Goaziou
@ 2018-11-26 17:29             ` David Masterson
  2018-11-27  8:32               ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: David Masterson @ 2018-11-26 17:29 UTC (permalink / raw)
  To: Neil Jerram; +Cc: emacs-orgmode@gnu.org

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-26 17:29             ` David Masterson
@ 2018-11-27  8:32               ` Nicolas Goaziou
  2018-11-27 17:20                 ` David Masterson
  0 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-11-27  8:32 UTC (permalink / raw)
  To: David Masterson; +Cc: Neil Jerram, emacs-orgmode@gnu.org

Hello,

David Masterson <dsmasterson@outlook.com> 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 <C-RET> inserts the new headline at its
end.

Regards,

-- 
Nicolas Goaziou

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

* Re: Standard Format for Org Outlines?
  2018-11-27  8:32               ` Nicolas Goaziou
@ 2018-11-27 17:20                 ` David Masterson
  2018-11-27 22:25                   ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: David Masterson @ 2018-11-27 17:20 UTC (permalink / raw)
  To: Neil Jerram; +Cc: emacs-orgmode@gnu.org

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> David Masterson <dsmasterson@outlook.com> 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 <C-RET> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-27 17:20                 ` David Masterson
@ 2018-11-27 22:25                   ` Nicolas Goaziou
  2018-11-29  0:22                     ` David Masterson
  0 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-11-27 22:25 UTC (permalink / raw)
  To: David Masterson; +Cc: Neil Jerram, emacs-orgmode@gnu.org

Hello,

David Masterson <dsmasterson@outlook.com> 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 <C-RET>
behaves better there.

Regards,

-- 
Nicolas Goaziou

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

* Re: Standard Format for Org Outlines?
  2018-11-27 22:25                   ` Nicolas Goaziou
@ 2018-11-29  0:22                     ` David Masterson
  2018-11-29 14:10                       ` Nicolas Goaziou
  0 siblings, 1 reply; 14+ messages in thread
From: David Masterson @ 2018-11-29  0:22 UTC (permalink / raw)
  To: Neil Jerram; +Cc: emacs-orgmode@gnu.org

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> David Masterson <dsmasterson@outlook.com> 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 <C-RET>
> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-29  0:22                     ` David Masterson
@ 2018-11-29 14:10                       ` Nicolas Goaziou
  2018-11-29 16:46                         ` David Masterson
  0 siblings, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-11-29 14:10 UTC (permalink / raw)
  To: David Masterson; +Cc: Neil Jerram, emacs-orgmode@gnu.org

Hello,

David Masterson <dsmasterson@outlook.com> 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

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

* Re: Standard Format for Org Outlines?
  2018-11-29 14:10                       ` Nicolas Goaziou
@ 2018-11-29 16:46                         ` David Masterson
  0 siblings, 0 replies; 14+ messages in thread
From: David Masterson @ 2018-11-29 16:46 UTC (permalink / raw)
  To: Neil Jerram; +Cc: emacs-orgmode@gnu.org

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> David Masterson <dsmasterson@outlook.com> 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

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

end of thread, other threads:[~2018-11-29 16:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-23 23:23 Standard Format for Org Outlines? David Masterson
2018-11-24  9:04 ` Neil Jerram
2018-11-24  9:20   ` Nicolas Goaziou
2018-11-25 20:53     ` David Masterson
2018-11-25 22:25       ` Nicolas Goaziou
2018-11-26  0:23         ` David Masterson
2018-11-26  9:52           ` Nicolas Goaziou
2018-11-26 17:29             ` David Masterson
2018-11-27  8:32               ` Nicolas Goaziou
2018-11-27 17:20                 ` David Masterson
2018-11-27 22:25                   ` Nicolas Goaziou
2018-11-29  0:22                     ` David Masterson
2018-11-29 14:10                       ` Nicolas Goaziou
2018-11-29 16:46                         ` David Masterson

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).