diff --git a/bootstrap.org b/bootstrap.org index 58c0b81..e857f04 100644 --- a/bootstrap.org +++ b/bootstrap.org @@ -52,6 +52,42 @@ While that enables the =:straight t= extension to =use-package=, let's just have straight-default-vc 'git)) #+END_SRC See the details in [[https://dev.to/jkreeftmeijer/emacs-package-management-with-straight-el-and-use-package-3oc8][this essay]]. + +** OS Path and Native Compilation +With the way I start Emacs, I may not have the PATH I /actually/ use (from the shell) available, so we'll force it (code taken [[https://www.emacswiki.org/emacs/ExecPath][from here]]): + +#+BEGIN_SRC emacs-lisp + (defun set-exec-path-from-shell () + "Set up Emacs' `exec-path' and PATH environment variable to match + that used by the user's shell. + + This is particularly useful under Mac OS X and macOS, where GUI + apps are not started from a shell." + (interactive) + (let ((path-from-shell (replace-regexp-in-string + (rx (zero-or-more space) eol) + "" + (shell-command-to-string "$SHELL --login -c 'echo $PATH'")))) + (setenv "PATH" path-from-shell) + (setq exec-path (split-string path-from-shell path-separator)))) + + (set-exec-path-from-shell) +#+END_SRC + +Clear up a Mac-specific issue that sometimes arises since I'm switching to [[http://akrl.sdf.org/gccemacs.html][native compilation project]], as the =Emacs.app= that I use doesn't have its =bin= directory, e.g. =Emacs.app/Contents/MacOS/bin=: + +#+BEGIN_SRC emacs-lisp + (when (equal system-type 'darwin) + (add-to-list 'exec-path (concat invocation-directory "bin") t)) +#+END_SRC + +Getting tired off all the packages that I load spewing a bunch of warnings that I can't do anything about: +#+BEGIN_SRC emacs-lisp + (when (and (fboundp 'native-comp-available-p) + (native-comp-available-p)) + (setq native-comp-async-report-warnings-errors nil + native-comp-deferred-compilation t)) +#+END_SRC ** Basic Libraries The following packages come with Emacs, but seems like they still need loading: #+BEGIN_SRC emacs-lisp diff --git a/ha-display.org b/ha-display.org index d45ea94..33b4224 100644 --- a/ha-display.org +++ b/ha-display.org @@ -26,20 +26,30 @@ A literate programming file to configure the Emacs UI. * Dashboard The [[https://github.com/emacs-dashboard/emacs-dashboard][emacs-dashboard]] project makes a nicer startup screen. #+BEGIN_SRC emacs-lisp - (use-package dashboard - :init - (setq dashboard-banner-logo-title "Welcome to Emacs" - dashboard-startup-banner "~/other/hamacs/support/levitating-gnu.png" - dashboard-center-content t - dashboard-set-init-info t - dashboard-projects-switch-function 'projectile-persp-switch-project - dashboard-items '((projects . 5) - ;; (agenda . 5) - (bookmarks . 5))) - :config - (dashboard-setup-startup-hook) + (use-package dashboard + :init + (defun ha-dashboard-version () + (let ((smaller-version (replace-regexp-in-string + (rx " (" (zero-or-more any) eol) "" (emacs-version)))) + (string-replace "\n" "" smaller-version))) - (setq dashboard-footer-messages (list (ha--dad-joke)))) + (setq dashboard-banner-logo-title + (format "Emacs %s ⸺ %s" + (if (and (fboundp 'native-comp-available-p) + (native-comp-available-p)) + "with Native Compilation" "") + (ha-dashboard-version)) + dashboard-startup-banner "~/other/hamacs/support/levitating-gnu.png" + dashboard-center-content t + dashboard-set-init-info t + dashboard-projects-switch-function 'projectile-persp-switch-project + dashboard-items '((projects . 5) + ;; (agenda . 5) + (bookmarks . 5))) + :config + (dashboard-setup-startup-hook) + + (setq dashboard-footer-messages (list (ha--dad-joke)))) #+END_SRC * Mode Line Let's install and load some of packages from the [[https://github.com/hlissner/doom-emacs][Doom Emacs]] project, like [[https://github.com/seagle0128/doom-modeline][doom-modeline]] and maybe the themes: