mirror of
https://github.com/larstvei/dot-emacs.git
synced 2026-03-23 05:10:12 +00:00
Compare commits
No commits in common. "f5a3b731fffbd6cfdd70a1ccf860392bb24571e2" and "02f2aaf08060cd9821d16bcf2d4012bcd7652481" have entirely different histories.
f5a3b731ff
...
02f2aaf080
@ -1,10 +0,0 @@
|
||||
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,6 +519,7 @@
|
||||
;; 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")))
|
||||
@ -1036,7 +1037,9 @@
|
||||
;; Babel Functions for Python
|
||||
(use-package ob-python
|
||||
:ensure nil
|
||||
:after (ob python))
|
||||
:after (ob python)
|
||||
:config
|
||||
(setq org-babel-python-command python-shell-interpreter))
|
||||
|
||||
#+end_src
|
||||
|
||||
@ -1191,75 +1194,6 @@
|
||||
|
||||
#+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
|
||||
@ -1566,7 +1500,9 @@
|
||||
(eglot-inlay-hints-mode -1)
|
||||
(add-hook 'before-save-hook 'eglot-format nil t)))
|
||||
:config
|
||||
(setq eglot-events-buffer-size 0))
|
||||
(setq eglot-events-buffer-size 0)
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(web-mode . ("svelteserver" "--stdio"))))
|
||||
|
||||
|
||||
#+end_src
|
||||
@ -1774,7 +1710,6 @@
|
||||
(arglist geiser-r5rs--arglist))
|
||||
|
||||
(geiser-activate-implementation 'r5rs)
|
||||
(setq geiser-active-implementations '(r5rs))
|
||||
(setq geiser-repl-add-project-paths nil)
|
||||
|
||||
(provide 'geiser-r5rs))
|
||||
@ -1820,6 +1755,7 @@
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
(setq python-shell-interpreter "python3.12")
|
||||
(add-hook 'python-mode-hook
|
||||
(lambda () (setq forward-sexp-function nil)))
|
||||
|
||||
@ -2078,8 +2014,7 @@
|
||||
:mode "\\.svelte\\'"
|
||||
:hook (web-mode . eglot-ensure)
|
||||
:config
|
||||
(add-to-list 'web-mode-engines-alist '("svelte" . "\\.svelte\\'"))
|
||||
(add-to-list 'eglot-server-programs '(web-mode . ("svelteserver" "--stdio"))))
|
||||
(add-to-list 'web-mode-engines-alist '("svelte" . "\\.svelte\\'")))
|
||||
|
||||
#+end_src
|
||||
|
||||
@ -2137,17 +2072,6 @@
|
||||
|
||||
#+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