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
215
ReadMe.org
215
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]].
|
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"
|
#+begin_src emacs-lisp :tangle "early-init.el"
|
||||||
|
;;; -*- lexical-binding: t -*-
|
||||||
(defvar luj/tiling-window-manager-regexp "hyprland\\|none\\+exwm"
|
(defvar luj/tiling-window-manager-regexp "hyprland\\|none\\+exwm"
|
||||||
"Regular expression to tiling window managers.
|
"Regular expression to tiling window managers.
|
||||||
See definition of the `with-desktop-session' macro.")
|
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~.
|
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"
|
#+begin_src emacs-lisp :tangle "early-init.el"
|
||||||
(setq elpaca-core-date '(20250301))
|
(setq elpaca-core-date '(20250621))
|
||||||
(defvar elpaca-installer-version 0.10)
|
(defvar elpaca-installer-version 0.11)
|
||||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
(defvar elpaca-repos-directory (expand-file-name "repos/" 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)
|
(unless (require 'elpaca-autoloads nil t)
|
||||||
(require 'elpaca)
|
(require 'elpaca)
|
||||||
(elpaca-generate-autoloads "elpaca" repo)
|
(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)
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||||
(elpaca `(,@elpaca-order))
|
(elpaca `(,@elpaca-order))
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
|
@ -245,6 +246,17 @@ I use the ~doom-modeline~, it's nice and clean.
|
||||||
(doom-modeline-mode 1))
|
(doom-modeline-mode 1))
|
||||||
#+end_src
|
#+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
|
** 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)
|
:default-height 150)
|
||||||
(presentation
|
(presentation
|
||||||
:inherit medium
|
:inherit medium
|
||||||
:default-height 180)
|
:default-height 165)
|
||||||
(jumbo
|
(jumbo
|
||||||
:inherit medium
|
:inherit medium
|
||||||
:default-height 260)
|
:default-height 260)
|
||||||
|
(dell-docked
|
||||||
|
:inherit medium
|
||||||
|
:default-height 200)
|
||||||
|
|
||||||
(t
|
(t
|
||||||
:default-weight regular
|
:default-weight regular
|
||||||
:default-slant normal
|
: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)
|
"* PHONE %? :PHONE:\n%U" :clock-in t :clock-resume t)
|
||||||
("h" "Habit" entry (file "~/dev/todos/inbox.org")
|
("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")))))
|
"* 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
|
#+end_src
|
||||||
|
|
||||||
I will then refile the tasks in inbox to any of my agenda files sections.
|
I will then refile the tasks in inbox to any of my agenda files sections.
|
||||||
|
@ -1130,7 +1147,6 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
||||||
(use-package notmuch
|
(use-package notmuch
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
|
||||||
(setq notmuch-search-oldest-first nil)
|
(setq notmuch-search-oldest-first nil)
|
||||||
(setq notmuch-show-logo nil
|
(setq notmuch-show-logo nil
|
||||||
notmuch-column-control 1.0
|
notmuch-column-control 1.0
|
||||||
|
@ -1144,31 +1160,70 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
||||||
`(( :name "telecom/inbox"
|
`(( :name "telecom/inbox"
|
||||||
:query "tag:inbox and tag:telecom and folder:telecom/INBOX"
|
:query "tag:inbox and tag:telecom and folder:telecom/INBOX"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "i"))
|
:key ,(kbd "t i"))
|
||||||
( :name "telecom/CGT"
|
( :name "telecom/CGT"
|
||||||
:query "tag:telecom and tag:inbox and tag:cgt"
|
:query "tag:telecom and tag:inbox and tag:cgt"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "u"))
|
:key ,(kbd "t c"))
|
||||||
( :name "telecom/all"
|
( :name "telecom/all"
|
||||||
:query "tag:telecom and tag:inbox"
|
:query "tag:telecom and tag:inbox"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "o"))
|
:key ,(kbd "t a"))
|
||||||
( :name "work/inbox"
|
( :name "work/inbox"
|
||||||
:query "tag:work and folder:work/INBOX"
|
:query "tag:work and tag:inbox and folder:work/INBOX"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "p"))
|
:key ,(kbd "w i"))
|
||||||
( :name "work/RB"
|
( :name "work/RB"
|
||||||
:query "tag:work and tag:inbox and tag:reproducible-builds"
|
:query "tag:work and tag:inbox and tag:reproducible-builds"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "c"))
|
:key ,(kbd "w r"))
|
||||||
( :name "work/bluehats"
|
( :name "work/bluehats"
|
||||||
:query "tag:work and tag:inbox and tag:bluehats"
|
:query "tag:work and tag:inbox and tag:bluehats"
|
||||||
:sort-order newest-first
|
:sort-order newest-first
|
||||||
:key ,(kbd "p"))
|
:key ,(kbd "w b"))
|
||||||
( :name "work/all"
|
( :name "work/all"
|
||||||
:query "tag:work and tag:inbox"
|
:query "tag:work and tag:inbox"
|
||||||
:sort-order newest-first
|
: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-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-result-format
|
(setq notmuch-search-result-format
|
||||||
'(("date" . "%12s ")
|
'(("date" . "%12s ")
|
||||||
|
@ -1196,15 +1251,106 @@ I use ~notmuch~ to index and search through my large mail inboxes.
|
||||||
(setq message-sendmail-envelope-from 'header)
|
(setq message-sendmail-envelope-from 'header)
|
||||||
(setq mail-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
|
(use-package notmuch-addr
|
||||||
:ensure t)
|
:ensure t)
|
||||||
(with-eval-after-load 'notmuch-address
|
(with-eval-after-load 'notmuch-address
|
||||||
(notmuch-addr-setup))
|
(notmuch-addr-setup))
|
||||||
|
|
||||||
|
|
||||||
(setq sendmail-program "msmtp"
|
(setq sendmail-program "msmtp"
|
||||||
send-mail-function 'smtpmail-send-it
|
send-mail-function 'smtpmail-send-it
|
||||||
message-sendmail-f-is-evil t
|
|
||||||
message-sendmail-envelope-from 'header
|
message-sendmail-envelope-from 'header
|
||||||
message-send-mail-function 'message-send-mail-with-sendmail)
|
message-send-mail-function 'message-send-mail-with-sendmail)
|
||||||
|
|
||||||
|
@ -1284,6 +1430,32 @@ I want the number of unread messages in my ~notmuch-hello~ buffer.
|
||||||
(advice-add 'notmuch-hello-insert-buttons :override #'luj/notmuch-hello-insert-buttons)
|
(advice-add 'notmuch-hello-insert-buttons :override #'luj/notmuch-hello-insert-buttons)
|
||||||
#+end_src
|
#+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
|
* Programming
|
||||||
|
@ -1402,6 +1574,8 @@ The compilation buffer is very useful to launch ephemeral processes.
|
||||||
:config
|
:config
|
||||||
(add-hook 'eshell-load-hook #'eat-eshell-mode)))
|
(add-hook 'eshell-load-hook #'eat-eshell-mode)))
|
||||||
|
|
||||||
|
(use-package vterm
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
(defun eat-meow-setup ()
|
(defun eat-meow-setup ()
|
||||||
(add-hook 'meow-normal-mode-hook 'eat-emacs-mode nil t)
|
(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
|
:after eglot
|
||||||
:hook
|
:hook
|
||||||
(python-mode . eglot-ensure))
|
(python-mode . eglot-ensure))
|
||||||
|
|
||||||
|
(org-babel-do-load-languages
|
||||||
|
'org-babel-load-languages
|
||||||
|
'((python . t)))
|
||||||
#+end_src
|
#+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"))
|
:ensure (:host github :repo "havarddj/typst-preview.el"))
|
||||||
|
|
||||||
#+end_src
|
#+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