Using M+; (block comments) in a code block not working

I can mark mutliple lines an press M + ; (meta plus semikolon). Then a # is added in front of each line. This works in a “normal” org file.

But when the point is in a source block (#+begin_src and #+end_src) in an org file the M + ; doesn’t work. No reaction. No error.

I think we are a bit off topic. However, I cannot confirm this. If the source block specify the language (eg, #+BEGIN_SRC emacs-lisp), M-; will add the correct comment notation (in the given example, it will use as comment ;). If a block is selected, it will comment-out that block, if not, it will put the comment notation at the end of the line.

2 Likes

The language specifier was missing. That was the solution. Thanks.