Q:

Language specific comments in org-mode source code blocks

I have language specific syntax highlighting and (kind of) indentation working in Org-mode source code blocks. 
However, because of the syntax highlighting if I am editing the code block in the Org-mode buffer, I often find myself thinking that I am in an e.g., emacs lisp buffer. When I try to comment out code in one of these blocks though, I get # at the begining of the comment, instead of the delimiter for the language of the source code block. This mean that commenting is often a 4 step process of:

Comment the code with M-; leading to code that has the wrong style comment.
Uncomment that code.
Call org-edit-special with C-c ' to get to a buffer specific to the language.
Comment out the code again (and usually go back to the org-mode buffer).

I would like to do this with only the first step if possible. Is there a way to use language specifc comments in org-src block?

A:

https://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00318.html
;; allow comment region in the code edit buffer (according to language)
(defun my-org-comment-dwim (&optional arg)
  (interactive "P")
  (or (org-babel-do-key-sequence-in-edit-buffer (kbd "M-;"))
      (comment-dwim arg)))

;; make `C-c C-v C-x M-;' more convenient
(define-key org-mode-map
  (kbd "M-;") 'my-org-comment-dwim)

