From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jacob Gerlach Newsgroups: gmane.emacs.help Subject: Re: Operate on each line in region Date: Wed, 23 Apr 2014 12:18:28 -0700 (PDT) Message-ID: <8a35bad7-fd4a-4755-95c2-528b96e032b1@googlegroups.com> References: <787a28ce-2ab1-4b11-92fd-ca4506447baa@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398280827 581 80.91.229.3 (23 Apr 2014 19:20:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Apr 2014 19:20:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 23 21:20:20 2014 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Wd2iR-0002aO-5f for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Apr 2014 21:20:19 +0200 Original-Received: from localhost ([::1]:34377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wd2iQ-0006Vp-OH for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Apr 2014 15:20:18 -0400 X-Received: by 10.52.146.45 with SMTP id sz13mr21396726vdb.6.1398280708750; Wed, 23 Apr 2014 12:18:28 -0700 (PDT) X-Received: by 10.140.32.52 with SMTP id g49mr123676qgg.17.1398280708717; Wed, 23 Apr 2014 12:18:28 -0700 (PDT) Original-Path: usenet.stanford.edu!cm18no5730957qab.0!news-out.google.com!dz10ni19326qab.1!nntp.google.com!cm18no5730954qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=18.189.122.134; posting-account=Hx-_8AoAAACyMXgs4MCS3wNERNLct_lk Original-NNTP-Posting-Host: 18.189.122.134 User-Agent: G2/1.0 Injection-Date: Wed, 23 Apr 2014 19:18:28 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:205073 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97339 Archived-At: > One could imagine that since this is a fairly common need, there might=20 >=20 > be a macro like with-region or with-region-lines that already does it. This is exactly what I was imagining, I just didn't know it. In any case, align-regexp seems to be the most straightforward of all, sinc= e it seems to be able to do exactly what I need. I haven't worked out the s= yntax yet to insert the white space at the beginning of the line instead of= after the text ('foo' or 'longerfoo'), but I'm working on that part!