Start a new topic

Formatting requirements

Something you could discuss is the expectations that BeOrg has in the format of the Org files (if any).

  • Blank lines -- I put in blank lines for readability.  Will BeOrg remove them and where?  Be precise.
  • Auto-fill -- Should we fill paragraphs or let it wrap at the end of a line?  I'm an old Emacs user, so I tend to turn on auto-fill.
  • CRLF vs NL -- How does BeOrg hand EOL?  If I mostly edit on a PC (CRLF), will that cause problems with BeOrg?
  • How is BeOrg on other character sets?
  • Anything else?


Regarding blank lines beorg currently:
  • Removes any blank lines before a heading (this includes at the start of a file)
  • Keeps any blank lines after a heading
  • Keeps any blank lines in notes following a heading, except those before the next heading (this is the same as lines before a heading)
Auto-fill:
  • Auto fill adds newlines to fill the paragraph to the desired line width or screen width in Emacs. This can result in beorg showing your notes with a staircase-ish effect at the end of the lines and will make large edits more difficult. I personally use soft wrapping in Emacs, i.e. visual-line-mode. The soft wrapping that then happens in beorg when editing text the matches the behaviour of that in Emacs and makes larger edits easier. (http://ergoemacs.org/emacs/emacs_long_line_wrap.html). However like with many things Emacs this is very much a personal preference :)
CRLF vs NL:
  • beorg will read files saved with CRLF line endings without any issue. If the lines which have those endings are not modified then the CRLF line endings are retained. However any new lines added will just have LF line endings.
  • In my testing of this before editing the file in beorg the 'file' command in macOS told me ASCII text, with CRLF line terminators, after beorg had inserted some new lines in the file  the 'file' command then reported ASCII text, with CRLF, LF line terminators to indicate both types of newline. Using hexdump to look at the file I can see this is the case.
  • So you shouldn't have any problems but do expect beorg to use just LF line terminators for any new lines added to the files.
Other character sets:
  • beorg will only read files if it can intepret them with a utf-8 encoding. Files are always written in utf-8.
  • I do have a possible future feature down so that users can configure beorg to accept and write with other encodings - however I think only one user has requested this so far.

If you see anything in your beorg usage which contradicts the above please let me know and I'll investigate.

Great question, should be very useful for other users - thanks David!
org
(164 Bytes)
org
(176 Bytes)

1 person likes this

Is it possible not to remove any blank lines in beorg? I would like to keep the formatting for readability.

Possibly - this is something I will need to review. What might be better is for users to override some simple formatting requirements in the init.org - for example how many blank lines after notes, before a headline, after a headline, etc. Then beorg could better keep things consistent when adding/removing items.

Good idea. By now I use beorg only with a dedicated org file because of the formatting, hope that you can put this idea into your wish list :)


1 person likes this

Same issue here, after I modified some of my GTD items, some irrelevant parts of the the org file containing the items are also changed.


All I want is that, if I modified TODO item status only, only that *relevant* part will be changed, so that my original formatting will not be affected. 

+1 for the option to not remove blank lines. I don't want to use the app currently because it does that.

I will take a look to see if a new setting can be introduced to stop beorg messing with blank lines. For most users they would probably keep this on - but if you do you want to be in control of spacing, etc then I'll see if beorg can be made to leave that alone.

Thanks. Glad to hear it.

Login or Signup to post a comment