From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [PATCH] make comment-dwim in source code blocks more DWIM-ish Date: Thu, 07 Nov 2013 10:28:07 +0100 Message-ID: <86r4as8st4.fsf@somewhere.org> References: <1382996437-11695-1-git-send-email-aaronecay@gmail.com> <871u2w1k2m.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Bastien, Bastien wrote: >> This patch makes it easier to (un)comment lines of babel source. Now >> M-; in a soucre code block should Just Work. > > It does! Something I've been wanting since long. It did work for me (since long) with: --8<---------------cut here---------------start------------->8--- ;; 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) --8<---------------cut here---------------end--------------->8--- Best regards, Seb -- Sebastien Vauban