[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] source-block 'uncomment-region' comments out a second time
From: |
Berry, Charles |
Subject: |
Re: [O] source-block 'uncomment-region' comments out a second time |
Date: |
Wed, 24 Apr 2019 18:05:18 +0000 |
My bad. See inline.
> On Apr 24, 2019, at 8:45 AM, Daniel Herzig <address@hidden> wrote:
>
> Hi!
>
> "Berry, Charles" <address@hidden> writes:
>
>>> On Apr 22, 2019, at 3:49 AM, Daniel Herzig <address@hidden> wrote:
>>>
>>> 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.
>>
>> With more modern versions (9.2.3, for example), the behavior you describe
>> does not occur.
>>
I should have said M-; behaves as you would expect.
But it runs `org-comment-dwim' when in an org-mode buffer.
Outside of org-mode it runs `comment-dwim' which calls on `(un)comment-region'.
>> viz., (un)commenting is language aware in the org buffer (as well as in the
>> edit buffer).
>>
>> HTH,
>>
>> Chuck
>
> Thanks for your hint.
>
> I just upgraded to 9.2.3 through org/elpa -- but the situation seems to have
> gotten even worse in my case. Not only (un)comment-region in a
> source-code block of the main .org-file (not inside the edit-buffer) still do
> the
> same thing (commenting *OUT*) -- now the commands even comment out the
> first part of the next line after the marked region, resulting in
> tearing this line apart.
>
Right. I confirm this.
So the advice is to use `org-comment-dwim' (which silently does `comment-dim'
in an edit buffer).
HTH,
Chuck