emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Deactivate babel source block
@ 2013-10-06  9:41 Michael Bach
  2013-10-06 15:09 ` Eric Schulte
  2013-10-06 15:09 ` Eric Schulte
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Bach @ 2013-10-06  9:41 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-09 16:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-06  9:41 Deactivate babel source block Michael Bach
2013-10-06 15:09 ` Eric Schulte
2013-10-06 15:09 ` Eric Schulte
2013-10-06 15:23   ` Michael Bach
2013-10-07  8:31   ` Rainer M Krug
2013-10-09  9:57     ` Eric S Fraga
2013-10-09 16:28       ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).