From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Indent region with prefix Date: Thu, 17 Jan 2008 10:23:13 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87sl0wn9n2.fsf@kobe.laptop> References: <90532082-c7a3-4a40-93cb-e876826370e9@u10g2000prn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200566549 7691 80.91.229.12 (17 Jan 2008 10:42:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2008 10:42:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 17 11:42:48 2008 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 1JFSCo-0004Mu-Bz for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jan 2008 11:42:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFSCP-0003yy-GM for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jan 2008 05:42:17 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (berkeley-unix) Cancel-Lock: sha1:eBuDOoHCz+wU+wxqQzOCZaRMwX0= Original-Lines: 34 Original-NNTP-Posting-Host: 62.1.205.36 Original-X-Trace: news.sunsite.dk DXC=8c>SLh5j_iM:1gGY^?UCAJL^MjGl4=h[MC00XNKj7h 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:50772 Archived-At: On Wed, 16 Jan 2008 10:56:09 -0800 (PST), Chris L wrote: > If I have these lines: > > There once was a geek from Nantucket > who counted his loops in a bucket. > But then he found Perl, > his hair started to curl, > and his slide rule fell out of his pucket. > > And I want to transform them as quickly as possible to: > >> There once was a geek from Nantucket >> who counted his loops in a bucket. >> But then he found Perl, >> his hair started to curl, >> and his slide rule fell out of his pucket. > > What do I do? I'm not in Gnus or email mode, this is for Markdown > text. Right now I am using a keyboard macro, but it seems like there > should be a simple bit of magic to accomplish this, since it is so > similar to commenting. You already have a fair number of suggestions in this thread, but in this case it's also simple to: 1. Mark the region 2. M-x replace-regexp RET ^ RET > SPC RET The string-rectangle command is my favorite for anything more complex than a simple regexp can do. HTH, Giorgos