mwim.el icon indicating copy to clipboard operation
mwim.el copied to clipboard

mwim-end-of-code doesn't work with org-mode

Open Empathy117 opened this issue 4 months ago • 1 comments

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

Empathy117 avatar Sep 04 '25 12:09 Empathy117

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.

alezost avatar Nov 16 '25 13:11 alezost