all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Convert an existing keyboard macro to elisp code?
Date: Fri, 03 Aug 2012 17:10:42 +0200	[thread overview]
Message-ID: <87mx2cxb7x.fsf@googlemail.com> (raw)


Hi List, 

I cite from the http://www.emacswiki.org/emacs/KeyboardMacrosTricks
page, where somebody posted exactly the same question that came to my
mind today: 

,-------------------------------------------------------------------
| Is there a way to convert an existing keyboard macro to elisp code?
|
| You can do this with M-x insert-kbd-macro but the result is
| probably not to your liking. If I do:
| 
|  C-x (
|  C-n
|  foo
|  C-x )
|  M-x name-last-kbd-macro RET newline-and-foo
|  M-x insert-kbd-macro RET newline-and-foo RET
| 
| emacs will insert the following into the buffer:
| 
|  (fset 'newline-and-foo
|    "\C-nfoo")
| 
| I would very much like to be able to insert something like this:
| 
|   (defun newline-and-foo ()
|     (interactive)
|     (next-line)
|     (insert "foo"))
| 
| But it appears emacs does not have this feature.
`-------------------------------------------------------------------

Unfortunately, the answer was more a less a 'NO'(or 'YOU HAVE TO WRITE
IT YOURSELF').

Since Emacs is a pretty dynamic project, I thought I give it another try
on the mailing list - maybe this feature request has been implemented in
the meantime by somebody?

-- 
cheers,
Thorsten





             reply	other threads:[~2012-08-03 15:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 15:10 Thorsten Jolitz [this message]
2012-08-03 16:33 ` Convert an existing keyboard macro to elisp code? PJ Weisberg
2012-08-03 17:00   ` Yuri Khan
2012-08-03 18:16   ` Thorsten Jolitz
2012-08-04  6:13   ` Andreas Röhler
     [not found] ` <mailman.6259.1344011630.855.help-gnu-emacs@gnu.org>
2012-08-04  9:48   ` Raffaele Ricciardi
2012-08-04 16:39     ` Thorsten Jolitz
2012-08-04 16:51 ` Suvayu Ali

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

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

  git send-email \
    --in-reply-to=87mx2cxb7x.fsf@googlemail.com \
    --to=tjolitz@googlemail.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.