From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: source-block 'uncomment-region' comments out a second time Date: Wed, 24 Apr 2019 18:05:18 +0000 Message-ID: <983E45C1-46DB-45FE-8218-AA049688606E@ucsd.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:36207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJMGr-0005QU-6o for emacs-orgmode@gnu.org; Wed, 24 Apr 2019 14:05:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJMGp-0004wW-OP for emacs-orgmode@gnu.org; Wed, 24 Apr 2019 14:05:25 -0400 Received: from iport-acv3-out.ucsd.edu ([132.239.0.4]:51151) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJMGp-0004u6-7R for emacs-orgmode@gnu.org; Wed, 24 Apr 2019 14:05:23 -0400 In-Reply-To: Content-Language: en-US Content-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Daniel Herzig Cc: Emacs-Orgmode My bad. See inline. > On Apr 24, 2019, at 8:45 AM, Daniel Herzig wro= te: >=20 > Hi! >=20 > "Berry, Charles" writes: >=20 >>> On Apr 22, 2019, at 3:49 AM, Daniel Herzig w= rote: >>>=20 >>> 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. >>=20 >> With more modern versions (9.2.3, for example), the behavior you describ= e does not occur. >>=20 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-regi= on'. >> viz., (un)commenting is language aware in the org buffer (as well as in = the edit buffer). >>=20 >> HTH, >>=20 >> Chuck >=20 > Thanks for your hint.=20 >=20 > I just upgraded to 9.2.3 through org/elpa -- but the situation seems to h= ave > 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) stil= l 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. >=20 Right. I confirm this. So the advice is to use `org-comment-dwim' (which silently does `comment-di= m' in an edit buffer). HTH, Chuck=