From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kgold@watson.ibm.com (kgold) Newsgroups: gmane.emacs.help Subject: Re: inserting a space in front of all lines Date: 29 Jan 2004 19:02:49 GMT Organization: IBM T.J. Watson Research Center Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <40185A34.8090904@cisco.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1075403976 4745 80.91.224.253 (29 Jan 2004 19:19:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2004 19:19:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 29 20:19:29 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AmHhI-0007Kl-00 for ; Thu, 29 Jan 2004 20:19:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AmHgv-0005NH-0g for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jan 2004 14:19:05 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cs.utexas.edu!geraldo.cc.utexas.edu!an02.austin.ibm.com!ausnews.austin.ibm.com!newsfeed.btv.ibm.com!news.btv.ibm.com!alpha.watson.ibm.com!kgold Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: alpha.watson.ibm.com Original-X-Trace: news.btv.ibm.com 1075402969 10336 9.2.16.245 (29 Jan 2004 19:02:49 GMT) Original-X-Complaints-To: news@btv.ibm.com Original-NNTP-Posting-Date: 29 Jan 2004 19:02:49 GMT X-Newsreader: xrn 9.02 Original-Xref: shelby.stanford.edu gnu.emacs.help:120572 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:16518 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16518 Jade Dang writes: > I have a file with thousands of lines and I want to indent all of > them. Is there an easy way to do this? You've received replies for indenting. To insert arbitrary text, look at the rectangle commands. In particular, after defining a rectangle with all the lines of interest and of zero width starting in the first column: C-x r t runs the command string-rectangle which is an interactive autoloaded Lisp function in `rect'. Replace rectangle contents with STRING on each line. The length of STRING need not be the same as the rectangle width.