clean up the configuration a bit

This commit is contained in:
Mateus Rodrigues
2026-07-03 21:46:19 +01:00
parent ca981c61b8
commit 36774be5bd
13 changed files with 26 additions and 232 deletions

View File

@@ -1,16 +0,0 @@
(require 'emms-setup)
(require 'emms-player-mpd)
(emms-all)
(setq emms-seek-seconds 5)
(setq emms-player-list '(emms-player-mpd))
(setq emms-info-functions '(emms-info-mpd))
(setq emms-player-mpd-server-name "localhost")
(setq emms-player-mpd-server-port "6700")
;:bind
;("s-m p" . emms)
;("s-m b" . emms-smart-browse)
;("s-m r" . emms-player-mpd-update-all-reset-cache)
;("<XF86AudioPrev>" . emms-previous)
;("<XF86AudioNext>" . emms-next)
;("<XF86AudioPlay>" . emms-pause)
;("<XF86AudioStop>" . emms-stop)

View File

@@ -1,10 +0,0 @@
;; better behavior inserting _
;;(require 'ess-smart-underscore)
;; enable code auto completion
(require 'auto-complete-config)
(ac-config-default)
(setq ac-auto-start nil)
(define-key ac-mode-map (kbd "<f2>") 'auto-complete)
(define-key ac-completing-map [return] nil)
(setq ac-quick-help-delay 0.1)

View File

@@ -20,21 +20,11 @@
(load-theme 'modus-operandi-tinted t) (load-theme 'modus-operandi-tinted t)
;; Eshell
;; (use-package eshell
;; :after eshell-mode
;; :init
;; (load "~/.emacs.d/elisp/eshell-setup.el"))
;; Org ;; Org
(use-package org (use-package org
:config :config
(load "~/.emacs.d/elisp/org-setup.el")) (load "~/.emacs.d/elisp/org-setup.el"))
(use-package org-ref) (use-package org-ref)
;; (use-package org-roam
;; :disabled
;; :config
;; (load "~/.emacs.d/elisp/org-roam-setup.el"))
;; Writing ;; Writing
(use-package writeroom-mode) (use-package writeroom-mode)
@@ -42,21 +32,6 @@
;; modeline ;; modeline
;; configure the default one ;; configure the default one
(load "~/.emacs.d/elisp/modeline-setup.el") (load "~/.emacs.d/elisp/modeline-setup.el")
;; then use doom-modeline
;; (use-package doom-modeline
;; :config
;; (progn
;; (setq doom-modeline-buffer-encoding nil)
;; (setq doom-modeline-height 15)
;; (when (member "Fantasque Sans Mono" (font-family-list))
;; (set-face-attribute 'mode-line nil :font "Fantasque Sans Mono-14")
;; (set-face-attribute 'mode-line-inactive nil :font "Fantasque Sans Mono-13")))
;; :hook
;; (after-init . doom-modeline-mode))
;; (use-package doom-modeline
;; :ensure t
;; :init (doom-modeline-mode 1))
(use-package all-the-icons) (use-package all-the-icons)
@@ -83,30 +58,12 @@
(use-package saveplace-pdf-view) (use-package saveplace-pdf-view)
;; ;; Mail reader
;; (use-package mu4e
;; :disabled
;; :config
;; (load "~/.emacs.d/elisp/mu4e-setup.el"))
;; ;; mail notification in modeline
;; (use-package mu4e-alert
;; :disabled
;; :after mu4e
;; :init
;; (setq mu4e-alert-interesting-mail-query "flag:unread maildir:/posteo/INBOX")
;; :hook
;; (after-init . mu4e-alert-enable-mode-line-display))
;; Matrix
(use-package ement)
;; Read Gopher and Gemini ;; Read Gopher and Gemini
(use-package elpher) (use-package elpher)
;; Read feeds ;; Read feeds
(use-package elfeed) (use-package elfeed)
;; Programming environment ;; Programming environment
;; We need colors in eshell ;; We need colors in eshell
(use-package xterm-color) (use-package xterm-color)
@@ -121,13 +78,6 @@
:config :config
(add-hook 'after-init-hook 'global-company-mode)) (add-hook 'after-init-hook 'global-company-mode))
;; documentation via dash docsets
(use-package dash-docs
:config
(progn
(setq dash-docs-browser-func 'eww)
(setq dash-docs-enable-debugging nil)))
(use-package tomlparse) (use-package tomlparse)
;; TODO I'm only using demand so <f3> is set from the start ;; TODO I'm only using demand so <f3> is set from the start
@@ -143,12 +93,9 @@
;; Common Lisp ;; Common Lisp
(use-package slime (use-package slime
:disabled
:config :config
(load "~/.emacs.d/elisp/slime-setup.el")) (load "~/.emacs.d/elisp/slime-setup.el"))
(use-package sly)
;; Clojure ;; Clojure
(use-package cider) (use-package cider)
@@ -163,11 +110,6 @@
;; Racket ;; Racket
(use-package racket-mode) (use-package racket-mode)
;; Python
(use-package pyvenv
:init
(setenv "WORKON_HOME" "~/.cache/pypoetry/virtualenvs"))
(use-package python-black (use-package python-black
:after python :after python
:hook (python-mode . python-black-on-save-mode-enable-dwim)) :hook (python-mode . python-black-on-save-mode-enable-dwim))
@@ -195,15 +137,6 @@
:ensure t :ensure t
:defer t :defer t
:hook ((python-base-mode . eglot-ensure)) :hook ((python-base-mode . eglot-ensure))
;:config
;(setq-default eglot-workspace-configuration
; '((pylsp
; (plugins
; (pycodestyle (enabled . nil))
; (pyflakes (enabled . nil))
; (flake8 (enabled . t))
; (black (enabled . t))
; ))))
) )
;; TRAMP ;; TRAMP

View File

@@ -30,11 +30,6 @@
(setq bibtex-completion-pdf-symbol "") (setq bibtex-completion-pdf-symbol "")
(setq bibtex-completion-notes-symbol "") (setq bibtex-completion-notes-symbol "")
;; open pdfs in mupdf
;(setq bibtex-completion-pdf-open-function
; (lambda (fpath)
; (call-process "mupdf" nil 0 nil fpath)))
;add actions to end of default actions list ;add actions to end of default actions list
(ivy-add-actions (ivy-add-actions
'ivy-bibtex 'ivy-bibtex

View File

@@ -12,13 +12,3 @@
(global-set-key (kbd "<kp-1>") 'delete-other-windows) (global-set-key (kbd "<kp-1>") 'delete-other-windows)
(global-set-key (kbd "<kp-2>") 'split-window-below) (global-set-key (kbd "<kp-2>") 'split-window-below)
;(global-set-key (kbd "<kp-3>") 'ivy-bibtex) ;(global-set-key (kbd "<kp-3>") 'ivy-bibtex)
;(global-set-key (kbd "<kp-subtract>") 'xah-close-current-buffer)
;(global-set-key (kbd "<kp-divide>") 'xah-previous-user-buffer)
;(global-set-key (kbd "<kp-multiply>") 'xah-next-user-buffer)
;; with control key down
;(global-set-key (kbd "<C-kp-divide>") 'xah-previous-emacs-buffer)
;(global-set-key (kbd "<C-kp-multiply>") 'xah-next-emacs-buffer)

View File

@@ -3,9 +3,10 @@
(setq display-time-24hr-format 1) (setq display-time-24hr-format 1)
;; Don't show load average ;; Don't show load average
(setq display-time-default-load-average nil) (setq display-time-default-load-average nil)
;; Don't check for mail (we will use doom-modeline for that) ;; Don't check for mail
(setq display-time-mail-file 1) (setq display-time-mail-file 1)
;; Show time and battery on modeline ;; Show time on modeline
(display-time-mode 1) (display-time-mode 1)
;; Don't show battery on modeline
(display-battery-mode 0) (display-battery-mode 0)

View File

@@ -1,43 +0,0 @@
;; Largely based on ... and ...
;; use mu4e for e-mail in emacs
(setq mail-user-agent 'mu4e-user-agent)
;; Set the root maildir
(setq mu4e-maildir "~/.mail")
;; some other dirs
(setq mu4e-sent-folder "/posteo/Sent"
mu4e-drafts-folder "/drafts")
;; a list of user's e-mail addresses
(setq mu4e-user-mail-address-list '("mprodrigues@posteo.net"))
;; the headers to show in the headers list -- a pair of a field
;; and its width, with `nil' meaning 'unlimited'
;; (better only use that for the last field.
;; These are the defaults:
(setq mu4e-headers-fields
'( (:date . 25) ;; alternatively, use :human-date
(:flags . 6)
(:from . 22)
(:subject . nil))) ;; alternatively, use :thread-subject
;; general emacs mail settings; used when composing e-mail
;; the non-mu4e-* stuff is inherited from emacs/message-mode
(setq mu4e-compose-reply-to-address "mprodrigues@posteo.net"
user-mail-address "mprodrigues@posteo.net"
user-full-name "Mateus P. Rodrigues")
;; SMTP configuration
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-smtp-user "mprodrigues@posteo.net"
smtpmail-default-smtp-server "posteo.de"
smtpmail-smtp-server "posteo.de"
smtpmail-smtp-service 587)
;; Sign emails with own key as well
(require 'epg-config)
(setq mml2015-use 'epg
epg-user-id "gpg_key_id"
mml2015-encrypt-to-self t
mml2015-sign-with-sender t)

View File

@@ -1,7 +0,0 @@
(setq org-id-track-globally t)
(setq org-id-locations-file "~/.emacs.d/.org-id-locations")
(push '("b" "Brain" plain (function org-brain-goto-end)
"* %i%?" :empty-lines 1)
org-capture-templates)
(setq org-brain-visualize-default-choices 'all)
(setq org-brain-title-max-length 12)

View File

@@ -14,30 +14,6 @@
;; open org file with everything folded ;; open org file with everything folded
(setq org-startup-folded t) (setq org-startup-folded t)
;; org publish
(require 'ox-publish)
(setq org-publish-project-alist
'(("org-notes"
:base-directory "~/repos/csphy/website/org/"
:base-extension "org"
:publishing-directory "~/repos/csphy/website/jekyll/"
:recursive t
:publishing-function org-html-publish-to-html
:headline-leves 4 ;Just the default for this project.
:html-extension "html"
:body-only f ;; Only export section between <body> </body>
)
("org-static"
:base-directory "~/repos/csphy/website/org/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|php"
:publishing-directory "~/repos/csphy/website/"
:recursive t
:publishing-function org-publish-attachment
)
("org" :components ("org-notes" "org-static"))))
;; preserve indentation on output ;; preserve indentation on output
(setq org-src-preserve-indentation t) (setq org-src-preserve-indentation t)
@@ -73,10 +49,10 @@
(setq org-todo-keywords (setq org-todo-keywords
'((sequence "TODO" "IN PROGRESS" "|" "DONE"))) '((sequence "TODO" "IN PROGRESS" "|" "DONE")))
(setq reftex-default-bibliography '("~/repos/csphy/pesquisa/vis.bib")) ;; (setq reftex-default-bibliography '("~/repos/csphy/pesquisa/vis.bib"))
(setq org-ref-bibliography-notes "~/repos/csphy/pesquisa/paper-notes.org" ;; (setq org-ref-bibliography-notes "~/repos/csphy/pesquisa/paper-notes.org"
org-ref-default-bibliography '("~/repos/csphy/pesquisa/vis.bib") ;; org-ref-default-bibliography '("~/repos/csphy/pesquisa/vis.bib")
org-ref-pdf-directory "~/repos/csphy/pesquisa/vis") ;; org-ref-pdf-directory "~/repos/csphy/pesquisa/vis")
;; Use biber to process bibtex ;; Use biber to process bibtex
(setq org-latex-pdf-process (setq org-latex-pdf-process

View File

@@ -1,11 +0,0 @@
;;(require 'poly-c)
;; C
(add-to-list 'auto-mode-alist '("\\.nw$" . poly-noweb+c-mode))
;;; MARKDOWN
(add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))
;;; R modes
(add-to-list 'auto-mode-alist '("\\.Rmd" . poly-markdown+r-mode))
(add-to-list 'polymode-mode-name-override-alist '(javascript . js2-mode))
(provide 'polymode-configuration)

View File

@@ -1,6 +1,3 @@
;; Initialize emacs in eshell, not splash screen
;;(setq initial-buffer-choice (eshell))
;; Write custom set variables to different file ;; Write custom set variables to different file
(setq custom-file "~/.emacs.d/elisp/custom.el") (setq custom-file "~/.emacs.d/elisp/custom.el")
@@ -25,7 +22,7 @@
;; C default style ;; C default style
(add-hook 'c-mode-hook (add-hook 'c-mode-hook
(lambda () (lambda ()
(c-set-style "linux"))) (c-set-style "linux")))
;; Always use spaces, never tabs ;; Always use spaces, never tabs
@@ -73,10 +70,6 @@
(kill-buffer "*scratch*"))) (kill-buffer "*scratch*")))
(add-hook 'after-change-major-mode-hook 'remove-scratch-buffer) (add-hook 'after-change-major-mode-hook 'remove-scratch-buffer)
;; Removes *messages* from the buffer.
;(setq-default message-log-max nil)
;(kill-buffer "*Messages*")
;; Removes *Completions* from buffer after you've opened a file. ;; Removes *Completions* from buffer after you've opened a file.
(add-hook 'minibuffer-exit-hook (add-hook 'minibuffer-exit-hook
#'(lambda () #'(lambda ()

View File

@@ -1,12 +1,13 @@
;;;; slime setup ;;;; slime setup
(setq inferior-lisp-program "clisp") (slime-setup '(slime-fancy slime-quicklisp slime-asdf slime-mrepl))
(setq inferior-lisp-program "sbcl")
;;; use my local copy of the Common Lisp HyperSpec ;; ;;; use my local copy of the Common Lisp HyperSpec
(load "~/clhs-use-local.el" t) ;; (load "~/clhs-use-local.el" t)
;;; open documentation in eww browser ;; ;;; open documentation in eww browser
(defun hyperspec-lookup--hyperspec-lookup-eww (orig-fun &rest args) ;; (defun hyperspec-lookup--hyperspec-lookup-eww (orig-fun &rest args)
(let ((browse-url-browser-function 'eww-browse-url)) ;; (let ((browse-url-browser-function 'eww-browse-url))
(apply orig-fun args))) ;; (apply orig-fun args)))
(advice-add 'hyperspec-lookup :around #'hyperspec-lookup--hyperspec-lookup-eww) ;; (advice-add 'hyperspec-lookup :around #'hyperspec-lookup--hyperspec-lookup-eww)

26
init.el
View File

@@ -3,35 +3,27 @@
;; Bootstrap straight.el package manager ;; Bootstrap straight.el package manager
(defvar bootstrap-version) (defvar bootstrap-version)
(let ((bootstrap-file (let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (expand-file-name
(bootstrap-version 5)) "straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file) (unless (file-exists-p bootstrap-file)
(with-current-buffer (with-current-buffer
(url-retrieve-synchronously (url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies) 'silent 'inhibit-cookies)
(goto-char (point-max)) (goto-char (point-max))
(eval-print-last-sexp))) (eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage)) (load bootstrap-file nil 'nomessage))
;; Always use straight.el to install packages with use-package ;; Always use straight.el to install packages with use-package
;;(straight-use-package 'use-package) (straight-use-package 'use-package)
(eval-when-compile
(require 'use-package))
(setq straight-use-package-by-default t) (setq straight-use-package-by-default t)
(setq use-package-always-demand t)
;;(setq use-package-always-defer t)
;; Minimal package.el use so we can explore melpa packages
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")
'("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'load-path "~/.emacs.d/elisp/") (add-to-list 'load-path "~/.emacs.d/elisp/")
;; load debian mu4e package
(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e")
;(load "~/.emacs.d/elisp/mu4e-setup.el")
(load "~/.emacs.d/elisp/settings.el") (load "~/.emacs.d/elisp/settings.el")
(load "~/.emacs.d/elisp/eshell-setup.el") (load "~/.emacs.d/elisp/eshell-setup.el")