Created
April 12, 2012 14:03
-
-
Save tenpn/2367513 to your computer and use it in GitHub Desktop.
emacs function to execute a shell command with the current buffer filename as an argument
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; eg when in a text file, (execute-shell-command-on-buffer "p4 edit %s") will check out the file in perforce | |
(defun execute-shell-command-on-buffer (shell-command-text) | |
(interactive "MShell command:") | |
(shell-command (format shell-command-text (shell-quote-argument buffer-file-name))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In partial answer to my own stack overflow question:
http://stackoverflow.com/q/10121944/11801