Compare commits
7 commits
65a2e95c54
...
98063b3e14
Author | SHA1 | Date | |
---|---|---|---|
98063b3e14 | |||
214d624b4a | |||
6772179cbc | |||
19402826a1 | |||
e74da5c70a | |||
de4c83b15b | |||
b3d8e5d5e0 |
1 changed files with 244 additions and 59 deletions
303
ReadMe.org
303
ReadMe.org
|
@ -19,6 +19,7 @@ The ~early-init.el~ file is the first file loaded during ~emacs~ initialisation.
|
|||
I want to configure the frame size if I am in a non-tiling window manager, for this I define the ~with-desktop-session~ macro, inspired by [[https://protesilaos.com/emacs/dotemacs][Protesilaos Stavrou's emacs configuration]].
|
||||
|
||||
#+begin_src emacs-lisp :tangle "early-init.el"
|
||||
;;; -*- lexical-binding: t -*-
|
||||
(defvar luj/tiling-window-manager-regexp "hyprland\\|none\\+exwm"
|
||||
"Regular expression to tiling window managers.
|
||||
See definition of the `with-desktop-session' macro.")
|
||||
|
@ -75,8 +76,8 @@ Let's setup also additional frame settings that are nice to have.
|
|||
I am using the ~elpaca~ package manager, that needs to be bootstrapped because it is not included in ~emacs~.
|
||||
|
||||
#+begin_src emacs-lisp :tangle "early-init.el"
|
||||
(setq elpaca-core-date '(20250301))
|
||||
(defvar elpaca-installer-version 0.10)
|
||||
(setq elpaca-core-date '(20250621))
|
||||
(defvar elpaca-installer-version 0.11)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
|
@ -111,7 +112,7 @@ I am using the ~elpaca~ package manager, that needs to be bootstrapped because i
|
|||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(let ((load-source-file-function nil)) (load "./elpaca-autoloads"))))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
(setq package-enable-at-startup nil)
|
||||
|
@ -245,6 +246,17 @@ I use the ~doom-modeline~, it's nice and clean.
|
|||
(doom-modeline-mode 1))
|
||||
#+end_src
|
||||
|
||||
** Long lines...
|
||||
|
||||
... Are painful
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(setq-default bidi-paragraph-direction 'left-to-right)
|
||||
(setq bidi-inhibit-bpa t)
|
||||
(global-so-long-mode 1)
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
** Nerd icons
|
||||
|
||||
|
@ -313,10 +325,14 @@ Nerd icons are a nice addition to the UI, I try to enable them wherever I can.
|
|||
:default-height 150)
|
||||
(presentation
|
||||
:inherit medium
|
||||
:default-height 180)
|
||||
:default-height 165)
|
||||
(jumbo
|
||||
:inherit medium
|
||||
:default-height 260)
|
||||
(dell-docked
|
||||
:inherit medium
|
||||
:default-height 200)
|
||||
|
||||
(t
|
||||
:default-weight regular
|
||||
:default-slant normal
|
||||
|
@ -859,6 +875,7 @@ To add new tasks to my agenda, I first use a capture template to generally write
|
|||
"* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t)
|
||||
("h" "Habit" entry (file "~/dev/todos/inbox.org")
|
||||
"* NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \"%<<%Y-%m-%d %a .+1d/3d>>\")\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n")))))
|
||||
(advice-add 'org-agenda-quit :before 'org-save-all-org-buffers)
|
||||
#+end_src
|
||||
|
||||
I will then refile the tasks in inbox to any of my agenda files sections.
|
||||
|
@ -1127,84 +1144,213 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
|||
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package notmuch
|
||||
:ensure t
|
||||
:init
|
||||
|
||||
(setq notmuch-search-oldest-first nil)
|
||||
(setq notmuch-show-logo nil
|
||||
(use-package notmuch
|
||||
:ensure t
|
||||
:init
|
||||
(setq notmuch-search-oldest-first nil)
|
||||
(setq notmuch-show-logo nil
|
||||
notmuch-column-control 1.0
|
||||
notmuch-hello-auto-refresh t
|
||||
notmuch-hello-recent-searches-max 20
|
||||
notmuch-hello-thousands-separator ""
|
||||
notmuch-hello-sections '(notmuch-hello-insert-saved-searches)
|
||||
notmuch-show-all-tags-list t)
|
||||
(setq notmuch-show-empty-saved-searches t)
|
||||
(setq notmuch-saved-searches
|
||||
`(( :name "telecom/inbox"
|
||||
:query "tag:inbox and tag:telecom and folder:telecom/INBOX"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "i"))
|
||||
( :name "telecom/CGT"
|
||||
:query "tag:telecom and tag:inbox and tag:cgt"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "u"))
|
||||
( :name "telecom/all"
|
||||
:query "tag:telecom and tag:inbox"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "o"))
|
||||
( :name "work/inbox"
|
||||
:query "tag:work and folder:work/INBOX"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "p"))
|
||||
( :name "work/RB"
|
||||
:query "tag:work and tag:inbox and tag:reproducible-builds"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "c"))
|
||||
(setq notmuch-show-empty-saved-searches t)
|
||||
(setq notmuch-saved-searches
|
||||
`(( :name "telecom/inbox"
|
||||
:query "tag:inbox and tag:telecom and folder:telecom/INBOX"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "t i"))
|
||||
( :name "telecom/CGT"
|
||||
:query "tag:telecom and tag:inbox and tag:cgt"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "t c"))
|
||||
( :name "telecom/all"
|
||||
:query "tag:telecom and tag:inbox"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "t a"))
|
||||
( :name "work/inbox"
|
||||
:query "tag:work and tag:inbox and folder:work/INBOX"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "w i"))
|
||||
( :name "work/RB"
|
||||
:query "tag:work and tag:inbox and tag:reproducible-builds"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "w r"))
|
||||
( :name "work/bluehats"
|
||||
:query "tag:work and tag:inbox and tag:bluehats"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "p"))
|
||||
:key ,(kbd "w b"))
|
||||
( :name "work/all"
|
||||
:query "tag:work and tag:inbox"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "p"))))
|
||||
:key ,(kbd "w a"))
|
||||
( :name "ens/inbox"
|
||||
:query "tag:inbox and tag:ens"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "e i"))
|
||||
( :name "dgnum/inbox"
|
||||
:query "tag:inbox and tag:dgnum and folder:dgnum/INBOX"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "d i"))
|
||||
( :name "dgnum/bureau"
|
||||
:query "tag:inbox and tag:dgnum and tag:bureau"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "d b"))
|
||||
( :name "dgnum/federez"
|
||||
:query "tag:inbox and tag:dgnum and tag:federez"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "d f"))
|
||||
( :name "dgnum/nixcon"
|
||||
:query "tag:inbox and tag:dgnum and tag:nixcon"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "d n"))
|
||||
( :name "dgnum/fai"
|
||||
:query "tag:inbox and tag:dgnum and tag:fai"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "d f"))
|
||||
( :name "dgnum/all"
|
||||
:query "tag:inbox and tag:dgnum"
|
||||
:sort-order newest-first
|
||||
:key ,(kbd "d a"))
|
||||
))
|
||||
|
||||
(setq notmuch-search-result-format
|
||||
'(("date" . "%12s ")
|
||||
("count" . "%-7s ")
|
||||
("authors" . "%-20s ")
|
||||
("subject" . "%-80s ")
|
||||
("tags" . "(%s)")))
|
||||
|
||||
(setq notmuch-tree-result-format
|
||||
'(("date" . "%12s ")
|
||||
("authors" . "%-20s ")
|
||||
((("tree" . "%s")
|
||||
("subject" . "%s"))
|
||||
. " %-80s ")
|
||||
("tags" . "(%s)")))
|
||||
(setq notmuch-archive-tags '("+archive" "-inbox" "-unread" "-junk")
|
||||
notmuch-message-replied-tags '("+replied")
|
||||
notmuch-message-deleted-tags '("+trash" "-inbox" "-unread" "-junk")
|
||||
notmuch-message-forwarded-tags '("+forwarded")
|
||||
notmuch-show-mark-read-tags '("-unread")
|
||||
notmuch-draft-tags '("+draft")
|
||||
notmuch-draft-folder "drafts"
|
||||
notmuch-draft-save-plaintext 'ask)
|
||||
|
||||
(setq notmuch-search-oldest-first nil)
|
||||
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-hello-mode . motion))
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-search-mode . motion))
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-tree-mode . motion))
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-show-mode . motion))
|
||||
(setq notmuch-search-result-format
|
||||
'(("date" . "%12s ")
|
||||
("count" . "%-7s ")
|
||||
("authors" . "%-20s ")
|
||||
("subject" . "%-80s ")
|
||||
("tags" . "(%s)")))
|
||||
|
||||
(setq notmuch-tree-result-format
|
||||
'(("date" . "%12s ")
|
||||
("authors" . "%-20s ")
|
||||
((("tree" . "%s")
|
||||
("subject" . "%s"))
|
||||
. " %-80s ")
|
||||
("tags" . "(%s)")))
|
||||
|
||||
(setq mail-specify-envelope-from t)
|
||||
(setq message-sendmail-envelope-from 'header)
|
||||
(setq mail-envelope-from 'header))
|
||||
(setq notmuch-search-oldest-first nil)
|
||||
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-hello-mode . motion))
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-search-mode . motion))
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-tree-mode . motion))
|
||||
(add-to-list 'meow-mode-state-list '(notmuch-show-mode . motion))
|
||||
|
||||
(setq mail-specify-envelope-from t)
|
||||
(setq message-sendmail-envelope-from 'header)
|
||||
(setq mail-envelope-from 'header))
|
||||
|
||||
#+end_src
|
||||
|
||||
** Composition
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package notmuch
|
||||
:ensure nil
|
||||
:after notmuch
|
||||
:defer t
|
||||
:config
|
||||
(setq notmuch-mua-compose-in 'current-window)
|
||||
(setq notmuch-mua-hidden-headers nil)
|
||||
(setq notmuch-always-prompt-for-sender t)
|
||||
(setq notmuch-mua-cite-function 'message-cite-original-without-signature)
|
||||
(setq notmuch-mua-reply-insert-header-p-function 'notmuch-show-reply-insert-header-p-never)
|
||||
(setq notmuch-mua-user-agent-function nil)
|
||||
(setq notmuch-maildir-use-notmuch-insert t)
|
||||
(setq notmuch-crypto-process-mime t)
|
||||
(setq notmuch-crypto-get-keys-asynchronously t)
|
||||
(setq notmuch-mua-attachment-regexp ; see `notmuch-mua-send-hook'
|
||||
(concat "\\b\\(attache\?ment\\|attached\\|attach\\|"
|
||||
"pi[èe]ce\s+jointe?\\|"
|
||||
"συνημμ[εέ]νο\\|επισυν[αά]πτω\\)\\b")))
|
||||
#+end_src
|
||||
|
||||
** Reading messages
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package notmuch
|
||||
:ensure nil
|
||||
:after notmuch
|
||||
:defer t
|
||||
:config
|
||||
(setq notmuch-show-relative-dates t)
|
||||
(setq notmuch-show-all-multipart/alternative-parts nil)
|
||||
(setq notmuch-show-indent-messages-width 0)
|
||||
(setq notmuch-show-indent-multipart nil)
|
||||
(setq notmuch-show-part-button-default-action 'notmuch-show-view-part)
|
||||
(setq notmuch-wash-wrap-lines-length 120)
|
||||
(setq notmuch-unthreaded-show-out nil)
|
||||
(setq notmuch-message-headers '("To" "Cc" "Subject" "Date"))
|
||||
(setq notmuch-message-headers-visible t))
|
||||
#+end_src
|
||||
|
||||
|
||||
** Bindings
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package notmuch
|
||||
:ensure nil
|
||||
:after notmuch
|
||||
:demand t
|
||||
:hook
|
||||
(notmuch-mua-send . notmuch-mua-attachment-check)
|
||||
:config
|
||||
(defun notmuch-tag-then-archive ()
|
||||
"First prompt for tags to add via notmuch-search-tag, then archive the thread."
|
||||
(interactive)
|
||||
(call-interactively 'notmuch-search-tag)
|
||||
(notmuch-search-archive-thread))
|
||||
|
||||
(defun notmuch-search-message-delete ()
|
||||
(interactive)
|
||||
"Delete message and select next message."
|
||||
(notmuch-search-tag notmuch-message-deleted-tags)
|
||||
(notmuch-search-next-thread))
|
||||
|
||||
(remove-hook 'notmuch-show-hook #'notmuch-show-turn-on-visual-line-mode)
|
||||
(remove-hook 'notmuch-search-hook #'notmuch-hl-line-mode) ; Check my `lin' package
|
||||
:bind
|
||||
( :map global-map
|
||||
("C-c m" . notmuch-jump-search)
|
||||
("C-x m" . notmuch-mua-new-mail)
|
||||
:map notmuch-search-mode-map
|
||||
("A" . notmuch-tag-then-archive)
|
||||
("a" . notmuch-search-archive-thread)
|
||||
("D" . notmuch-search-message-delete)
|
||||
("/" . notmuch-search-filter) ; alias for l
|
||||
("r" . notmuch-search-reply-to-thread) ; easier to reply to all by default
|
||||
("R" . notmuch-search-reply-to-thread-sender)
|
||||
:map notmuch-show-mode-map
|
||||
("a" . nil)
|
||||
("A" . nil)
|
||||
("r" . notmuch-show-reply)
|
||||
("R" . notmuch-show-reply-sender)
|
||||
:map notmuch-hello-mode-map
|
||||
("C-<tab>" . nil)))
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package notmuch-addr
|
||||
:ensure t)
|
||||
(with-eval-after-load 'notmuch-address
|
||||
(notmuch-addr-setup))
|
||||
|
||||
|
||||
(setq sendmail-program "msmtp"
|
||||
send-mail-function 'smtpmail-send-it
|
||||
message-sendmail-f-is-evil t
|
||||
message-sendmail-envelope-from 'header
|
||||
message-send-mail-function 'message-send-mail-with-sendmail)
|
||||
|
||||
|
@ -1284,7 +1430,33 @@ I want the number of unread messages in my ~notmuch-hello~ buffer.
|
|||
(advice-add 'notmuch-hello-insert-buttons :override #'luj/notmuch-hello-insert-buttons)
|
||||
#+end_src
|
||||
|
||||
|
||||
Let's add an indicator in the modeline, as well:
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package notmuch-indicator
|
||||
:ensure t
|
||||
:after notmuch
|
||||
:config
|
||||
(setq notmuch-indicator-args
|
||||
'(( :terms "tag:unread and tag:inbox and tag:telecom and folder:telecom/INBOX"
|
||||
:label "🔍 ")
|
||||
( :terms "tag:unread and tag:inbox and tag:work and folder:work/INBOX"
|
||||
:label "🚧 ")
|
||||
( :terms "tag:unread and tag:inbox and tag:ens"
|
||||
:label "🎓 ")
|
||||
( :terms "tag:unread and tag:inbox and tag:dgnum and folder:dgnum/INBOX"
|
||||
:label "💾 "))
|
||||
|
||||
notmuch-indicator-refresh-count 60
|
||||
notmuch-indicator-hide-empty-counters t
|
||||
notmuch-indicator-notmuch-config-file "/home/julien/.config/notmuch/default/config"
|
||||
notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer))
|
||||
|
||||
(notmuch-indicator-mode 1))
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
|
||||
* Programming
|
||||
|
||||
|
@ -1402,6 +1574,8 @@ The compilation buffer is very useful to launch ephemeral processes.
|
|||
:config
|
||||
(add-hook 'eshell-load-hook #'eat-eshell-mode)))
|
||||
|
||||
(use-package vterm
|
||||
:ensure t)
|
||||
|
||||
(defun eat-meow-setup ()
|
||||
(add-hook 'meow-normal-mode-hook 'eat-emacs-mode nil t)
|
||||
|
@ -1494,6 +1668,10 @@ I don't like how I must open another buffer to get documentation, so let's go wi
|
|||
:after eglot
|
||||
:hook
|
||||
(python-mode . eglot-ensure))
|
||||
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((python . t)))
|
||||
#+end_src
|
||||
|
||||
|
||||
|
@ -1623,3 +1801,10 @@ Well, why not use it for PDF? Also integrate with /LaTeX/ etc.
|
|||
:ensure (:host github :repo "havarddj/typst-preview.el"))
|
||||
|
||||
#+end_src
|
||||
|
||||
*** Lisp
|
||||
|
||||
#+begin_src emacs-lisp :tangle "init.el"
|
||||
(use-package sly
|
||||
:ensure t)
|
||||
#+end_src
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue