]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Update esy.org
authorEshel Yaron <me@eshelyaron.com>
Wed, 18 Jan 2023 12:04:52 +0000 (14:04 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 18 Jan 2023 12:04:52 +0000 (14:04 +0200)
.emacs.d/esy.org
.zshenv

index 63ab382e07d49a5693bf19b77f7b2301d34e7f8b..9e51c589fc17a2047b1335429b80df2530d187fe 100644 (file)
 :CUSTOM_ID: introduction
 :END:
 
-This document holds my customizations for GNU Emacs. Its source version is written in
-[[https://orgmode.org/][Org mode]], utilizing [[https://orgmode.org/worg/org-contrib/babel/][Babel]] to realize [[https://en.wikipedia.org/wiki/Literate_programming][literate programming]]. The Elisp code blocks
-scattered throughout this document are bundled together to create an Elisp library
-called =esy.el=, which Emacs executes on startup.
+This document holds my customizations for GNU Emacs.  Its source
+version is written in [[https://orgmode.org/][Org mode]], utilizing [[https://orgmode.org/worg/org-contrib/babel/][Babel]] to realize [[https://en.wikipedia.org/wiki/Literate_programming][literate
+programming]].  The Elisp code blocks scattered throughout this
+document are bundled together to create an Elisp library called
+=esy.el=, which Emacs executes on startup.
 
 The source of this document is managed with Git in [[https://git.sr.ht/~eshel/dotfiles][my dotfiles
 repository hosted on SourceHut]]. An [[https://eshelyaron.com/esy.html][online HTML version of this Emacs
@@ -123,30 +124,6 @@ For further information about Elisp headers, see [[info:elisp#Library
   (setq warning-minimum-level :error)
 #+end_src
 
-* Loading a theme
-:PROPERTIES:
-:CUSTOM_ID: themes
-:END:
-
-#+begin_src emacs-lisp
-  ;; (setq modus-themes-mode-line '(borderless accented)
-  ;;       modus-themes-region '(bg-only)
-  ;;       modus-themes-italic-constructs t
-  ;;       modus-themes-bold-constructs t
-  ;;       modus-themes-prompts '(bold)
-  ;;       modus-themes-hl-line '(accented)
-  ;;       modus-themes-subtle-line-numbers t
-  ;;       modus-themes-paren-match '(intense)
-  ;;       modus-themes-org-blocks '(tinted-background))
-  ;; (load-theme 'modus-vivendi)
-
-  (setq ef-themes-mixed-fonts t
-        ef-themes-variable-pitch-ui t
-        ef-themes-to-toggle '(ef-day ef-bio))
-  (mapc #'disable-theme custom-enabled-themes)
-  (load-theme 'ef-day :no-confirm)
-#+end_src
-
 * Package archives
 :PROPERTIES:
 :CUSTOM_ID: package-archives
@@ -169,10 +146,11 @@ For further information about Elisp headers, see [[info:elisp#Library
 :CUSTOM_ID: selected-packages
 :END:
 
+These are external Emacs packages that I want to install:
+
 #+begin_src emacs-lisp
   (setq package-selected-packages
         '(
-          alert
           all-the-icons
           all-the-icons-completion
           all-the-icons-dired
@@ -187,7 +165,6 @@ For further information about Elisp headers, see [[info:elisp#Library
           ef-themes
           elfeed
           embark-consult
-          fontaine
           gnu-elpa-keyring-update
           gnuplot
           graphviz-dot-mode
@@ -199,14 +176,12 @@ For further information about Elisp headers, see [[info:elisp#Library
           keycast
           kubernetes
           lin
-          logos
           magit
           marginalia
           markdown-mode
           mastodon
           no-littering
           ob-prolog
-          olivetti
           orderless
           org-modern
           package-lint
@@ -226,16 +201,12 @@ For further information about Elisp headers, see [[info:elisp#Library
           whitespace-cleanup-mode
           with-editor
           ))
-
-  (package-install-selected-packages)
 #+end_src
-* Add local Elisp directory to load-path
-:PROPERTIES:
-:CUSTOM_ID: add-to-load-path
-:END:
+
+Ensure they're all installed:
 
 #+begin_src emacs-lisp
-  (add-to-list 'load-path (expand-file-name  "lisp/" user-emacs-directory))
+  (package-install-selected-packages)
 #+end_src
 
 * No littering!
@@ -258,35 +229,13 @@ For further information about Elisp headers, see [[info:elisp#Library
       (expand-file-name  "var/eln-cache/" user-emacs-directory))))
 #+end_src
 
-* History
-:PROPERTIES:
-:CUSTOM_ID: history
-:END:
-
-#+begin_src emacs-lisp
-  (defun esy/setup-history ()
-    "Setup `recentf-mode', `savehist-mode' and more history-related settings."
-    (require 'bookmark)
-    (require 'recentf)
-    (require 'savehist)
-    (require 'saveplace)
-    (recentf-mode 1)
-    (savehist-mode 1)
-    (save-place-mode 1)
-    (setq bookmark-save-flag 1))
-
-  (add-hook 'after-init-hook #'esy/setup-history)
-#+end_src
-
-** Persist Git log messages history across Emacs sessions
+* Add local Elisp directory to load-path
 :PROPERTIES:
-:CUSTOM_ID: save-log-edit-comment-ring
+:CUSTOM_ID: add-to-load-path
 :END:
 
 #+begin_src emacs-lisp
-  (with-eval-after-load 'log-edit
-    (add-to-list 'savehist-additional-variables
-                'log-edit-comment-ring))
+  (add-to-list 'load-path (expand-file-name  "lisp/" user-emacs-directory))
 #+end_src
 
 * Display settings
@@ -294,126 +243,84 @@ For further information about Elisp headers, see [[info:elisp#Library
 :CUSTOM_ID: display
 :END:
 
-** Initial frame parameters
-:PROPERTIES:
-:CUSTOM_ID: initial-frame
-:END:
-
-Open the inital Emacs frame in fullscreen.
-
-For a list of available frame parameters, see [[info:elisp#Frame Parameters][elisp#Frame Parameters]].
-
 #+begin_src emacs-lisp
   (add-to-list 'initial-frame-alist '(fullscreen . fullboth))
-  ;; (add-to-list 'initial-frame-alist '(font       . "Iosevka-13"))
-#+end_src
 
-** Font configurations
+  (set-face-font 'default "Iosevka-13")
 
-Trying out Prot's ~fontaine~ package for font configuration.
+  (set-face-attribute 'variable-pitch nil
+                      :inherit 'default
+                      :family "Iosevka Etoile")
 
-#+begin_src emacs-lisp
-  (require 'fontaine)
+  (set-face-attribute 'fixed-pitch nil
+                      :inherit 'default
+                      :family "Iosevka")
 
-  (setq fontaine-presets
-    '((regular
-       :default-height 130)
-      (large
-       :default-weight semilight
-       :default-height 170
-       :bold-weight extrabold)
-      (t
-       :default-family "Iosevka"
-       :default-weight regular
-       :default-height 130
-       :fixed-pitch-family nil ; falls back to :default-family
-       :fixed-pitch-weight nil ; falls back to :default-weight
-       :fixed-pitch-height 1.0
-       :fixed-pitch-serif-family nil ; falls back to :default-family
-       :fixed-pitch-serif-weight nil ; falls back to :default-weight
-       :fixed-pitch-serif-height 1.0
-       :variable-pitch-family "Iosevka Etoile"
-       :variable-pitch-weight nil
-       :variable-pitch-height 1.0
-       :bold-family nil ; use whatever the underlying face has
-       :bold-weight bold
-       :italic-family nil
-       :italic-slant italic
-       :line-spacing nil)))
+  (setq ef-themes-mixed-fonts       t
+        ef-themes-variable-pitch-ui t
+        ef-themes-to-toggle         '(ef-day ef-bio))
+  (mapc #'disable-theme custom-enabled-themes)
+  (load-theme 'ef-day :no-confirm)
 
-  (fontaine-set-preset 'regular)
-#+end_src
+  (tool-bar-mode -1)
+  (set-scroll-bar-mode nil)
 
-** Must have display settings
-:PROPERTIES:
-:CUSTOM_ID: display-must-haves
-:END:
+  (setq use-dialog-box nil)
 
-#+begin_src emacs-lisp
-  (setq use-file-dialog nil
-        use-dialog-box nil
-        initial-scratch-message ";; Go.\n"
-        ns-use-native-fullscreen t
-        inhibit-startup-screen t
-        ring-bell-function 'ignore)
+  (setq inhibit-startup-screen t)
+  (setq initial-scratch-message ";; Go.\n")
+
+  (setq ring-bell-function 'ignore)
+
+  (setq switch-to-buffer-obey-display-actions t)
 
   (setq-default indent-tabs-mode nil)
 
   (context-menu-mode)
-  (tool-bar-mode -1)
-  (set-scroll-bar-mode nil)
+
   (pixel-scroll-precision-mode)
+
+  (global-diff-hl-mode)
+
+  (transient-mark-mode)
+
+  (mouse-avoidance-mode 'banish)
+
+  (show-paren-mode)
+
   (put 'narrow-to-region 'disabled nil)
   (put 'narrow-to-page 'disabled nil)
   (put 'suspend-frame 'disabled t)
-#+end_src
 
-** COMMENT Variable-pitch font
-:PROPERTIES:
-:CUSTOM_ID: variable-pitch-font
-:END:
+  (global-hl-line-mode)
 
-#+begin_src emacs-lisp
-  (set-face-font 'variable-pitch "Iosevka Etoile-13")
+  (require 'lin)
+  (add-to-list 'lin-mode-hooks 'gnus-summary-mode-hook)
+  (add-to-list 'lin-mode-hooks 'gnus-group-mode-hook)
+  (add-to-list 'lin-mode-hooks 'gnus-server-mode-hook)
+  (lin-global-mode 1)
+
+  (add-hook 'completion-list-mode-hook
+              (lambda ()
+                (setq-local cursor-in-non-selected-windows nil)))
 #+end_src
 
-** COMMENT Fixed-pitch font
+* History
 :PROPERTIES:
-:CUSTOM_ID: fixed-pitch-font
+:CUSTOM_ID: history
 :END:
 
 #+begin_src emacs-lisp
-  (set-face-font 'fixed-pitch "Iosevka-13")
-#+end_src
+  (recentf-mode 1)
 
-** More display settings
-:PROPERTIES:
-:CUSTOM_ID: display-goodies
-:END:
+  (save-place-mode 1)
 
-#+begin_src emacs-lisp
-  (defun esy/setup-display ()
-    "Setup display-related customizations."
-    (require 'diff-hl)
-    (require 'paren)
-    (require 'lin)
-    (require 'whitespace-cleanup-mode)
-    ;; (setq show-paren-context-when-offscreen t)
-    (add-to-list 'lin-mode-hooks 'gnus-summary-mode-hook)
-    (add-to-list 'lin-mode-hooks 'gnus-group-mode-hook)
-    (add-to-list 'lin-mode-hooks 'gnus-server-mode-hook)
-    (global-diff-hl-mode)
-    (global-hl-line-mode)
-    (lin-global-mode 1)
-    (transient-mark-mode)
-    (mouse-avoidance-mode 'banish)
-    (show-paren-mode)
-    (setq switch-to-buffer-obey-display-actions t))
-
-  (add-hook 'after-init-hook #'esy/setup-display)
-  (add-hook 'completion-list-mode-hook
-            (lambda ()
-              (setq-local cursor-in-non-selected-windows nil)))
+  (setq bookmark-save-flag 1)
+
+  (savehist-mode 1)
+  (with-eval-after-load 'log-edit
+      (add-to-list 'savehist-additional-variables
+                  'log-edit-comment-ring))
 #+end_src
 
 * Org-mode settings
@@ -494,6 +401,10 @@ Trying out Prot's ~fontaine~ package for font configuration.
           org-clock-in-switch-to-state "INPROGRESS")
     (add-to-list 'org-src-lang-modes '("prolog" . sweeprolog))
     (keymap-unset org-mode-map "C-," t))
+
+  (with-eval-after-load 'org-agenda
+    (add-to-list 'org-agenda-custom-commands
+                 '("w" "Work TODOs" tags-todo "+work")))
 #+end_src
 
 *** Always open files with =C-c C-o= inside Emacs
@@ -1018,20 +929,6 @@ refiling directly into deeper headings as well.
           mastodon-active-user "eshel"))
 #+end_src
 
-** denote
-:PROPERTIES:
-:CUSTOM_ID: denote
-:END:
-
-#+begin_src emacs-lisp
-  (require 'denote)
-
-  (setq denote-directory (expand-file-name "~/Documents/notes/"))
-  (setq denote-dired-directories (list denote-directory))
-
-  (add-hook 'dired-mode-hook #'denote-dired-mode-in-directories)
-#+end_src
-
 ** tramp
 :PROPERTIES:
 :CUSTOM_ID: tramp-optimization
@@ -1113,27 +1010,36 @@ over ssh for remote connections.
 #+begin_src emacs-lisp
   (with-eval-after-load 'elfeed
     (setq elfeed-feeds
-          '("https://lwn.net/headlines/rss"
-            "https://reddit.com/r/prolog/.rss"
-            "https://phaazon.net/blog/feed"
-            "https://maggieappleton.com/rss.xml"
-            "https://pouria.dev/rss.xml"
-            "https://sachachua.com/blog/feed/"
+          '(
             "https://ajroach42.com/feed.xml"
+            "https://amodernist.com/all.atom"
             "https://arcology.garden/updates.xml"
-            "https://herman.bearblog.dev/feed/"
-            "https://matt-rickard.com/rss"
-            "https://www.haskellforall.com/feeds/posts/default"
+            "https://atthis.link/rss.xml"
+            "https://archive.casouri.cc/note/atom.xml"
             "https://cestlaz.github.io/rss.xml"
             "https://drewdevault.com/blog/index.xml"
-            "https://xkcd.com/rss.xml"
-            "https://parasurv.neocities.org/rss.xml"
-            "https://writer13.neocities.org/rss.xml"
+            "https://github.com/organizations/SWI-Prolog/eshelyaron.private.atom?token=AT2QBCF34JAI3XGP4JJKYKWBZPZI2"
+            "https://herman.bearblog.dev/feed/"
+            "https://lwn.net/headlines/rss"
+            "https://maggieappleton.com/rss.xml"
+            "https://matt-rickard.com/rss"
             "https://njoseph.me/shaarli/feed/atom?"
-            "https://stephanango.com/feed.xml"
             "https://nullprogram.com/feed/"
-            "https://amodernist.com/all.atom"
-            "https://planet.emacslife.com/atom.xml")))
+            "https://olddeuteronomy.github.io/index.xml"
+            "https://parasurv.neocities.org/rss.xml"
+            "https://phaazon.net/blog/feed"
+            "https://planet.emacslife.com/atom.xml"
+            "https://pouria.dev/rss.xml"
+            "https://project-mage.org/rss.xml"
+            "https://reddit.com/r/prolog/.rss"
+            "https://sachachua.com/blog/feed/"
+            "https://stephanango.com/feed.xml"
+            "https://stppodcast.libsyn.com/rss"
+            "https://writer13.neocities.org/rss.xml"
+            "https://www.draketo.de/rss-feed.xml"
+            "https://www.haskellforall.com/feeds/posts/default"
+            "https://xkcd.com/rss.xml"
+            )))
 #+end_src
 
 ** eww                                                                 :www:
@@ -1252,6 +1158,16 @@ does in the shell.
     (slack-start))
 #+end_src
 
+** EMMS
+:PROPERTIES:
+:CUSTOM_ID: emms
+:END:
+
+#+begin_src emacs-lisp
+  (emms-minimalistic)
+  (setq emms-player-list '(emms-player-mpv))
+#+end_src
+
 * Dutch to English translation with =define-word= and [[https://www.vertalen.nu/][vertalen.nu]]
 :PROPERTIES:
 :CUSTOM_ID: vertalen
@@ -1335,21 +1251,6 @@ does in the shell.
           (setq word (search-forward vertalen--source nil t))))))
 #+end_src
 
-* Display weekly agenda on startup
-:PROPERTIES:
-:CUSTOM_ID: agenda-on-startup
-:END:
-
-#+begin_src emacs-lisp :tangle no
-  (defun esy/display-weekly-agenda ()
-    "Display the weekly agenda."
-    (org-agenda-list 1)
-    (delete-other-windows)
-    (toggle-frame-fullscreen))
-
-  (add-hook 'after-init-hook #'esy/display-weekly-agenda)
-#+end_src
-
 * Minibuffer and completions
 :PROPERTIES:
 :CUSTOM_ID: minibuffer-and-completions
@@ -1866,59 +1767,6 @@ without asking each time.
                . org-present-up-heading                 )))
 #+end_src
 
-** =logos= configuration
-:PROPERTIES:
-:CUSTOM_ID: logos
-:END:
-#+begin_src emacs-lisp
-  (defun esy/logos-set-fonts ()
-    (if logos-focus-mode
-        (fontaine-set-preset 'large)
-      (fontaine-set-preset 'regular)))
-
-  (defun esy/logos-focus ()
-    "Toggle settings for focused display with `logos-focus-mode'.
-  This function in intended to be used as a member of
-  `logos-focus-mode-extra-functions'."
-    (when (eq major-mode 'org-mode)
-      (org-show-all)
-      (logos--mode 'org-present-mode 1)
-      (logos--mode 'org-indent-mode -1)
-      (logos--mode 'org-modern-mode  1))
-    (logos--set  'cursor-type 'hbar)
-    (logos--mode 'display-line-numbers-mode -1)
-    (logos--mode 'global-hl-line-mode -1)
-    (logos--mode 'diff-hl-mode -1)
-    (logos--mode 'display-fill-column-indicator-mode -1)
-    (logos--mode 'flymake-mode -1))
-
-  (with-eval-after-load 'olivetti
-    (setq-default olivetti-body-width 100))
-
-  (with-eval-after-load 'logos
-    (setq-default logos-olivetti               t
-                  logos-hide-fringe            t
-                  logos-scroll-lock            t
-                  logos-variable-pitch         t
-                  logos-buffer-read-only       t
-                  logos-hide-mode-line         t
-                  logos-hide-buffer-boundaries t)
-
-
-    (add-hook 'logos-focus-mode-extra-functions #'esy/logos-focus)
-    (add-hook 'logos-focus-mode-extra-functions #'delete-other-windows)
-
-    (with-eval-after-load 'fontaine
-      (add-hook 'logos-focus-mode-hook #'esy/logos-set-fonts)))
-
-  (defun esy/present-buffer ()
-    "Toggle `logos-focus-mode' in the current buffer."
-    (interactive)
-    (require 'outline)
-    (require 'logos)
-    (logos-focus-mode 'toggle))
-#+end_src
-
 * =shell= customizations
 :PROPERTIES:
 :CUSTOM_ID: shell
diff --git a/.zshenv b/.zshenv
index b159ab41833c16e93659bd94c0d692a6e68013f0..8cb1be7df337941a79c321747e1c6438786e785d 100644 (file)
--- a/.zshenv
+++ b/.zshenv
@@ -1,3 +1 @@
-export PATH=/usr/local/opt/texinfo/bin:/Applications/Emacs.app/Contents/MacOS:/Applications/Emacs.app/Contents/MacOS/bin:/Users/eshelyaron/go/bin:$PATH
-# export SWI_HOME_DIR=/usr/local/lib/swipl
-# export C_INCLUDE_PATH=/usr/local/lib/swipl/include:/Applications/Emacs.app/Contents/Resources/include:$C_INCLUDE_PATH
+export PATH=/Users/eshelyaron/checkouts/emacs/nextstep/Emacs.app/Contents/MacOS/:$PATH