emacs-orgmode
[Top][All Lists]
Advanced

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

[O] source-block 'uncomment-region' comments out a second time


From: Daniel Herzig
Subject: [O] source-block 'uncomment-region' comments out a second time
Date: Mon, 22 Apr 2019 10:49:51 +0000

Hi all!

I found a minor problem when editing source code blocks. I am on
Org-Mode 8.2.10 that comes with Emacs 25.1.1 on Debian.

My source code block looks something like:

#+BEGIN_SRC sh :shebang abc :tangle xyz
do this
do that
and that
#+END_SRC

If I enter the block with C-c ' and comment out a region like:

do this
do that

with M-x comment-region, everything works as expected, i.e.:

# do this
# do that

From outside the source-code editor it looks like this now (indentation 
ignored):

#+BEGIN_SRC sh :shebang abc :tangle xyz
# do this
# do that
and that
#+END_SRC

Sometimes I like to make changes to the code without entering the block
with C-c ' -- but if I mark:

# do this
# do that

from outside and hit M-x uncomment-region, my source-code block turns
into this:

#+BEGIN_SRC sh :shebang abc :tangle xyz
# # do this
# # do that
and that
#+END_SRC

I just tried -- it does not make a difference which command I use on the
region (comment-region or uncomment-region) from outside, it will
comment out as often as I use one of them (IF I just tried 3 levels). Inside 
the C-c ' environment
everything is top and working as expected.

It's clear that this kind of workflow is not intended, and I usually
work inside C-c ' for obvious reasions.  I just pointing at it, as in
this case 'comment-region' and 'uncomment-region' seem to do the same,
which is somewhat unexpected.

Best regards,
Daniel




reply via email to

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