Skip to content

Instantly share code, notes, and snippets.

@theanalyst
Last active December 20, 2015 02:59
Show Gist options
  • Save theanalyst/6060298 to your computer and use it in GitHub Desktop.
Save theanalyst/6060298 to your computer and use it in GitHub Desktop.
Some emacs preferences to work in windows
;; 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