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
;; -*- lexical-binding: t; -*- | |
(with-eval-after-load 'envrc | |
(defun envrc--export-async (env-dir result-fn) | |
(unless (file-exists-p (expand-file-name ".envrc" env-dir)) | |
(error "%s is not a directory with a .envrc" env-dir)) | |
(message "Running direnv in %s..." env-dir) | |
(unwind-protect | |
(let ((default-directory env-dir) | |
(stdout (generate-new-buffer (concat " *direnv output at " env-dir "*"))) | |
(stderr (generate-new-buffer (concat "*envrc at " env-dir "*")))) |
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
(require 'slime) | |
(defvar next-browser-connection nil) | |
(defun get-next-browser-connection () | |
(if (and next-browser-connection | |
(find next-browser-connection slime-net-processes)) | |
next-browser-connection | |
(aif (ignore-errors | |
(slime-net-connect "localhost" |
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
(define-parenscript %scroll-to-top--scaled | |
((scale (next:current-zoom-ratio (next:current-buffer)))) | |
(ps:chain window (scroll-by 0 (* (ps:lisp scale) | |
(- (ps:chain document body scroll-height)))))) | |
(define-parenscript %scroll-to-bottom--scaled | |
((scale (next:current-zoom-ratio (next:current-buffer)))) | |
(ps:chain window (scroll-by 0 (* (ps:lisp scale) | |
(ps:chain document body scroll-height))))) |
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
;; direnv (and lorri) are necessary for this to be useful | |
(use-package direnv | |
:config | |
(direnv-mode) | |
;; This advice evaluates the contents of the emacsHook environment | |
;; variable when direnv updates. Note that this runs every time | |
;; direnv-update-directory-environment is called whether or not | |
;; there was a change. | |
(defun run-emacs-hook () | |
(when (getenv "emacsHook") |