summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacs15
-rw-r--r--emacs.elcbin10792 -> 11153 bytes
2 files changed, 15 insertions, 0 deletions
diff --git a/emacs b/emacs
index 0533131..fc1afa7 100644
--- a/emacs
+++ b/emacs
@@ -419,3 +419,18 @@ If this is set during find-file, flyspell mode gets enabled automaticaly.")
(call-process
"wmctrl" nil nil nil "-i" "-R"
(frame-parameter (or frame (selected-frame)) 'outer-window-id)))
+
+;; quick open shell
+(defun dirname (file)
+ (replace-regexp-in-string "[^/]*$" "" file))
+
+(defun open-buffer-shell ()
+ (interactive)
+ (if buffer-file-name
+ (start-process-shell-command
+ "urxvt"
+ nil
+ (concat "DIR=" (dirname buffer-file-name) " urxvt"))
+ (message "Buffer does not contain a file.")))
+
+(global-set-key (kbd "<f12>") 'open-buffer-shell)
diff --git a/emacs.elc b/emacs.elc
index 748ff8a..0aa03be 100644
--- a/emacs.elc
+++ b/emacs.elc
Binary files differ