Ihor Radchenko <[email protected]> writes:
> Maybe. Or not. Depends on preferences. Some users do not like keeping
> selection. If you want this feature, you can add support of
> `org-edit-keep-region' to `org-comment-dwim'.
That's a simpler and more elegant solution.
I cobbled this together and it works for me:
```
(defun advice-org-comment-dwim-keep-region (orig-fun &rest args)
"Make `org-comment-dwim' respect `org-edit-keep-region'."
(let ((deactivate-mark (not org-edit-keep-region)))
(apply orig-fun args)))
(advice-add 'org-comment-dwim :around #'advice-org-comment-dwim-keep-region)
(setq org-edit-keep-region t)
```
--
Raoul Comninos