org-tidy icon indicating copy to clipboard operation
org-tidy copied to clipboard

Keep the newline that follows a drawer

Open alecigne opened this issue 1 year ago • 2 comments

Hi,

First of all, thank you for this mode! It is useful, especially in combination with org-present.

Unless I'm mistaken, org-tidy doesn't keep the newline below a drawer. For example, this:

* Origines
:PROPERTIES:
:CREATED:  [2023-12-09 Sat 12:15]
:END:

- Né dans les années 1970 au laboratoire d'intelligence artificielle
  du MIT.

...will be displayed like this after calling org-tidy-mode:

* Origines #
- Né dans les années 1970 au laboratoire d'intelligence artificielle
  du MIT.

I'd prefer the newline to be kept, to obtain this:

* Origines #

- Né dans les années 1970 au laboratoire d'intelligence artificielle
  du MIT.

Is it possible with the current version of org-tidy ? If so, I'd be happy to add it to the README since I think some people might have the same question.

Thank you,

Anthony

alecigne avatar Dec 09 '23 15:12 alecigne

Exactly the same issue that I want to open 3 days after you :)

Cletip avatar Dec 12 '23 20:12 Cletip

Same issue for me. I hope it gets some attention :)

@Cletip, I see made a PR to solve this issue. So thanks for your time.

I tried to install your fork on Doom Emacs, but I see no difference. I am fairly new to Emacs and elisp, but looking at the code, I can see your changes have to do with overlay.

I have the option org-tidy-protect-overlay set to nil, do you have any idea if that could be the reason why it does not work for me ?

lyndhurst avatar Jun 06 '24 13:06 lyndhurst