all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* recompile
@ 2013-03-13 15:17 lode leroy
  2013-03-14  9:23 ` recompile Stephen Berman
  2013-03-14 13:16 ` recompile Doug Lewan
  0 siblings, 2 replies; 3+ messages in thread
From: lode leroy @ 2013-03-13 15:17 UTC (permalink / raw)
  To: help-gnu-emacs

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-14 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 15:17 recompile lode leroy
2013-03-14  9:23 ` recompile Stephen Berman
2013-03-14 13:16 ` recompile Doug Lewan

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.