From: lode leroy <lode.leroy@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: recompile
Date: Wed, 13 Mar 2013 16:17:37 +0100 [thread overview]
Message-ID: <CA+N9e5bZWK0qfwdvjR1c0S+G3DwAZEvZ5xgWrcyH97o-e=rSWw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
I want to define a keyboard macro that does the following:
copy the current line, do a few search-and-replace operations and run it in
a shell...
I haven't done anything non-trivial in elisp, so I need some help...
something along the lines of:
(defun recompile-current-line
(beginning-of-line)
(set-mark-command)
(end-of-line)
(copy-region-as-kill)
(shell-command
(replace-regexp "^" "cd ~/build && "
current-kill)))
can someone give some advice on how to implement this?
[-- Attachment #2: Type: text/html, Size: 580 bytes --]
next reply other threads:[~2013-03-13 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 15:17 lode leroy [this message]
2013-03-14 9:23 ` recompile Stephen Berman
2013-03-14 13:16 ` recompile Doug Lewan
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+N9e5bZWK0qfwdvjR1c0S+G3DwAZEvZ5xgWrcyH97o-e=rSWw@mail.gmail.com' \
--to=lode.leroy@gmail.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.
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).