Start a new topic

BeOrg Encryption removes trailing newlines from content

I love BeOrg's encryption and use it a lot. The biggest problem I have with it is that when I decrypt an item in Emacs, the headline below that item is moved up so that it is one the same line as the last line of the encrypted content.


My guess is that it doesn't include a newline as part of the encrypted content. 


For example:

* Title 1 :crypt:
-----BEGIN PGP MESSAGE-----
lasdjfhsjdhf
-----END PGP MESSAGE-----
* Title 2 :crypt:
-----BEGIN PGP MESSAGE-----
etc

 

 If I decrypt the content of title 1:

* Title 1 :crypt:
test * Title 2 :crypt:
-----BEGIN PGP MESSAGE-----
etc

 

This might be related to this issue: https://appsonthemove.freshdesk.com/support/discussions/topics/14000015618


Thanks!


Thank you for sending this to me. I've managed to reproduce the issue in Emacs.


It does seem strange that Org mode does this, however having more control over newlines in beorg separating headlines and content and before a headline would resolve this.


So I'm going to finally add a new Scheme variable beorg-add-newline-between-headlines which when set to #t (true) will add a blank line before each headline unless that headline is the first one in the file. You can then add to your init.org...


(set! beorg-add-newline-between-headlines #t)


...to enable this.


I will also ensure that text being encrypted always ends with a newline so that even if you don't have this setting enabled things won't get messed up when used with Emacs Org mode encryption.


If you would like to help test these new features let me know and I'll send you an invite to the latest TestFlight version of beorg. I'm starting to get more time to work on beorg now that (in the UK) we have social bubbles and the children aren't around all of the time - so can get the big new feature of support for folders that I'm working on extended to Dropbox, iCloud and Box and then released.

Awesome, I'd be delighted to help test this. I have testflight installed already, so whenever you have a build ready I can give it a try. 

Unfortunately the next update is taking much longer than I'd hoped as  the main new feature, support for subfolders which work on all sync  platforms, is proving trickier than I had planned for. It might be I'll  do a release sooner with subfolders support disabled until ready so I  can get some of these smaller things out first.

Login or Signup to post a comment