From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Bach Subject: Deactivate babel source block Date: Sun, 06 Oct 2013 11:41:32 +0200 Message-ID: Reply-To: phaebz@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSkqW-0002UL-ED for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 05:41:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSkqP-0004Xe-5K for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 05:41:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:38646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSkqO-0004XZ-V3 for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 05:41:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VSkqO-00075I-7u for emacs-orgmode@gnu.org; Sun, 06 Oct 2013 11:41:44 +0200 Received: from 84-112-231-91.dynamic.surfer.at ([84.112.231.91]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Oct 2013 11:41:44 +0200 Received: from phaebz by 84-112-231-91.dynamic.surfer.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Oct 2013 11:41:44 +0200 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Dear org-mode Users and Developers, I am looking for a nice way to deactivate a babel source block with point being anywhere on it. Imagine e.g. C-c C-v C-w to say "I want to toggle execution/tangling for this block". Background: I have the .emacs setup in a literate org-mode file where I am testing new emacs packages. Now many blocks represent specific features that I want to be activated / deactivated. This should ideally behave like the other source code functions (i.e. C-c C-v family). My naive approach as elisp noob was: #+begin_src emacs-lisp (defun my-org-babel-deactivate () (interactive) (org-edit-special) (mark-whole-buffer) (comment-region) (org-edit-src-exit)) #+end_src Apart from it not working (Wrong number of arguments), this would have been a dirty one in any case. Now I thought there must be a better way by setting/un-setting the respective header arguments in an automated way. Is this already possible with org-mode version 8.2? Best Regards, Michael