wbolster / emacs-python-black

Emacs package to reformat Python using black-macchiato
BSD 3-Clause "New" or "Revised" License
95 stars 11 forks source link

add function to reformat org-mode python source block #12

Closed nicolas-graves closed 1 year ago

nicolas-graves commented 1 year ago

should I also add my copyright ?

wbolster commented 1 year ago

hi 👋🏼 i see how this could be useful (though i don't use org-mode myself).

left a bunch of comments about the implementation

nicolas-graves commented 1 year ago

I'm sorry, not ready for review, I'm not at ease with this part of github UX for now.

nicolas-graves commented 1 year ago

I still do find it much easier to understand using the org-src--contents-area function. Here is another version using destructured pattern matching with only three lines of code, I don't think it's possible to get more simple and clear than that.

nicolas-graves commented 1 year ago

These last commits introduce back the save-mark-and-excursion wrapper, which was necessary.

wbolster commented 1 year ago

thanks 🚀 merged!