From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: delete the first few chars of each line Date: 22 Sep 2003 22:08:17 +0200 Organization: informatimago.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87llsgwpqm.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1064261919 1427 80.91.224.253 (22 Sep 2003 20:18:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2003 20:18:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 22 22:18:37 2003 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 1A1X8m-0000Pw-01 for ; Mon, 22 Sep 2003 22:18:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A1X5y-0000DW-L5 for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Sep 2003 16:15:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeeder.edisontel.com!fu-berlin.de!uni-berlin.de!thalassa.informatimago.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: thalassa.informatimago.com (195.114.85.198) Original-X-Trace: news.uni-berlin.de 1064261298 3958688 195.114.85.198 (16 [41911]) User-Agent: Gnus/5.09 (Gnus v5.9.0) 21.3.50.pjb1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:116796 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:12721 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12721 Zimmen Gnauh writes: > To delete the first 10 chars of a line. Is there any simpler way > than the following: > > (let beg (progn (beginning-of-line) (point)) > (delete-region beg 10)) C-h f let RET (while (re-search-forward "^.........." nil t) (delete-region (match-beginning 0) (match-end 0))) or if you don't need it in a script: M-x replace-regexp RET ^.......... RET RET -- __Pascal_Bourguignon__ http://www.informatimago.com/ Do not adjust your mind, there is a fault in reality.