emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Daniel Herzig <daniel.herzig@outlook.at>
Cc: Emacs-Orgmode <emacs-orgmode@gnu.org>
Subject: Re: source-block 'uncomment-region' comments out a second time
Date: Wed, 24 Apr 2019 18:05:18 +0000	[thread overview]
Message-ID: <983E45C1-46DB-45FE-8218-AA049688606E@ucsd.edu> (raw)
In-Reply-To: <AM6PR03MB573422D7E4AB133F662A5290863C0@AM6PR03MB5734.eurprd03.prod.outlook.com>

My bad. See inline.

> On Apr 24, 2019, at 8:45 AM, Daniel Herzig <daniel.herzig@outlook.at> wrote:
> 
> Hi!
> 
> "Berry, Charles" <ccberry@ucsd.edu> writes:
> 
>>> On Apr 22, 2019, at 3:49 AM, Daniel Herzig <daniel.herzig@outlook.at> 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

  reply	other threads:[~2019-04-24 18:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 10:49 source-block 'uncomment-region' comments out a second time Daniel Herzig
2019-04-22 17:05 ` Berry, Charles
2019-04-24 15:45   ` Daniel Herzig
2019-04-24 18:05     ` Berry, Charles [this message]
2019-04-24 18:42       ` Daniel Herzig

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=983E45C1-46DB-45FE-8218-AA049688606E@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=daniel.herzig@outlook.at \
    --cc=emacs-orgmode@gnu.org \
    /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).