Last active
December 20, 2015 02:59
-
-
Save theanalyst/6060298 to your computer and use it in GitHub Desktop.
Some emacs preferences to work in windows
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
;; Some emacs preferences to work with windows | |
;; If you want to follow doctor's advice use Linux :) | |
(defun run-bash () | |
"Runs a bash shell in windows emacs in a buffer called *bash*, | |
multiple instances are allowed. M-x shell still launches cmd. | |
Otherwise this can be directly acheived by pointing | |
`explicit-shell-name' to your shell. | |
Here I'm using Msys Git's bash, which was already in PATH. | |
For customizing prompts etc. refer to shell's documentation, | |
a file in ~/.emacs.d/init_SHELLNAME.sh,SHELLNAME will be most | |
likely sh.exe if you're using executable-find as below" | |
(interactive) | |
(let ((explicit-shell-file-name (executable-find "sh")) | |
(explicit-sh-args '("--login" "-i"))) | |
(shell (generate-new-buffer-name "*bash*")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment