From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: comment org code block Date: Sat, 27 Jun 2015 10:18:08 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8qvv-0006LN-FN for emacs-orgmode@gnu.org; Sat, 27 Jun 2015 10:18:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8qvr-0005AA-En for emacs-orgmode@gnu.org; Sat, 27 Jun 2015 10:18:15 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:35650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8qvr-0005A5-9o for emacs-orgmode@gnu.org; Sat, 27 Jun 2015 10:18:11 -0400 Received: by qkbp125 with SMTP id p125so70373778qkb.2 for ; Sat, 27 Jun 2015 07:18:11 -0700 (PDT) In-reply-to: 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: Xebar Saram Cc: org mode (defun comment-org-in-src-block () (interactive) (org-edit-special) (mark-whole-buffer) (comment-dwim nil) (org-edit-src-exit)) ;) Xebar Saram writes: > wow wonderful! > this works flawlessly when i select the region inside the code block and > run the command. > I wonder if any lisp wizards out there can modify Johns code and make it > auto select all lines *inside* the current block and then comment it? could > be useful to other people i assume. > > thx again > > > > On Sat, Jun 27, 2015 at 2:32 PM, John Kitchin > wrote: > >> This seems to work for some toy examples: >> >> (defun comment-org-in-src-block () >> (interactive) >> (org-edit-special) >> (comment-dwim nil) >> (org-edit-src-exit)) >> >> >> Xebar Saram writes: >> >> > Hi all >> > >> > i was wondering if anyone knew of a command or bind to quickly comment >> the >> > entire content of an org code block (with the correct comment syntax)? >> > >> > thx! >> > >> > Z >> >> -- >> Professor John Kitchin >> Doherty Hall A207F >> Department of Chemical Engineering >> Carnegie Mellon University >> Pittsburgh, PA 15213 >> 412-268-7803 >> @johnkitchin >> http://kitchingroup.cheme.cmu.edu >> -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu