* Commenting out block of code in emacs in python mode
@ 2010-01-13 8:35 alex47387
0 siblings, 0 replies; 3+ messages in thread
From: alex47387 @ 2010-01-13 8:35 UTC (permalink / raw)
To: Help-gnu-emacs
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?
Thanks
Alex
--
View this message in context: http://old.nabble.com/Commenting-out-block-of-code-in-emacs-in-python-mode-tp27141245p27141245.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Commenting out block of code in emacs in python mode
[not found] <mailman.1366.1263418301.18930.help-gnu-emacs@gnu.org>
@ 2010-01-13 22:08 ` John Bokma
2010-01-14 7:23 ` Thierry Volpiatto
0 siblings, 1 reply; 3+ messages in thread
From: John Bokma @ 2010-01-13 22:08 UTC (permalink / raw)
To: help-gnu-emacs
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
--
John Bokma
Read my blog: http://johnbokma.com/
Hire me (Perl/Python): http://castleamber.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Commenting out block of code in emacs in python mode
2010-01-13 22:08 ` John Bokma
@ 2010-01-14 7:23 ` Thierry Volpiatto
0 siblings, 0 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2010-01-14 7:23 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-14 7:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 8:35 Commenting out block of code in emacs in python mode alex47387
[not found] <mailman.1366.1263418301.18930.help-gnu-emacs@gnu.org>
2010-01-13 22:08 ` John Bokma
2010-01-14 7:23 ` Thierry Volpiatto
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.