From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: one key-press to comment out lines of code? Date: Wed, 30 Apr 2014 19:38:13 +0200 Message-ID: <53613505.8010705@easy-emacs.de> References: <87fvku94ms.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1398879542 12784 80.91.229.3 (30 Apr 2014 17:39:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2014 17:39:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 30 19:38:57 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WfYTA-0006Wu-Rt for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 19:38:56 +0200 Original-Received: from localhost ([::1]:58259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfYTA-0007Sv-ET for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 13:38:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfYSr-0007Ou-EN for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 13:38:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfYSi-0004xb-Dq for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 13:38:37 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.13]:57492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfYSi-0004wq-41 for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 13:38:28 -0400 Original-Received: from [192.168.178.32] (brln-4db91f15.pool.mediaWays.net [77.185.31.21]) by mrelayeu.kundenserver.de (node=mreue101) with ESMTP (Nemesis) id 0MKJHi-1WhCcT3ysQ-001lAa; Wed, 30 Apr 2014 19:38:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.4.0 In-Reply-To: <87fvku94ms.fsf@skimble.plus.com> X-Provags-ID: V02:K0:Vfo6RRDfrI9MSzeeqlSv2wS9DqHVrs+qjhmtJUHblj1 0r9HbTgD0qJIHRmPlZmcxs+EMSr0NCsjW484mvRhDSawCLHRyv Dlqz0U35mCcI1fwFkzksSCcbzpDzlmtKmmX3c3BmnGR6ZBhRQ6 56WbZjSo4Q0IirYNfkivHCmYdDSVGMguAURvHsFJe9quRM594a q2yNN46WCq4vssdEX94Y524+LRbcPAsBSylmrKAVqhggYzaBnE FQrsOtuf6kTuMrGiz9xYaVCqN3a1G1mEeNyYciXZW6DC/1d+ZM B5XCXI1WdecoITh+i6q7rXR2pBCHjqX562Sree6ELpXTxZ/Adk pgwfpx4GczOLRABQY4z1Tb7DGA80EAmzjwVT5gq9A X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.13 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97491 Archived-At: On 30.04.2014 18:14, Sharon Kimble wrote: > Whilst I'm still learning emacs and gnus I'm constantly adding code to my > "setup-testbed.el" file, and then finding later that it doesn't do what its > expected to do, or I don't like the outcome, so I then comment it > out. Currently, I'm doing it laboriously by hand, but is it possible to > highlight it and then with one key-press insert ";" in front of each and every > line of the code please? > > I haven't seen this ability anywhere, but being able to do it would make > things a whole lot easier for me, so, can it be done please folks? > > Sharon. > Maybe try ar-comment-or-uncomment-lor Comment line or region, unless it's already commented: uncomment then. and available here: https://launchpad.net/s-x-emacs-werkstatt ar-comment-lor.el While this saves keystrokes and thus using this daily, nonetheless, as for Emacs beginners recommend to stay with shipped code. Also WRT to region comment-dwim is preferable - the region needs to be marked than anyway, there is not that saving. Andreas