From: Ken Mankoff <mankoff@gmail.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: Org-Mode mailing list <emacs-orgmode@gnu.org>,
John Kitchin <jkitchin@andrew.cmu.edu>
Subject: Re: uncommnet-region behavior in org-src blocks
Date: Sat, 19 Mar 2016 14:07:23 -0400 [thread overview]
Message-ID: <m2zitugx44.fsf@gmail.com> (raw)
In-Reply-To: <87k2ky8jwd.fsf@ucl.ac.uk>
On 2016-03-19 at 13:20, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> On Saturday, 19 Mar 2016 at 12:44, John Kitchin wrote:
>> I noticed that you try to uncomment a region in a src block a # gets
>> inserted!
>>
>> #+BEGIN_SRC emacs-lisp
>> ; test
>> #+END_SRC
>>
>>
>> If you select ; test and run uncomment-region you get this:
>>
>> #+BEGIN_SRC emacs-lisp
>> # ; test
>> #+END_SRC
>>
>> It also does that in Python. Any ideas why?
>
> Because you're in org mode, not emacs-lisp or python? If you want to
> comment/uncomment codes within a src block, my guess is you would need
> to open up the blocks (C-c ') and then comment/uncomment...
https://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00318.html
#+BEGIN_SRC emacs-lisp :results none
;; allow comment region in the code edit buffer (according to language)
(defun my-org-comment-dwim (&optional arg)
(interactive "P")
(or (org-babel-do-key-sequence-in-edit-buffer (kbd "M-;"))
(comment-dwim arg)))
;; make `C-c C-v C-x M-;' more convenient
(define-key org-mode-map
(kbd "M-;") 'my-org-comment-dwim)
#+END_SRC
-k.
next prev parent reply other threads:[~2016-03-19 18:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 16:44 uncommnet-region behavior in org-src blocks John Kitchin
2016-03-19 17:20 ` Eric S Fraga
2016-03-19 18:03 ` John Kitchin
2016-03-19 19:39 ` Eric S Fraga
2016-03-19 18:07 ` Ken Mankoff [this message]
2016-03-19 23:27 ` John Kitchin
2016-03-20 0:15 ` Ken Mankoff
2016-03-20 15:17 ` John Kitchin
2016-03-20 15:53 ` Ken Mankoff
2016-04-03 20:36 ` Adam Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2zitugx44.fsf@gmail.com \
--to=mankoff@gmail.com \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
--cc=jkitchin@andrew.cmu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).