org-gtd.el
org-gtd.el copied to clipboard
Ensure that whitespace-cleanup removes empty lines
This change sets 'whitespace-style' to a sane value so that whitespace-cleanup does what it is intended to do, e.g. remove empty lines.
Ooh, thank you! Are you comfortable adding a test to verify that the behavior is indeed fixed?
Not yet comfortable :) Currently, I have issues to reproduce the incorrect behavior.
Maybe you have your own whitespace configuration?
I certainly do, which is why I never noticed the problem.
--
Aldric. Sent from a mobile device.
On Wed, Aug 31, 2022, 19:52 jakalx @.***> wrote:
Not yet comfortable :) Currently, I have issues to reproduce the incorrect behavior.
— Reply to this email directly, view it on GitHub https://github.com/Trevoke/org-gtd.el/pull/96#issuecomment-1233564210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQSSLGGHK54KY54IQ7HK3V37V2TANCNFSM5764I3FA . You are receiving this because you commented.Message ID: <Trevoke/org-gtd. @.***>
OK, I'm able to reproduce it. I'm using doom-emacs which seems to change whitespace-style, however, I read the documentation of whitespace-cleanup and it should actually work.
I just replayed archiving via "quick action" and it seems it always leaves a newline behind (i.e. a subtree gets replaced by an empty line) - if I just refile one of the headings from inbox.org to somewhere else, there's no newline remaining.
I'm able to run the tests and hopefully I'll figure out how to trigger my issue from within the test environment.
Hi @jakalx ,
One thing to note is that if you write a test such as "this is what the inbox buffer should look like after processing" and you process, and it works, then probably you don't need to edit the code of this package, just your whitespace configuration -- I say this because the tests run in a very vanilla emacs, so it should be closer to the average user's experience.
Let me know what your results yield, there might be some work to do one way or the other :)
I'm going to close this pull request for two reasons:
- long inactivity
- I just found
org-N-empty-lines-before-currentwhich will do what we need way more cleanly than trying to hack the whitespace mode :D so I'm gonna open an issue describing this particular problem and desired fix.