jkitchin / scimax

An emacs starterkit for scientists and engineers
Other
1.03k stars 121 forks source link

"comment-or-uncomment-region" command looses cursor position #11

Closed jboes closed 8 years ago

jboes commented 8 years ago

I noticed that the comment-or-uncomment-region "works" in org-mode now. Unfortunately, it also resets cursor to the beginning of the code block which is disruptive. Any way to have this information stored and later returned before switching into python mode?

jkitchin commented 8 years ago

I think you want comment-dwim (M-;) It seems to "do what I mean" without moving the point. The only way I know to fix the comment-or-uncomment-region command is to "advise" it by wrapping it with save-excursion.

jboes commented 8 years ago

Comment-dwin seems to work well enough. Thanks!