From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Wrap predefined text around region Date: Fri, 03 Dec 2010 13:14:34 +0100 Message-ID: <4CF8DF2A.3030704@easy-emacs.de> References: <87fwufhlup.fsf@newsguy.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291377914 9388 80.91.229.12 (3 Dec 2010 12:05:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Dec 2010 12:05:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 03 13:05:09 2010 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.69) (envelope-from ) id 1POUNw-0002pu-4f for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Dec 2010 13:05:08 +0100 Original-Received: from localhost ([127.0.0.1]:47344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POUNs-0002Nx-HU for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Dec 2010 07:05:04 -0500 Original-Received: from [140.186.70.92] (port=55936 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POUNM-00026b-Pr for help-gnu-emacs@gnu.org; Fri, 03 Dec 2010 07:04:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POUNL-0003E8-D0 for help-gnu-emacs@gnu.org; Fri, 03 Dec 2010 07:04:32 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.8]:60092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POUNK-0003Dj-Vj for help-gnu-emacs@gnu.org; Fri, 03 Dec 2010 07:04:31 -0500 Original-Received: from [192.168.178.29] (brln-4dbc6364.pool.mediaWays.net [77.188.99.100]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MJW8Z-1PN6nJ3O7H-002o4i; Fri, 03 Dec 2010 13:04:28 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 In-Reply-To: <87fwufhlup.fsf@newsguy.com> X-Provags-ID: V02:K0:ziwGfi3o/SBnZJleLC4CqKmRbkvU5Y5dY0bo/vd9+zX i2S4o+bOuM2BvTdaNG2f7obSXJ5ml+Bc/FIpZEna3lTi4o85wY 6UJecwR9RJQj46tQWgh8f5g72kHffugsk2IDHiVsEYPx1IEUry vG+mLP/b7bcbX+4zMpwN+9uHDaUe667N8vsQ+JvmSAcyJ9F32g iWT6DRXaRn32U4Qd8206W6FvTolwDWurxTgKUQn40g= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:75489 Archived-At: 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... > > > > > > 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