From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: comment org code block Date: Sat, 27 Jun 2015 16:32:44 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3a81cc3ba3db05197fe439 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8qDu-0000Xm-R3 for emacs-orgmode@gnu.org; Sat, 27 Jun 2015 09:32:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8qDt-0005Ez-Ko for emacs-orgmode@gnu.org; Sat, 27 Jun 2015 09:32:46 -0400 Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:36214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8qDt-0005Ee-C9 for emacs-orgmode@gnu.org; Sat, 27 Jun 2015 09:32:45 -0400 Received: by lacny3 with SMTP id ny3so82694494lac.3 for ; Sat, 27 Jun 2015 06:32:44 -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: John Kitchin , org mode --047d7b3a81cc3ba3db05197fe439 Content-Type: text/plain; charset=UTF-8 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 > --047d7b3a81cc3ba3db05197fe439 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
wow wonderful!=C2=A0
this works flawlessly when i sele= ct the region inside the code block and run the command.=C2=A0
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 <jkit= chin@andrew.cmu.edu> wrote:
This seems to work for some toy examples:

(defun comment-org-in-src-block ()
=C2=A0(interactive)
=C2=A0(org-edit-special)
=C2=A0(comment-dwim nil)
=C2=A0(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

--047d7b3a81cc3ba3db05197fe439--