all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Commenting out block of code in emacs in python mode
Date: Thu, 14 Jan 2010 08:23:33 +0100	[thread overview]
Message-ID: <87wrzldua2.fsf@tux.homenetwork> (raw)
In-Reply-To: 87tyupd5eg.fsf@castleamber.com

John Bokma <john@castleamber.com> writes:

> alex47387 <alexander.dietz72@googlemail.com> writes:
>
>> Hi,
>>
>> I hope I am posting this question in the right forum; otherwise please let
>> me know. 
>>
>> Here is my problem:
>> I usually develop python code with emacs, emacs being in python code. On my
>> desktop a version is installed and/or configured that way, so I easily can
>> choose a region in the code and simply click on a menu option to comment out
>> this block of code (i.e. at the begin of each line in the selected code two
>> '##' are put). That is very convenient.
>> However, on my Laptop, running F12 and emacs 23.1.1, this menu option is
>> missing! I searched within google and found the hint that by pressing 'C-c
>> #' I also can comment out a selected region. But on my emacs it says: 'C-c #
>> is undefined'. Am I missing something? Anyone any idea how to
>> fix/install/update/solve this problem, so I can easily choose a couple of
>> python lines and comment them out?
>
> M-;   comment DWIM, works on selected region

C-c # is a command of python-mode.el, that is not part of Emacs.
To uncomment you have just to C-u C-c #.

However,you are probably using the python mode that come with emacs.
So with this less mode you will have to use M-; that can lead to
problems of indentation in the lines that come after commented lines
made with M-;.

So if you work a lot on python, you should use python-mode.el.
 
-- 
Thierry Volpiatto





  reply	other threads:[~2010-01-14  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1366.1263418301.18930.help-gnu-emacs@gnu.org>
2010-01-13 22:08 ` Commenting out block of code in emacs in python mode John Bokma
2010-01-14  7:23   ` Thierry Volpiatto [this message]
2010-01-13  8:35 alex47387

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wrzldua2.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=help-gnu-emacs@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.