emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: Charles Cave <charles_cave@optusnet.com.au>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: small function suggestion (org-examplize-region)
Date: Wed, 18 Mar 2009 17:07:08 +0100	[thread overview]
Message-ID: <87ab7i24sz.fsf@CPU107.opentrends.net> (raw)
In-Reply-To: <loom.20090318T053435-232@post.gmane.org> (Charles Cave's message of "Wed, 18 Mar 2009 05:35:40 +0000 (UTC)")

El dc, mar 18 2009, Charles Cave va escriure:
>
> (defun prefix-region (prefix)
>   "Add a prefix string to each line between mark and point."
> …

  To do this I use:
1. Put mark at the first line's beginning and point at the last line's beginning
2. C-x r t
3. Type your prefix, ENTER


,----
| C-x r t runs the command string-rectangle, which is an interactive autoloaded
| Lisp function in `rect.el'.
| 
| It is bound to C-x r t.
| 
| (string-rectangle START END STRING)
| 
| 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 „infix“ and „suffix“, 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

      parent reply	other threads:[~2009-03-18 16:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17 18:02 small function suggestion (org-examplize-region) Eric Schulte
2009-03-17 19:00 ` Manish
2009-03-18  8:38   ` Carsten Dominik
2009-03-18  0:50 ` Charles Cave
2009-03-18  1:34   ` Nick Dokos
2009-03-18  5:35     ` Charles Cave
2009-03-18  8:32       ` Mikael Fornius
2009-03-18 16:07       ` Daniel Clemente [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ab7i24sz.fsf@CPU107.opentrends.net \
    --to=n142857@gmail.com \
    --cc=charles_cave@optusnet.com.au \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).