mwim.el
mwim.el copied to clipboard
mwim-end-of-code doesn't work with org-mode
before I use mwim-end-of-code
#+begin_src emacs-lisp
(somth[cursor]ing nil) ; this is a comment
#+end_src
after I use mwim-end-of-code it just go to end of line
#+begin_src emacs-lisp
(somthing nil) ; this is a comment [cursor]
#+end_src
but it works pretty well in .el file , it just not work in org-mode
Hello and sorry for the late reply.
mwim relies on syntax-ppss to define if the point is inside comment or
not. If you put the point inside a comment in elisp buffer and evaluate
M-: (nth 4 (syntax-ppss)), you will get t which means the point is
inside the comment. If you evaluate that in an org buffer, you will get
nil.
I don't know what can be done here. If anyone has an idea about possible workarounds, feel free to share.