help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrap predefined text around region


From: Andreas Röhler
Subject: Re: Wrap predefined text around region
Date: Fri, 03 Dec 2010 13:14:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6

Am 02.12.2010 23:05, schrieb Harry Putnam:
Can anyone show an example of how to do something like this:

I want to wrap this:

   # [HP 101202_15:55:07
   # ]

Around the selected text...
    <selected text region here>
    <selected text region here>
    <selected text region here>
    <selected text region here>

that is, select some text and press a key
combo ... voila... its now surrounded by:
   # [HP 101202_15:55:07

   # ]

Over the yrs I've acquired a fairly lengthy .emacs mostly by theft
from more skilled people.  Coding something like that is clear out of
my skill set.

I use lots of `skeleton' things for inserting various predefined texts
but don't know how to make that happen to selected region.

Usually given an example, I've been able to hack it up to my needs.




Hi,

maybe try `ar-blok-region-atpt'

from

thing-at-point-utils.el at
https://launchpad.net/s-x-emacs-werkstatt

`blok' means arbitrary beg- and end-string, ie a markup.

Should be easy to re-define for your needs.

HTH

Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]