From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: C K Kashyap Newsgroups: gmane.emacs.help Subject: Re: Need help with creating shortcuts Date: Mon, 25 Jun 2012 14:01:06 +0530 Message-ID: References: <20120624221419.GA3234@mark-laptop> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f3ba85199026f04c347cdc7 X-Trace: dough.gmane.org 1340613094 24842 80.91.229.3 (25 Jun 2012 08:31:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2012 08:31:34 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Mark Skilbeck Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 25 10:31:30 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sj4hi-0008Nx-Gt for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jun 2012 10:31:26 +0200 Original-Received: from localhost ([::1]:39141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj4hi-0001Sn-B4 for geh-help-gnu-emacs@m.gmane.org; Mon, 25 Jun 2012 04:31:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj4hY-0001Si-Eo for help-gnu-emacs@gnu.org; Mon, 25 Jun 2012 04:31:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sj4hR-00040X-Bj for help-gnu-emacs@gnu.org; Mon, 25 Jun 2012 04:31:15 -0400 Original-Received: from mail-yw0-f51.google.com ([209.85.213.51]:64787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sj4hR-00040M-4S for help-gnu-emacs@gnu.org; Mon, 25 Jun 2012 04:31:09 -0400 Original-Received: by yhnn12 with SMTP id n12so2664121yhn.38 for ; Mon, 25 Jun 2012 01:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oXZ5V4+XNpbMVQMfzZDrh8bDN0KrvcJbBGCXew/zH3o=; b=MmCI0F10Zzgb0ebF09q0hmINgxx73ICSdSkPwLn5xe4MwlrVUZi6mzF6sbBhjrnhXg Ij8WOygBJqQgVYIibRRYsi2PLt7ASKColA0ATKg6XBMU5Xma1jwAbjBFG9xH0bvWGP/8 xVKURAJD+bofFckG8Os4ZBAEFtABkeFXf+LzMdrw3qnKRc+HUTKpzml/8GHLlwIOJS26 Vk0h8bqBH2bCeQuSTjPwbhegYJJGwrQFwXRK4L4q9zjw6geqctb8ds+gf37pBwgeKzKn jsXBbr4yAATe9JdSNBBJLx70QCR5JzrtR2zsFfWiW0YC4TN9Y2Tpb4a/4vHK17dG386e udCg== Original-Received: by 10.50.169.38 with SMTP id ab6mr7475956igc.46.1340613066293; Mon, 25 Jun 2012 01:31:06 -0700 (PDT) Original-Received: by 10.64.50.165 with HTTP; Mon, 25 Jun 2012 01:31:06 -0700 (PDT) In-Reply-To: <20120624221419.GA3234@mark-laptop> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.213.51 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85449 Archived-At: --e89a8f3ba85199026f04c347cdc7 Content-Type: text/plain; charset=ISO-8859-1 Thank you Mark, I think, this will do. Regards, Kashyap On Mon, Jun 25, 2012 at 3:44 AM, Mark Skilbeck wrote: > Adding to the previous answer, you might then be interested in the > YASnippet extension[1]. > > [1] https://github.com/capitaomorte/yasnippet#readme > > On Sun, Jun 24, 2012 at 01:27:28PM +0530, C K Kashyap wrote: > > Hi All, > > I've been defining functions to create shortcuts > > > > (defun (hw) (progn > > (delete-fun) ; This is another function that deletes the actual > > function name from the buffer > > (insert "Hello World")) > > > > I invoke it as follows - (hw)C-X-e, this removes (hw) and replaces it > with > > Hello World. > > > > the problem is that I have to type parenthesis. I explored abbreviations > > but they cannot seem to be parameterized. Can someone please suggest an > > alternative? > > > > Regards, > > Kashyap > > -- > - mgs. > > if all you young men / were fish in the water > how many young girls / would undress and dive after > --e89a8f3ba85199026f04c347cdc7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you Mark,

I think, this will do.

Regards,
Kashyap

On Mon, Jun = 25, 2012 at 3:44 AM, Mark Skilbeck <m@iammark.us> wrote:
Adding to the previous answer, you might the= n be interested in the
YASnippet extension[1].

[1] https://github.com/capitaomorte/yasnippet#readme

On Sun, Jun 24, 2012 at 01:27:28PM +0530, C K Kashyap wrote:
> Hi All,
> I've been defining functions to create shortcuts
>
> (defun (hw) (progn
> =A0 =A0 =A0 =A0(delete-fun) ; This is another function that deletes th= e actual
> function name from the buffer
> =A0 =A0 =A0 =A0(insert "Hello World"))
>
> I invoke it as follows - (hw)C-X-e, this removes (hw) and replaces it = with
> Hello World.
>
> the problem is that I have to type parenthesis. I explored abbreviatio= ns
> but they cannot seem to be parameterized. Can someone please suggest a= n
> alternative?
>
> Regards,
> Kashyap

--
- mgs.

if all you young men / were fish in the water
how many young girls / would undress and dive after

--e89a8f3ba85199026f04c347cdc7--