From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= Newsgroups: gmane.emacs.devel Subject: Re: awesome feature (yet to be added?) Date: Sun, 04 May 2014 20:33:58 +0200 Message-ID: <53668816.3090301@online.de> References: <112075085.1028629.1399142864865.open-xchange@email.1and1.com> <660280578.1034380.1399166618013.open-xchange@email.1and1.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1399228474 15478 80.91.229.3 (4 May 2014 18:34:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2014 18:34:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 04 20:34:28 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 1Wh1F2-00076o-LP for ged-emacs-devel@m.gmane.org; Sun, 04 May 2014 20:34:24 +0200 Original-Received: from localhost ([::1]:54200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wh1F2-0004QT-7K for ged-emacs-devel@m.gmane.org; Sun, 04 May 2014 14:34:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wh1Eu-0004Pm-BM for emacs-devel@gnu.org; Sun, 04 May 2014 14:34:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wh1Eo-0007B2-TC for emacs-devel@gnu.org; Sun, 04 May 2014 14:34:16 -0400 Original-Received: from mout.kundenserver.de ([212.227.17.10]:59725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wh1Eo-0007Al-IS for emacs-devel@gnu.org; Sun, 04 May 2014 14:34:10 -0400 Original-Received: from [192.168.178.32] (brln-4d0c4f0b.pool.mediaways.net [77.12.79.11]) by mrelayeu.kundenserver.de (node=mreue104) with ESMTP (Nemesis) id 0Mg6ir-1WT5Pk3yZ3-00NQTf; Sun, 04 May 2014 20:34:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.4.0 In-Reply-To: <660280578.1034380.1399166618013.open-xchange@email.1and1.com> X-Provags-ID: V02:K0:25hpeQDJb7TNf2feQ8JRHtMqJfGA1zAO1XLYRi9ppFj uCbEesoUkWyCBf/jheFMltJz7s1LdJ/Fyugk/XKMpDDPjHJSL8 UEAdGBLRn3sVsDseVFNjg2CjfIaIXoSgek3ikMisxyoLtAf1le xFCI5rm93oDpr7jHEodLLElzHg447FkI9VDsDqoPmnwN8DpyKq D7FBxDL4p/+XRK8aFoPOdiW22zcWW8bt0eZWDh0n3WG2IiH9ei a4kJv0PDFxZQ1JTjmE1Ir1F60rd8lE8YJbWXTVnMPauI+D3kz/ FJ85Q6Pl7eGpR8UGvTGHiOBi8phM80bSKkyFVA8lmd5p+7rtw1 RUKjjGvrJo3ERBKfRYUvKr7Wy0vp0M3qoAiwHaL6I X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.10 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:171689 Archived-At: On 04.05.2014 03:23, Bric wrote: > > I had some private responses that suggest my original post wasn't too clear; i > left my main idea obscurely implied: > > I am suggesting an INVERSION or reversal of whatever commented/uncommented state > of EVERY LINE in the selected region. > > See my example below: the before and after states are inverted. The before > state has a commented block then an uncommented block. > > My hypothetical command reverses that: the after state has an uncommented block > followed by a commented block. That effect should take place in one command, > with the entire eight lines of code selected a single selected block to which to > apply the command. > > hope this clarifies it... > >> On May 3, 2014 at 2:47 PM Bric wrote: >> >> >> Hi, all >> >> unless it already exists, I thought of an awesome time-saving command: >> invert-comment >> >> this to be on a par with "comment-region" and "uncomment-region". >> >> "invert-comment" would change something like this : >> >> /* int b_progress; */ >> /* int i_seek; */ >> /* hnd_t hin; */ >> /* hnd_t hout; */ >> >> int c_progress; >> int j_seek; >> hnd_e hin; >> hnd_f hout; >> >> >> to: >> >> >> int b_progress; >> int i_seek; >> hnd_t hin; >> hnd_t hout; >> >> /* int c_progress; */ >> /* int j_seek; */ >> /* hnd_e hin; */ >> /* hnd_f hout; */ >> >> >> ------------- >> >> not for all occasions, but can be very useful for some, it seems to me. >> >> Maybe it's easily added with a scheme script or something. >> >> thanks! >> > > When code is marked as region, M-x comment-dwim RET should do what you want. Without region, this inverts also linewise: ar-comment-or-uncomment-lor available here: https://launchpad.net/s-x-emacs-werkstatt