Last active
January 6, 2024 07:25
-
-
Save jhrr/8852178 to your computer and use it in GitHub Desktop.
Make sure emacsen in a graphical frame running on OSX have the correct path and that the hash key (alt-3) is working.
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
;; Detect OS | |
(defvar macosx-p (string-match "darwin" (symbol-name system-type))) | |
;; osx fixes | |
(defun insert-hash () | |
(interactive) | |
(insert "#")) | |
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell | |
(shell-command-to-string "$SHELL -i -c 'echo $PATH'"))) | |
(setenv "PATH" path-from-shell) | |
(setq exec-path (split-string path-from-shell path-separator)))) | |
(when macosx-p | |
(global-set-key "\263" 'insert-hash) | |
(set-exec-path-from-shell-PATH)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment