* comment org code block
@ 2015-06-27 9:54 Xebar Saram
2015-06-27 11:32 ` John Kitchin
0 siblings, 1 reply; 4+ messages in thread
From: Xebar Saram @ 2015-06-27 9:54 UTC (permalink / raw)
To: org mode
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 261 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: comment org code block
2015-06-27 9:54 comment org code block Xebar Saram
@ 2015-06-27 11:32 ` John Kitchin
2015-06-27 13:32 ` Xebar Saram
0 siblings, 1 reply; 4+ messages in thread
From: John Kitchin @ 2015-06-27 11:32 UTC (permalink / raw)
To: Xebar Saram; +Cc: org mode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: comment org code block
2015-06-27 11:32 ` John Kitchin
@ 2015-06-27 13:32 ` Xebar Saram
2015-06-27 14:18 ` John Kitchin
0 siblings, 1 reply; 4+ messages in thread
From: Xebar Saram @ 2015-06-27 13:32 UTC (permalink / raw)
To: John Kitchin, org mode
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
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 <jkitchin@andrew.cmu.edu>
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
>
[-- Attachment #2: Type: text/html, Size: 1640 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: comment org code block
2015-06-27 13:32 ` Xebar Saram
@ 2015-06-27 14:18 ` John Kitchin
0 siblings, 0 replies; 4+ messages in thread
From: John Kitchin @ 2015-06-27 14:18 UTC (permalink / raw)
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 <jkitchin@andrew.cmu.edu>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-27 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-27 9:54 comment org code block Xebar Saram
2015-06-27 11:32 ` John Kitchin
2015-06-27 13:32 ` Xebar Saram
2015-06-27 14:18 ` John Kitchin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.