From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.devel Subject: Re: awesome feature (yet to be added?) Date: Tue, 06 May 2014 23:27:11 +0100 Message-ID: <87oazaczls.fsf@robertthorpeconsulting.com> References: <53684CB6.1050601@lanl.gov> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1399415261 19864 80.91.229.3 (6 May 2014 22:27:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2014 22:27:41 +0000 (UTC) Cc: emacs-devel@gnu.org, bric@flight.us, l26wang@gmail.com To: Davis Herring Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 07 00:27:34 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Whnpm-0000fk-0j for ged-emacs-devel@m.gmane.org; Wed, 07 May 2014 00:27:34 +0200 Original-Received: from localhost ([::1]:37631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whnpl-0007aP-JK for ged-emacs-devel@m.gmane.org; Tue, 06 May 2014 18:27:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whnpc-0007aI-Pk for emacs-devel@gnu.org; Tue, 06 May 2014 18:27:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhnpT-0000zM-P2 for emacs-devel@gnu.org; Tue, 06 May 2014 18:27:24 -0400 Original-Received: from outbound-smtp04.blacknight.com ([81.17.249.35]:39615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhnpT-0000yC-IH for emacs-devel@gnu.org; Tue, 06 May 2014 18:27:15 -0400 Original-Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp04.blacknight.com (Postfix) with ESMTP id 3378599322 for ; Tue, 6 May 2014 22:25:26 +0000 (UTC) Original-Received: (qmail 7707 invoked from network); 6 May 2014 22:27:13 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.79.222.242]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 6 May 2014 22:27:12 -0000 In-Reply-To: <53684CB6.1050601@lanl.gov> (message from Davis Herring on Mon, 05 May 2014 20:45:10 -0600) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.35 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171726 Archived-At: Davis Herring writes: >> Judging by the uptake. We are the only two to think this is useful. :) > > I thought about implementing `invert-comment' a few years ago, but I > wasn't sure what to do about code like this: > > /* old_implementation_prepare (); */ > /* old_implementation_go (); */ Here's an alternative approach. Dale Snell pointed out that this can be done with rectangle commands. Give your commented code a name. Mark region with the mark and point in the first column. Then do C-x r t ;; foo: RET The region will look like ;; foo: some code (); ;; foo: some more code (); You can do the same for other experiments that are commented out. Then later on you can enable them by using M-% ;; foo: RET RET And you can put a ! at the end of that if you like. I know this doesn't solve all the problems discussed. BR, Robert Thorpe