mirror of
https://github.com/larstvei/dot-emacs.git
synced 2026-03-22 21:00:12 +00:00
Compare commits
6 Commits
02f2aaf080
...
f5a3b731ff
| Author | SHA1 | Date | |
|---|---|---|---|
| f5a3b731ff | |||
| d2a52430dd | |||
| 11a24c14d3 | |||
| f043bc6f1c | |||
| 108d3cff9a | |||
| 3083b4da46 |
10
email-style.css
Normal file
10
email-style.css
Normal file
@ -0,0 +1,10 @@
|
||||
table { border-collapse:collapse; }
|
||||
caption.t-above { caption-side: top; }
|
||||
caption.t-bottom { caption-side: bottom; }
|
||||
td, th { vertical-align:top; }
|
||||
th.org-right { text-align: center; }
|
||||
th.org-left { text-align: center; }
|
||||
th.org-center { text-align: center; }
|
||||
td.org-right { text-align: right; }
|
||||
td.org-left { text-align: left; }
|
||||
td.org-center { text-align: center; }
|
||||
94
init.org
94
init.org
@ -519,7 +519,6 @@
|
||||
;; Use a variable pitch, keeping fixed pitch where it's sensible
|
||||
(use-package mixed-pitch
|
||||
:defer t
|
||||
:hook (text-mode . mixed-pitch-mode)
|
||||
:config
|
||||
(when (member "Source Serif 4" (font-family-list))
|
||||
(set-face-attribute 'variable-pitch nil :family "Source Serif 4")))
|
||||
@ -1037,9 +1036,7 @@
|
||||
;; Babel Functions for Python
|
||||
(use-package ob-python
|
||||
:ensure nil
|
||||
:after (ob python)
|
||||
:config
|
||||
(setq org-babel-python-command python-shell-interpreter))
|
||||
:after (ob python))
|
||||
|
||||
#+end_src
|
||||
|
||||
@ -1194,6 +1191,75 @@
|
||||
|
||||
#+end_src
|
||||
|
||||
* Email
|
||||
|
||||
I've used Emacs for email in the past, where I've always had the need for a
|
||||
more standard email client in addition. I'm going to give it another go.
|
||||
|
||||
I use [[http://www.djcbsoftware.nl/code/mu/mu4e.html][mu4e]] (which is a part of [[http://www.djcbsoftware.nl/code/mu/][mu]]) along with [[https://isync.sourceforge.io/][mbsync]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package mu4e
|
||||
:ensure nil
|
||||
:if (and (file-exists-p "~/Maildir")
|
||||
(executable-find "mbsync")
|
||||
(executable-find "msmtp")
|
||||
(executable-find "mu"))
|
||||
:bind (:map custom-bindings-map ("C-x m" . mu4e))
|
||||
:config
|
||||
|
||||
(setq mail-user-agent 'mu4e-user-agent)
|
||||
(setq user-mail-address "larstvei@ifi.uio.no")
|
||||
(setq user-full-name "Lars Tveito")
|
||||
|
||||
(setq mu4e-change-filenames-when-moving t)
|
||||
(setq mu4e-get-mail-command (concat (executable-find "mbsync") " -a"))
|
||||
(setq mu4e-maildir "~/Maildir")
|
||||
(setq mu4e-use-fancy-chars t)
|
||||
(setq mu4e-drafts-folder "/uio/Drafts")
|
||||
(setq mu4e-sent-folder "/uio/Sent Items")
|
||||
(setq mu4e-refile-folder "/uio/Archive")
|
||||
(setq mu4e-trash-folder "/uio/Deleted Items")
|
||||
(setq mu4e-maildir-shortcuts
|
||||
'(("/uio/Inbox" . ?i)
|
||||
("/uio/Sent Items" . ?s)))
|
||||
|
||||
(setq sendmail-program (executable-find "msmtp"))
|
||||
(setq send-mail-function 'smtpmail-send-it)
|
||||
(setq message-sendmail-f-is-evil t)
|
||||
(setq message-sendmail-extra-arguments '("--read-envelope-from"))
|
||||
(setq message-send-mail-function 'message-send-mail-with-sendmail)
|
||||
(setq message-kill-buffer-on-exit t))
|
||||
#+end_src
|
||||
|
||||
** Email with org mode
|
||||
|
||||
The package org-msg allows me to compose emails with Org mode. That means I
|
||||
easily can add headings, tables, source code, etc. It is really neat.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
;; Org mode to send and reply to email in HTML
|
||||
(use-package org-msg
|
||||
:after (org mu4e)
|
||||
:config
|
||||
(add-to-list 'mu4e-compose-pre-hook 'org-msg-mode)
|
||||
(setq org-msg-enforce-css (concat user-emacs-directory "email-style.css")
|
||||
org-msg-options "html-postamble:nil toc:nil num:nil author:nil email:nil"
|
||||
org-msg-default-alternatives '((new . (text html))
|
||||
(reply-to-html . (text html))
|
||||
(reply-to-text . (text)))
|
||||
org-msg-signature "
|
||||
|
||||
,#+begin_signature
|
||||
,#+begin_export html
|
||||
|
||||
- Lars
|
||||
,#+end_export
|
||||
,#+end_signature\n"))
|
||||
|
||||
#+end_src
|
||||
|
||||
* LLM
|
||||
|
||||
The ChatGPT client [[https://github.com/karthink/gptel][gptel]] needs an API key from the OpenAI API. This key can
|
||||
@ -1500,9 +1566,7 @@
|
||||
(eglot-inlay-hints-mode -1)
|
||||
(add-hook 'before-save-hook 'eglot-format nil t)))
|
||||
:config
|
||||
(setq eglot-events-buffer-size 0)
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(web-mode . ("svelteserver" "--stdio"))))
|
||||
(setq eglot-events-buffer-size 0))
|
||||
|
||||
|
||||
#+end_src
|
||||
@ -1710,6 +1774,7 @@
|
||||
(arglist geiser-r5rs--arglist))
|
||||
|
||||
(geiser-activate-implementation 'r5rs)
|
||||
(setq geiser-active-implementations '(r5rs))
|
||||
(setq geiser-repl-add-project-paths nil)
|
||||
|
||||
(provide 'geiser-r5rs))
|
||||
@ -1755,7 +1820,6 @@
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(setq python-shell-interpreter "python3.12")
|
||||
(add-hook 'python-mode-hook
|
||||
(lambda () (setq forward-sexp-function nil)))
|
||||
|
||||
@ -2014,7 +2078,8 @@
|
||||
:mode "\\.svelte\\'"
|
||||
:hook (web-mode . eglot-ensure)
|
||||
:config
|
||||
(add-to-list 'web-mode-engines-alist '("svelte" . "\\.svelte\\'")))
|
||||
(add-to-list 'web-mode-engines-alist '("svelte" . "\\.svelte\\'"))
|
||||
(add-to-list 'eglot-server-programs '(web-mode . ("svelteserver" "--stdio"))))
|
||||
|
||||
#+end_src
|
||||
|
||||
@ -2072,6 +2137,17 @@
|
||||
|
||||
#+end_src
|
||||
|
||||
** Gleam
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package gleam-ts-mode
|
||||
:mode "\\.gleam\\'"
|
||||
:after eglot
|
||||
:hook (gleam-ts-mode . eglot-ensure)
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs '(gleam-ts-mode . ("gleam" "lsp"))))
|
||||
#+end_src
|
||||
|
||||
* Which key
|
||||
|
||||
[[https://github.com/justbur/emacs-which-key][Which key]] is nice for discoverability.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user