From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: Re: small function suggestion (org-examplize-region) Date: Wed, 18 Mar 2009 17:07:08 +0100 Message-ID: <87ab7i24sz.fsf@CPU107.opentrends.net> References: <87hc1sc9iw.fsf@gmail.com> <8287.1237340098@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjyIb-0002pM-L8 for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:07:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjyIW-0002l7-WA for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:07:21 -0400 Received: from [199.232.76.173] (port=35411 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjyIW-0002l3-R6 for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:07:16 -0400 Received: from mail-fx0-f166.google.com ([209.85.220.166]:51882) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LjyIW-00055x-8j for emacs-orgmode@gnu.org; Wed, 18 Mar 2009 12:07:16 -0400 Received: by fxm10 with SMTP id 10so109739fxm.42 for ; Wed, 18 Mar 2009 09:07:11 -0700 (PDT) In-Reply-To: (Charles Cave's message of "Wed, 18 Mar 2009 05:35:40 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Charles Cave Cc: emacs-orgmode@gnu.org El dc, mar 18 2009, Charles Cave va escriure: > > (defun prefix-region (prefix) > "Add a prefix string to each line between mark and point." > =E2=80=A6 To do this I use: 1. Put mark at the first line's beginning and point at the last line's begi= nning 2. C-x r t 3. Type your prefix, ENTER ,---- | C-x r t runs the command string-rectangle, which is an interactive autolo= aded | Lisp function in `rect.el'. |=20 | It is bound to C-x r t. |=20 | (string-rectangle START END STRING) |=20 | Replace rectangle contents with STRING on each line. | The length of STRING need not be the same as the rectangle width. `---- It allows not only to prefix but also to =E2=80=9Einfix=E2=80=9C and =E2= =80=9Esuffix=E2=80=9C, and to replace rectangles of text. Also nice is C-x r k, to delete a rectangular region. And C-x r y, etc. -- Daniel