Commenting out block of code in emacs in python mode

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Commenting out block of code in emacs in python mode
# 1  
Old 01-13-2010
Question Commenting out block of code in emacs in python mode

Hi,

I am not sure if this is the right forum to post an emacs question, but if you could point me to an appropriate emacs forum that would be useful too.

Anyway, here is the description of the 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
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Commenting a block of code in xml where the tags may be similar

I want to comment a block of code in xml. Note that the tags will be similar. In the below xml code, I want to block the listener block for com.pkg1.class2. How do i do it ? Thanks in Advance <listener> <listener-class>com.pkg1.class1</listener-class> </listener> ......... <listener>... (4 Replies)
Discussion started by: Lakshmikumari
4 Replies

2. UNIX for Dummies Questions & Answers

How to use emacs? Also how to open existing emacs files with .cgi format?

Hi All, I am new to this forum and a beginner in unix. Please correct me if I put the question in a wrong way.. How to use emacs editor? Also how to open existing emacs files with .cgi format? I have the following link :- http link i.e. url and path : /abc/xyz.dev/xyz/documents What... (7 Replies)
Discussion started by: swathi123
7 Replies

3. UNIX for Dummies Questions & Answers

Code commenting Problems in shell scripting

Hi Friends, I Want to comment one line of code from below code. DBA_ORACLE_USER=`DB.sh -u -a User` DBA_ORACLE_PWORD=`DB.sh -p -a User` sqlplus /nolog <<-END > ${logfile} 2>&1 WHENEVER OSERROR EXIT 9 WHENEVER SQLERROR EXIT SQL.SQLCODE connect... (3 Replies)
Discussion started by: as234301
3 Replies

4. UNIX for Dummies Questions & Answers

Emacs starts in c++ mode but doesn't use c++ setup

Hi, I'm trying to use Emacs to edit C++ files (extension .cpp). My ~/.emacs file contains: (defun my-c++-indent-setup () (setq c-basic-offset 4) (setq c-default-style "linux") ) (add-hook 'c++-mode-hook 'my-c++-indent-setup) When I open a C++ file in Emacs, it's in C++ mode (the... (1 Reply)
Discussion started by: linuxnoob12
1 Replies

5. Shell Programming and Scripting

How to execute the rest of the code after commenting multiple lines?

Hi, As I have seen in this forum how to comment multiple lines in the script, but it does not work properly for me. It is blocking the code but it does not execute the rest of the codes. This is my code #! /usr/bin/ksh month='date +"m%"' : << Comments Block if || then echo "inc =... (12 Replies)
Discussion started by: Yamini Thoppen
12 Replies

6. UNIX for Dummies Questions & Answers

emacs in text mode how to?

hello all I saw somewhere there is some kind of version of emacs in full text mode ? how can I get/download it? if I have ordenry emacs installed can I start it in text mode? thanks (2 Replies)
Discussion started by: umen
2 Replies

7. Shell Programming and Scripting

python vs bash - verbose mode

hey all! i'm looking how to render verbose python scripts. what i'm looking for would be an equivalent to a "bash -xf" in bash script headers.. Any help? (2 Replies)
Discussion started by: penguin-friend
2 Replies
Login or Register to Ask a Question
etags(1)						      General Commands Manual							  etags(1)

NAME
etags - Generates a tags file for the emacs or mule editor SYNOPSIS
etags [-a | -append] [-C | -c++] [-D | -no-defines] [-i tagsfile2 | -include=tagsfile2] [-o tagsfile | -output=tagsfile] [-S | -ignore-indentation] [-H | -help] [-V | -version] filename... OPTIONS
Appends output to an existing vi-format tags file. (Supports operation of the emacs editor in vi mode.) Treats files with or extensions as C++, rather than C, code. The etags command always treats files with extensions as C++ code. Does not create tag entries for C preproces- sor definitions. If many header files are tagged, using this option may make the tags file much smaller. Includes a note in the output tags file to indicate that, when searching for a tag, one should also consult the tagsfile2 tags file. Explicitly names the output tags file; overrides the default name, which is TAGS. Instructs etags not to rely on indentation to determine nesting level. Currently, this means not to assume that a closing brace in the first column is the final brace in a function or structure definition in C or C++ code. Prints usage information. Prints the current version of the program. OPERANDS
Specifies the input language source file, or files, to be processed. DESCRIPTION
The etags program creates a tag table file in a format understood by the emacs editor. The program understands the syntax of C, C++, For- tran, Pascal, and Lisp source files. It reads the source files specified on the command line and writes a tag table (named TAGS by default) in the working directory. Recognition of the language used in an input file is based on the filename extension and file contents; there are no options for specifying the language. NOTES
The etags program is software distributed by the Free Software Foundation. SEE ALSO
Commands: emacs(1), mule(1) etags(1)