emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] comment org code block


From: John Kitchin
Subject: Re: [O] comment org code block
Date: Sat, 27 Jun 2015 10:18:08 -0400

 (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 <address@hidden>
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]