You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"inorganic.py" inserts a single space at the start of each line in a body. I guess this is intended to improve the readability of the raw org file. However, it interferes with use cases where I want to modify the org file and then convert it back to whatever the source format was.
In principle it would be possible to strip out the spaces at the beginning of lines before conversion, but that seems like something that would blow up sooner or later.
I propose to remove, or at least make the indentation optional. I configure org-mode to display headings to be displayed with indentation anyway, so the extra indentation does not help.
The text was updated successfully, but these errors were encountered:
Hey, yeah, it happens in sanitize_body, and it's actually a poor version of escaping. E.g. otherwise if your selection contained '*' or '#' symbols, they would end starting a new outline.
I guess I wasn't sure if simply sanitizing * and # is enough.. Can you think of any other symbols to escape? I don't mind just doing it proprely and removing the whitespace thing :)
It would be great though to not have to do this "carpet escaping". As far as I can tell from https://orgmode.org/worg/dev/org-syntax.html , mainly lines beginning with "* " and "#+" need escaping. Prefixing "* " lines with a space seems sensible.
But when I try in emacs, prefixing a "#+" line with spaces does not help, it still seems to be interpreted by emacs as a block. Same for ":drawers:" and "# comments". I can see this getting tricky!
Maybe another solution would be wrapping potentially problematic bodies in "#+begin_example" blocks or something, to prevent them from being interpreted..? Unfortunately that still has some issues. On https://orgmode.org/manual/Literal-Examples.html there are some examples where a leading comma is used for escaping, for some reason.
By the way, I really like orger, I think the idea has a lot of potential uses. Also the code is nice and readable!
"inorganic.py" inserts a single space at the start of each line in a body. I guess this is intended to improve the readability of the raw org file. However, it interferes with use cases where I want to modify the org file and then convert it back to whatever the source format was.
In principle it would be possible to strip out the spaces at the beginning of lines before conversion, but that seems like something that would blow up sooner or later.
I propose to remove, or at least make the indentation optional. I configure org-mode to display headings to be displayed with indentation anyway, so the extra indentation does not help.
The text was updated successfully, but these errors were encountered: