From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rupert Swarbrick Newsgroups: gmane.emacs.help Subject: Re: How to do rectangular cut(visual block) in emacs Date: Tue, 24 Mar 2009 12:44:30 +0000 Organization: albasani.net Message-ID: References: <8763hz1hd4.fsf@lion.rapttech.com.au> <36481928-7e91-4a13-a25f-37777e8878ec@y9g2000yqg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1237902119 8903 80.91.229.12 (24 Mar 2009 13:41:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Mar 2009 13:41:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 24 14:43:16 2009 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 1Lm6uS-0006fr-3T for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Mar 2009 14:43:16 +0100 Original-Received: from localhost ([127.0.0.1]:50596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lm6t5-0008RM-2v for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Mar 2009 09:41:51 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!news2.arglkargh.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-X-Trace: news.albasani.net Xx25/m5m5h1y2kBHGeLEtWBD3mYEFXs1Bqi5tnRqFUI/veueic3qxuxsPjvnh9QF8Ajbt1mQleOoaTnm5ZjdfxgzxcuKsvcCpO8LrNqYZrFXX5W9/X+1Zu9uPFfQkagE Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Tue, 24 Mar 2009 12:44:33 +0000 (UTC) X-User-ID: R8vQnsiPiPbOjzXlB9OdHqIpF7fvI4/SXZnqTvddtDE= Cancel-Lock: sha1:K4CR9XfKr603rd54z1BmYrkvDIk= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.91 (gnu/linux) X-NNTP-Posting-Host: NhxOC5ALSa2v2jFmpNGFCuThbsctfNO73253VXnb+jI= Original-Xref: news.stanford.edu gnu.emacs.help:167941 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:63233 Archived-At: --=-=-= Francis Moreau writes: > Now let say's I have the following text: > > a/ this is a line > b/ this is a very long line > c/ a short one > > and I want to copy the rectangle of this text without the a/ b/ c/ > > How do I move to the bottom right corner without adding space to the > last > line ? My personal solution? Use a normal M-w to plonk the whole list onto the kill-ring, C-x C-b to a temporary buffer (I tend to use C-x C-b b RET), yank the lot, use C-x r k to kill the starts of the lines and then C-w the result and yank it to wherever it's needed. There are probably swankier ways of doing it, but variants on this trick solve all sorts of weird and wonderful layouts of stuff you want to mangle. Another solution would be C-M-% [a-z]/ RET RET of course. Rupert --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iJwEAQECAAYFAknI1a8ACgkQRtd/pJbYVoaXyQQAjECGgWFsU/ruFXKamtH0RJDp 6FVaMxiyPZn3uOiNHgYAYJuqgHL4spFt5HUnVzGpQI/1ZWZCTIhBhe0B+d3bWVfn WGj78oVp+yfAG3HAwz/lmfrLrkMl0yjp8GxismIJN2IGL23BqhqQGjABmi1+xQ9p h5OICgsb+4O14MVaT8s= =3TWT -----END PGP SIGNATURE----- --=-=-=--