From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Commenting out block of code in emacs in python mode Date: Thu, 14 Jan 2010 08:23:33 +0100 Organization: ThierryVolpiatto Message-ID: <87wrzldua2.fsf@tux.homenetwork> References: <87tyupd5eg.fsf@castleamber.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263454179 24782 80.91.229.12 (14 Jan 2010 07:29:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jan 2010 07:29:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 14 08:29:32 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NVK94-0007hc-AP for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jan 2010 08:29:30 +0100 Original-Received: from localhost ([127.0.0.1]:50120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVK95-000394-0F for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jan 2010 02:29:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVK8e-00037q-7e for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 02:29:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVK8Z-00034Z-Sn for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 02:29:03 -0500 Original-Received: from [199.232.76.173] (port=59946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVK8Z-00034Q-KH for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 02:28:59 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:34415) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVK8Z-00087M-74 for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 02:28:59 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NVK8S-0007XM-Kj for help-gnu-emacs@gnu.org; Thu, 14 Jan 2010 08:28:52 +0100 Original-Received: from 79.88.78.199 ([79.88.78.199]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jan 2010 08:28:52 +0100 Original-Received: from thierry.volpiatto by 79.88.78.199 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jan 2010 08:28:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 79.88.78.199 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUHBARgJRFPS0WbMBTC TSG/uJs0yyVHAAAACXBIWXMAAAsSAAALEgHS3X78AAAACXZwQWcAAAAwAAAAMADO7oxXAAABpUlE QVQ4y3VTQXKDMAyUnD7AwvQOhtxj5N4LFh9ow/+/UtlpM0BczWSS0Wola7UBeEb3+3kJ/5p9ZLz3 UI0n0J0Y4K/lh1nG24FhlJOR2LdSKtpV5gfi/Zd+NdaJBbB4D5N0JnfUIVp6obZURkJwS2a8b9uX AkgxA5gCEcknAH1s2z0DPooWmjGKcJR+HNZt+9bm0GtGRycRuZGs98Ffr02vABWGopIAhmXmxnQN BwBXZjgFLHRoqbfeYxCLWqsjLyKhbEHW+A5nEs699Q2O80ALrgHTmUTy6P0MnKyKQpKHpoNWokxs F0D5VegvWmEozyE6nuMiS98mWzlUQ9bW8qYfqOaFtzWlYCqGeIs6HEyl08jkrxUG9MF5ipXpOOpd ZMoXPPVSLWJiiwNNB+eRSyxJZmQKcacikgucnCRiHuJOLmyYJRDPwOqAvY4pA+Wy+VS8G26BAsdb Ph2Hw7ORy/H0IOG0TnaM8Cp0XrFYyU0v2z8AqkifPVbLZ0qo/gsRg60C7p+8Ov9jrUIxFde+jnAq X42hyp/c+ZcnVyUYBarrqZt3+R8450png3cWKgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAwOC0wNS0z MVQyMjoxNDoyMiswMjowMK3VBDcAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMDctMTAtMjhUMTc6MDg6 NDgrMDE6MDDLdIcLAAAAEXRFWHRqcGVnOmNvbG9yc3BhY2UAMix1VZ8AAAAgdEVYdGpwZWc6c2Ft cGxpbmctZmFjdG9yADJ4MiwxeDEsMXgxSfqmtAAAAABJRU5ErkJggg== User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.91 (gnu/linux) Cancel-Lock: sha1:5DZOqXCumex6IEnKmrCZx4j0rks= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71211 Archived-At: John Bokma writes: > alex47387 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