refactor(wpcarro): Remove briefcase references

TL;DR:
- prefer WPCARRO env-var to BRIEFCASE
- remove repository URLs from Emacs libraries
- prefer tvl-depot-path where possible
- reduce the scope of constants.el
- prune (some not all) stale CI configuration

Change-Id: I21e9130402502ec6fa2fc4b46753c890069be62d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4545
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
This commit is contained in:
William Carroll 2021-12-23 18:30:31 -05:00 committed by wpcarro
parent 87981e7afd
commit c1e381eecc
90 changed files with 76 additions and 280 deletions

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:
@ -59,12 +58,9 @@ Otherwise, open with `counsel-find-file'."
(defconst bookmark-whitelist
(list
(make-bookmark :label "briefcase"
:path constants-briefcase
:kbd "b")
(make-bookmark :label "current project"
:path constants-current-project
:kbd "p"))
(make-bookmark :label "depot"
:path constants-depot
:kbd "d"))
"List of registered bookmarks.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:
@ -14,42 +13,14 @@
;; Dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'prelude)
(require 'f)
(require 'maybe)
(prelude-assert (f-exists? (getenv "BRIEFCASE")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst constants-ci?
(maybe-some? (getenv "CI"))
(defconst constants-ci? (maybe-some? (getenv "CI"))
"Encoded as t when Emacs is running in CI.")
(defconst constants-briefcase
(getenv "BRIEFCASE")
"Path to my monorepo, which various parts of my configuration rely on.")
;; TODO: Consider merging `ui.el' and `misc.el' because those are the only
;; current consumers of these constants, and I'm unsure if the indirection that
;; globally defined constants introduces is worth it.
(defconst constants-current-project
constants-briefcase
"Variable holding the directory for my currently active project.")
(defconst constants-mouse-kbds
'([mouse-1] [down-mouse-1] [drag-mouse-1] [double-mouse-1] [triple-mouse-1]
[mouse-2] [down-mouse-2] [drag-mouse-2] [double-mouse-2] [triple-mouse-2]
[mouse-3] [down-mouse-3] [drag-mouse-3] [double-mouse-3] [triple-mouse-3]
[mouse-4] [down-mouse-4] [drag-mouse-4] [double-mouse-4] [triple-mouse-4]
[mouse-5] [down-mouse-5] [drag-mouse-5] [double-mouse-5] [triple-mouse-5])
"All of the mouse-related keybindings that Emacs recognizes.")
(defconst constants-fill-column 80
"Variable used to set the defaults for wrapping, highlighting, etc.")
(provide 'constants)
;;; constants.el ends here

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:
@ -19,7 +18,6 @@
(require 'prelude)
(require 'cycle)
(require 'device)
(require 'maybe)
(require 'cl-lib)
@ -31,11 +29,8 @@
;; TODO: Consider having a different font size when I'm using my 4K monitor.
(defconst fonts-size
(pcase (device-classify)
('work-laptop "10")
('work-desktop "10"))
"My preferred default font-size, which is device specific.")
(defconst fonts-size "10"
"My preferred default font-size.")
(defconst fonts-size-step 10
"The amount (%) by which to increase or decrease a font.")

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:
@ -36,7 +35,7 @@
(require 'device)
(require 'fonts)
(require 'bookmark)
(require 'constants)
(require 'tvl)
(require 'window-manager)
;; Note: The following lines must be sorted this way.
@ -222,9 +221,7 @@
"N" #'smerge-next
"W" #'balance-windows
"gss" #'magit-status
"gsb" (lambda ()
(interactive)
(magit-status constants-briefcase))
"gsd" #'tvl-depot-status
"E" #'refine
"es" #'functions-create-snippet
"l" #'linum-mode

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.3"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Containing some useful mathematical functions.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Inspired by Elm's Maybe library.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Because I use EXWM, I treat my Emacs mode-line like my system bar: I need to

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.3"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Some of these ideas are scattered across other modules like `fs',

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Because everything in my configuration is turning into Elisp these days.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Functions for working with randomness. Some of this code is not as

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24.3"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "25.1"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.1"))
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;;; Commentary:
;; This is the home of any configuration that couldn't find a better home.
@ -17,7 +16,7 @@
(require 'project)
(require 'f)
(require 'dash)
(require 'constants)
(require 'tvl)
(require 'region)
(require 'general)
@ -190,7 +189,7 @@
create-lockfiles nil)
;; ensure code wraps at 80 characters by default
(setq-default fill-column constants-fill-column)
(setq-default fill-column 80)
(put 'narrow-to-region 'disabled nil)
@ -201,7 +200,10 @@
(add-hook 'after-save-hook
(lambda ()
(when (f-equal? (buffer-file-name)
(f-join constants-briefcase "secrets.json"))
(f-join tvl-depot-path
"users"
"wpcarro"
"secrets.json"))
(shell-command "git secret hide"))))
;; use tabs instead of spaces
@ -222,21 +224,21 @@
:config
(projectile-mode t))
;; TODO: Consider moving this into a briefcase.el module.
(defun wpc-misc--briefcase-find (dir)
;; TODO(wpcarro): Consider replacing this with a TVL version if it exists.
(defun wpc-misc--depot-find (dir)
"Find the default.nix nearest to DIR."
;; I use 'vc only at the root of my monorepo because 'transient doesn't use my
;; .gitignore, which slows things down. Ideally, I could write a version that
;; behaves like 'transient but also respects my monorepo's .gitignore and any
;; ancestor .gitignore files.
(if (f-equal? constants-briefcase dir)
(if (f-equal? tvl-depot-path dir)
(cons 'vc dir)
(when (f-ancestor-of? constants-briefcase dir)
(when (f-ancestor-of? tvl-depot-path dir)
(if (f-exists? (f-join dir "default.nix"))
(cons 'transient dir)
(wpc-misc--briefcase-find (f-parent dir))))))
(wpc-misc--depot-find (f-parent dir))))))
(add-to-list 'project-find-functions #'wpc-misc--briefcase-find)
(add-to-list 'project-find-functions #'wpc-misc--depot-find)
(defun wpc-misc-pkill (name)
"Call the pkill executable using NAME as its argument."

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "25.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Configuration to support working with Nix.
@ -14,8 +13,7 @@
;; Dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'device)
(require 'constants)
(require 'tvl)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Library
@ -24,49 +22,16 @@
(use-package nix-mode
:mode "\\.nix\\'")
;; TODO(wpcarro): Ensure the sub-process can resolve <briefcase>.
(defun wpc-nix-rebuild-emacs ()
"Use nix-env to rebuild wpcarros-emacs."
(interactive)
(let* ((pname (format "nix-build <briefcase/emacs.nixos>"))
(let* ((pname (format "nix-env -iA users.wpcarro.emacs.nixos"))
(bname (format "*%s*" pname)))
(start-process pname bname
"nix-env"
"-I" (format "briefcase=%s" constants-briefcase)
"-f" "<briefcase>" "-iA" "emacs.nixos")
"-f" tvl-depot-path
"-iA" "users.wpcarro.emacs.nixos")
(display-buffer bname)))
(defun wpc-nix-sly-from-briefcase (attr)
"Start a Sly REPL configured using the derivation pointed at by ATTR.
The derivation invokes nix.buildLisp.sbclWith and is built asynchronously.
The build output is included in the error thrown on build failures."
(interactive "sAttribute: ")
(lexical-let* ((outbuf (get-buffer-create (format "*briefcase-out/%s*" attr)))
(errbuf (get-buffer-create (format "*briefcase-errors/%s*" attr)))
(expression (format "let briefcase = import <briefcase> {}; in briefcase.third_party.depot.nix.buildLisp.sbclWith [ briefcase.%s ]" attr))
(command (list "nix-build" "-E" expression)))
(message "Acquiring Lisp for <briefcase>.%s" attr)
(make-process :name (format "nix-build/%s" attr)
:buffer outbuf
:stderr errbuf
:command command
:sentinel
(lambda (process event)
(unwind-protect
(pcase event
("finished\n"
(let* ((outpath (s-trim (with-current-buffer outbuf
(buffer-string))))
(lisp-path (s-concat outpath "/bin/sbcl")))
(message "Acquired Lisp for <briefcase>.%s at %s"
attr lisp-path)
(sly lisp-path)))
(_ (with-current-buffer errbuf
(error "Failed to build '%s':\n%s" attr
(buffer-string)))))
(kill-buffer outbuf)
(kill-buffer errbuf))))))
(provide 'wpc-nix)
;;; wpc-nix.el ends here

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Hosts my org mode preferences

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24.1"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; This module hosts all of the settings required to work with ELPA,

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Code configuring my Prolog work.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; My Python configuration settings

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Supports my Rust work.

View file

@ -3,7 +3,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; Package-Requires: ((emacs "24"))
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
;;; Commentary:
;; Helpers for my shell scripting. Includes bash, zsh, etc.

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary:
@ -15,6 +14,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'constants)
(require 'tvl)
(require 'prelude)
(require 'al)
(require 'fonts)
@ -71,7 +71,7 @@
(tool-bar-mode -1)
;; set default buffer for Emacs
(setq initial-buffer-choice constants-current-project)
(setq initial-buffer-choice tvl-depot-path)
;; premium Emacs themes
(use-package doom-themes
@ -131,13 +131,13 @@
;; reduce noisiness of auto-revert-mode
(setq auto-revert-verbose nil)
;; highlight lines that are over `constants-fill-column' characters long
;; highlight lines that are over 80 characters long
(use-package whitespace
:config
;; TODO: This should change depending on the language and project. For
;; example, Google Java projects prefer 100 character width instead of 80
;; character width.
(setq whitespace-line-column constants-fill-column)
(setq whitespace-line-column 80)
(setq whitespace-style '(face lines-tail))
(add-hook 'prog-mode-hook #'whitespace-mode))

View file

@ -2,7 +2,6 @@
;; Author: William Carroll <wpcarro@gmail.com>
;; Version: 0.0.1
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
;; Package-Requires: ((emacs "24"))
;;; Commentary: