[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] make comment-dwim in source code blocks more DWIM-ish
From: |
Sebastien Vauban |
Subject: |
Re: [O] [PATCH] make comment-dwim in source code blocks more DWIM-ish |
Date: |
Thu, 07 Nov 2013 10:28:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) |
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