;; (add-hook 'emacs-startup-hook ;; (lambda () ;; (message "Emacs loaded in %s with %d garbage collections." ;; (format "%.2f seconds" ;; (float-time ;; (time-subtract after-init-time before-init-time))) ;; gcs-done))) ;; (setq gc-cons-threshold 100000000) ;; (add-hook 'after-init-hook (lambda () (setq gc-cons-threshold 800000))) ;; (require 'server) ;; (or (eq (server-running-p) t) ;; (server-start)) ;; (load "bundle--general") (package-initialize) (unless package-archive-contents (package-refresh-contents)) (unless (package-installed-p 'use-package) (package-install 'use-package)) (eval-when-compile (require 'use-package)) (use-package doom-themes :init (load-theme 'doom-one t) :config (setq doom-themes-enable-bold t doom-themes-enable-italic t)) ;; (setq modus-themes-mode-line '(accented borderless 5)) ;; (setq modus-themes-region '(bg-only)) ;; (setq modus-themes-completions '(minimal)) ;; (load-theme 'modus-vivendi t) (global-hl-line-mode 1) (display-time-mode 1) (global-prettify-symbols-mode -1) ;; (setq display-time-format "W%V %a %d %b %Y %R %z") (setq-default display-time-format "W%V %a %d %b %R") (setq-default display-time-24hr-format t) ;; Cursor and mouse (column-number-mode 1) (mouse-wheel-mode 1) (blink-cursor-mode -1) (setq-default grep-command "grep -i -nH -e ") (when (eq system-type 'gnu/linux) (setq-default shell-file-name "/bin/bash") (setq-default tex-shell-file-name "/bin/bash")) ;; Files and sessions (setq-default auto-save-timeout 60) ;; Tabs, spaces, lines and parenthesis (show-paren-mode 1) (setq-default tab-width 4) (setq-default indent-tabs-mode nil) (setq-default line-spacing nil) (setq-default make-backup-files nil) (setq-default next-line-add-newlines t) ;; Miscellaneous (require 'cl-lib) (setq-default default-major-mode 'text-mode) (setq-default inhibit-startup-buffer-menu t inhibit-startup-screen t) (put 'narrow-to-region 'disabled nil) (put 'narrow-to-page 'disabled nil) (add-hook 'text-mode-hook 'turn-on-auto-fill) (defalias 'yes-or-no-p 'y-or-n-p) (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p) (global-set-key (kbd "M-i") 'imenu) (global-set-key (kbd "C-x C-b") 'ibuffer-list-buffers) ;;(global-set-key (kbd "M-[") 'tab-bar-history-back) ;;(global-set-key (kbd "M-]") 'tab-bar-history-forward) (add-hook 'diary-display-hook 'fancy-diary-display) (add-hook 'today-visible-calendar-hook 'calendar-mark-today) (add-hook 'write-file-hooks 'delete-trailing-whitespace) (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) (add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files) (setq-default compilation-ask-about-save nil) (setq-default horizontal-scroll-bar nil) (setq-default vertical-scroll-bar nil) (scroll-bar-mode -1) (setq-default mouse-wheel-scroll-amount '(1 ((shift) . 1) ((meta)) ((control) . text-scale))) ;; SIMPLE (setq-default completion-auto-wrap t) (setq-default completion-auto-select t) ;; MINIBUFFER (setq-default completions-format 'one-column) (setq-default completions-header-format nil) (setq-default completions-max-height 20) (icomplete-mode 1) ;; (require 'ido) (setq-default ido-enable-flex-matching t) (setq-default ido-everywhere t) (setq-default ido-create-new-buffer 'always) (setq-default ido-default-file-method 'selected-window) (setq-default ido-default-buffer-method 'raise-frame) (setq ido-file-extensions-order '(".org" ".lisp" ".py" ".txt" ".el" ".epub")) (ido-mode t) ;; (fido-mode 1) ; replace icomplete mode ;; (fido-vertical-mode 1) ;; UTF-8 FTW ;; Prefer UTF-8 encoding (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) ;; Treat clipboard input as UTF-8 string first; compound text next, etc. (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) ;; Set default file encoding to UTF-8 (setq-default buffer-file-coding-system 'utf-8) ;; Force UTF-8 for new files (setq default-buffer-file-coding-system 'utf-8) (setenv "PYTHONIOENCODING" "UTF-8") (when (eq system-type 'gnu/linux) (setq-default epg-pinentry-mode 'loopback) (setq-default custom-file "~/.emacs.d/bundle/custom_gnu.el" browse-url-secondary-browser-function 'browse-url-firefox) (unless (file-directory-p "~/cl-sites/") (async-shell-command "git clone https://code.metalisp.dev/marcuskammer/cl-sites.git ~/cl-sites"))) (when (eq system-type 'windows-nt) (setq-default explicit-shell-file-name (seq-find 'file-executable-p '("C:\\Program Files\\PowerShell\\7\\pwsh.exe" "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"))) (setq-default explicit-powershell.exe-args '("-NoProfile" "-InputFormat" "Text")) (setq-default custom-file "~/.emacs.d/bundle/custom_win32.el") (when (string= system-name "XPS-8930") (cd "~/") (setq-default custom-file "~/.emacs.d/bundle/custom_win32_XPS8930.el")) (when (string= system-name "EVG03435NB") (cd "~/OneDrive - Siemens AG/") (setq-default custom-file "~/.emacs.d/bundle/custom_win32_EVG03435NB.el"))) (load custom-file :noerror) (defun mk/exe-available-p (exe-name) "Check if exe is available on the system." (cond ;; Check for Windows ((eq system-type 'windows-nt) (or (executable-find (format "%s.exe" exe-name)) (executable-find exe-name))) ;; Check for Linux and other Unix-like systems ((or (eq system-type 'gnu/linux) (eq system-type 'darwin) (eq system-type 'berkeley-unix)) (executable-find exe-name)) ;; Return nil for unsupported systems (t nil))) ;; (load "bundle--gui") (defvar-local mk/mode-line-format '("%e" mode-line-front-space "%Z" " " "%b %*%n %I %l:%c %p" (vc-mode vc-mode) " " mode-line-modes mode-line-misc-info mode-line-end-spaces)) (setq-default mode-line-format mk/mode-line-format) (add-hook 'after-init-hook (lambda () (unless (memq 'hs-headline mode-line-format) (setq mode-line-format (append '("-" hs-headline) mode-line-format))))) (defun mk/toggle-mode-line () (interactive) (if (eql mode-line-format nil) (setq mode-line-format mk/mode-line-format) (setq mode-line-format nil))) (keymap-global-set "" 'mk/toggle-mode-line) (set-face-attribute 'mode-line nil :box '(:line-width (1 . 8) :style flat-button)) (set-face-attribute 'mode-line-inactive nil :box '(:line-width (1 . 8) :style flat-button)) ;; (set-face-attribute 'mode-line nil ;; :slant 'italic ;; :weight 'bold ;; :background (face-attribute 'default :background) ;; :foreground ;; (cond ((member 'doom-one custom-enabled-themes) "#5B6268") ;; ((member 'doom-nord custom-enabled-themes) "#9099AB") ;; (t (face-attribute 'mode-line-inactive :foreground))) ;; :box '(:line-width (1 . 8) :style flat-button)) ;; (set-face-attribute 'mode-line-inactive nil ;; :inherit 'mode-line ;; :weight 'normal ;; :box '(:line-width (1 . 8) :style flat-button)) (use-package tab-bar :bind (("C-M-[" . tab-bar-switch-to-prev-tab) ("C-M-]" . tab-bar-switch-to-next-tab) ("" . tab-bar-mode)) :custom (tab-bar-auto-width nil) (tab-bar-auto-width-max '(250 25)) (tab-bar-format '(tab-bar-format-history tab-bar-format-tabs-groups)) (tab-bar-tab-name-function 'tab-bar-tab-name-truncated) (tab-bar-close-button-show nil) (tab-bar-new-button-show nil) :config (set-face-attribute 'tab-bar nil :inherit 'mode-line-inactive :background (face-attribute 'mode-line-inactive :background)) (set-face-attribute 'tab-bar-tab nil :inherit 'mode-line :foreground (face-attribute 'mode-line :foreground) :box '(:line-width 8 :style flat-button)) (set-face-attribute 'tab-bar-tab-inactive nil :inherit 'mode-line-inactive :box '(:line-width 8 :style flat-button))) (setq frame-resize-pixelwise t) (defun center-frame (&optional frame) "Center FRAME on the screen." (interactive) (let ((frame (or frame (selected-frame)))) (let ((frame-width (frame-pixel-width frame)) (frame-height (frame-pixel-height frame)) (display-width (display-pixel-width)) (display-height (display-pixel-height))) (set-frame-position frame (/ (- display-width frame-width) 2) (/ (- display-height frame-height) 2))))) (add-hook 'after-make-frame-functions #'center-frame) (use-package all-the-icons :commands all-the-icons-install-fonts :init (when (display-graphic-p) (unless (find-font (font-spec :name "all-the-icons")) (all-the-icons-install-fonts t)))) (use-package all-the-icons-dired :after all-the-icons :hook (dired-mode . all-the-icons-dired-mode)) (use-package emojify :hook (erc-mode . emojify-mode) :commands emojify-mode :config (when (member "Segoe UI Emoji" (font-family-list)) (set-fontset-font t 'symbol (font-spec :family "Segoe UI Emoji") nil 'prepend)) (setq emojify-display-style 'unicode) (setq emojify-emoji-styles '(unicode)) (bind-key* (kbd "C-c .") #'emojify-insert-emoji)) ;; (defun my-vc-info () ;; (when vc-mode ;; (concat (substring vc-mode 5) ;; " [" ;; (substring (vc-working-revision (buffer-file-name)) 0 8) ;; "] "))) ;; (defun my-project-name () ;; (let ((proj (project-current))) ;; (if proj (file-name-base (directory-file-name (project-root proj))) ;; "NoProject"))) ;; (setq-default header-line-format ;; (list "-%M" ;; '(:eval (my-project-name)) " " ;; system-name " " user-login-name " " ;; "-%-")) ;; (setq-default mode-line-format ;; (list "-%b %*%n %I %l:%c %p " ;; '(:eval mode-name) " " ;; '(:eval (my-vc-info)) ;; '(:eval (if mode-line-process (concat ":" mode-line-process " ") "")) ;; 'default-directory ;; "-%-")) ;; (set-face-attribute 'mode-line nil :weight 'bold) ;; (set-face-attribute 'header-line nil :weight 'bold) ;; (use-package doom-modeline ;; :hook (after-init . doom-modeline-mode) ;; :custom ;; (doom-modeline-height 30) ;; (doom-modeline-bar-width 4) ;; (doom-modeline-icon nil) ;; (doom-modeline-major-mode-icon nil) ;; (doom-modeline-unicode-fallback nil) ;; (doom-modeline-minor-modes nil) ;; (doom-modeline-buffer-encoding nil) ;; (doom-modeline-battery nil)) (use-package helpful :commands (helpful-callable helpful-variable helpful-command helpful-key) :bind ([remap describe-command] . helpful-command) ([remap describe-key] . helpful-key)) (use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode)) (use-package olivetti :custom (olivetti-body-width 83) :bind ("" . olivetti-mode)) (add-hook 'Info-mode-hook (lambda () (make-local-variable 'olivetti-body-width) (setq olivetti-body-width 75) (olivetti-mode))) (use-package ace-window :init (global-set-key (kbd "M-o") 'ace-window)) ;; (use-package vertico :init (vertico-mode)) (use-package webjump :bind ("C-c j" . webjump) :custom (webjump-sites (append '(("Wikipedia_de" . [simple-query "de.wikipedia.org" "https://de.wikipedia.org/wiki/" ""]) ("leo.org" . [simple-query "dict.leo.org" "https://dict.leo.org/german-english/" ""])) webjump-sample-sites))) (use-package doc-view :ensure nil :init (mk/exe-available-p "mutool") :custom (doc-view-continuous nil) (doc-view-scale-internally nil) (doc-view-cache-size 32) (doc-view-prefetch-pages t) (doc-view-dvipdfm-program "mutool") (doc-view-odf->odf-converter-program "soffice") (dov-view-odf->pdf-converter-function 'doc-view-odf->pdf-converter-soffice) (doc-view-pdf->png-converter-function 'doc-view-pdf->png-converter-mupdf) (doc-view-resolution 200)) (use-package hideshow :hook ((prog-mode . (lambda () (hs-minor-mode 1)))) :bind (:map prog-mode-map ("M-" . hs-toggle-hiding)) :custom (hs-allow-nesting t)) (add-hook 'prog-mode-hook (lambda () (setq line-spacing 4))) (use-package vc :ensure nil :custom (vc-handled-backends '(Git Hg))) ;; (load "bundle--package") (require 'package) (defun get-auth-key (host) "Retrieve the Anthropics API key using 'auth-source'." (require 'auth-source) (let* ((auth-source-creation-prompts '((secret . "API key for %u@%h: "))) (found (nth 0 (auth-source-search :max 1 :host host :user "apikey" :require '(:secret) :create t))) (secret (plist-get found :secret))) (if (functionp secret) (funcall secret) secret))) (use-package htmlize) (use-package time :ensure nil :config (setq world-clock-time-format "%a %d %b %R %Z") (setq world-clock-list '(("America/Los_Angeles" "Seattle") ("America/New_York" "New York") ("Europe/London" "London") ("Europe/Paris" "Paris") ("Europe/Sofia" "Sofia") ("Asia/Calcutta" "Bangalore") ("Asia/Tokyo" "Tokyo")))) (use-package autoinsert :ensure nil :init (auto-insert-mode 1) :config (setq auto-insert-query nil) (let ((new-templates '((("\\.sh\\'" . "Shell script header") nil "#!/bin/bash\n# -*- mode: shell-script; coding: utf-8; -*-\n") (("\\.js\\'" . "JavaScript header") nil "#!/usr/bin/env node\n// -*- mode: js; coding: utf-8; -*-\n") (("\\.css\\'" . "CSS header") nil "/* -*- mode: css; coding: utf-8; -*-\n * Dependencies: none\n */\n") (("\\.html\\'" . "HTML header") nil "\n") (("\\.lisp\\'" . "Lisp header") nil ";;; -*- mode: lisp; coding: utf-8; -*-\n")))) (setq auto-insert-alist (nconc new-templates auto-insert-alist)))) (use-package tramp :ensure nil :config (when (eq system-type 'windows-nt) (setq tramp-default-method "sshx"))) (use-package shr :custom (shr-use-colors nil) (shr-use-fonts nil) (shr-inhibit-images t) (shr-cookie-policy nil) (shr-width nil)) (use-package shrface :hook ((eww-after-render . shrface-mode) (nov-mode . shrface-mode)) :custom (shrface-href-versatile t) (shrface-toggle-bullets t) :config (shrface-basic) (shrface-trial) (shrface-default-keybindings)) (when (mk/exe-available-p "hunspell") (progn (use-package flyspell :hook ((LaTeX-mode . flyspell-mode) (org-mode . flyspell-mode) (text-mode . flyspell-mode))) (use-package ispell :ensure nil :config ;; On windows: Copy *.aff and *.dic files to C:\msys64\ucrt64\share\hunspell or C:\cygwin64\usr\share\myspell ;; `hunspell -D`, the program will display the dictionaries and affix files it ;; finds and loads. ;; (when (eq system-type 'windows-nt) ;; (setq ispell-program-name "c:/msys64/ucrt64/bin/hunspell.exe")) (setq ispell-program-name "hunspell") (setq ispell-dictionary "german,english") (setq ispell-local-dictionary-alist '(("german" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "de_DE_frami,de_AT_frami,de_CH_frami") nil utf-8) ("english" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US,en_GB") nil utf-8) ("german,english" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "de_DE_frami,en_US") nil utf-8))) (setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist)))) (defun mk/nov-font-settings () ;(face-remap-add-relative 'variable-pitch :family "Noto Serif" :height 1.0) (setq-local line-spacing 0.3)) (use-package browse-url :custom (browse-url-browser-function 'eww-browse-url)) (use-package eww :config (require 'shrface)) (use-package nov :defer t :hook ((nov-mode . visual-line-mode) (nov-mode . mk/nov-font-settings)) :mode ("\\.epub\\'" . nov-mode) :custom (nov-header-line-format nil) (nov-text-width 82) (nov-variable-pitch t) :config (require 'shrface) (setq nov-shr-rendering-functions '((img . nov-render-img) (title . nov-render-title))) (setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))) ;; (when (eq system-type 'windows-nt) ;; (setq nov-unzip-program "c:/msys64/usr/bin/unzip.exe"))) (use-package eglot :hook ((typescript-mode . eglot-ensure) (js2-mode . eglot-ensure)) :config (if (eq system-name 'windows-nt) ;; %USERPROFILE%\AppData\Local\Programs\clangd-windows-17.0.3\clangd_17.0.3\bin (add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd")) (add-to-list 'eglot-server-programs '((c++-mode c-mode) "ccls")))) (use-package sql :defer t :mode (("\\.sql\\'" . sql-mode) ("\\.sqlite\\'" . sql-mode)) :config (setq sql-connection-alist '((finance-db (sql-product 'sqlite) (sql-database "~/Documents/org/data/FINANCE.db")))) (setq sql-sqlite-options '("-interactive" "-column" "-header")) (when (eq system-type 'windows-nt) (setq sql-postgres-program "C:/Program Files/PostgreSQL/16/bin/psql.exe") (let ((path "C:/cygwin64/bin/sqlite3.exe")) (when (file-exists-p path) (setq sql-sqlite-program path))) (setq sql-mariadb-options '("-C" "-t" "-f" "-n")) (setq sql-mysql-options '("-C" "-t" "-f" "-n")))) ;; (defun me/c-mode-style-hook () ;; ;; https://www.gnu.org/prep/standards/html_node/Writing-C.html ;; ;; if linux kernel source use linux style, else use gnu style ;; (c-set-style ;; (if (and (buffer-file-name) ;; (string-match "/usr/src/linux" (buffer-file-name))) ;; "linux" ;; "gnu"))) ;; (use-package cc-mode ;; :defer t ;; :ensure nil ;; :hook ((c-mode-common . c-toggle-auto-newline) ;; (c-mode-common . me/c-mode-style-hook)) ;; :custom ;; (fill-column 79) ;; (c-basic-offset 2) ;; (indent-tabs-mode nil) ;; :config ;; (define-key c-mode-base-map (kbd "RET") 'newline-and-indent)) ;; (defun me/c-mode-compile-command-hook () ;; ;; if no makefile use gcc for compile command ;; (unless (or (file-exists-p "makefile") ;; (file-exists-p "Makefile")) ;; (set (make-local-variable 'compile-command) ;; (concat "gcc " "-Wall " "-g " buffer-file-name " -o " ;; (file-name-sans-extension buffer-file-name))))) ;; (add-hook 'c-mode-common-hook 'me/c-mode-compile-command-hook) ;; (defun me/c-mode-compile-on-save () ;; ;; compile on save hook ;; (make-local-variable 'after-save-hook) ;; (add-hook 'after-save-hook (lambda () (compile compile-command)))) ;; (add-hook 'c-mode-common-hook 'me/c-mode-compile-on-save) ;; (use-package js-mode ;; :ensure nil ;; :hook (js-mode . eglot-ensure) ;; :mode (("\\.webmanifest\\'" . js-mode) ;; ("\\.js\\'" . js-mode) ;; ("\\.mjs\\'" . js-mode) ;; ("\\.cjs\\'" . js-mode))) (use-package js2-mode :mode (("\\.webmanifest\\'" . js2-mode) ("\\.js\\'" . js2-mode) ("\\.mjs\\'" . js2-mode) ("\\.cjs\\'" . js2-mode)) :config (add-to-list 'interpreter-mode-alist '("node" . js2-mode))) ;; (use-package go-mode ;; :defer t ;; :mode ("\\.go\\'" . go-mode) ;; :hook ((before-save . gofmt-before-save) ;; (go-mode . eglot-ensure)) ;; :config ;; (defun me/go-mode-compile-command-hook () ;; ;; if no makefile use go vet for compile command ;; (unless (or (file-exists-p "makefile") ;; (file-exists-p "Makefile")) ;; (set (make-local-variable 'compile-command) ;; (concat "go " "vet " buffer-file-name)))) ;; (add-hook 'go-mode-hook 'me/go-mode-compile-command-hook) ;; (defun me/go-mode-compile-on-save () ;; ;; compile on save hook ;; (make-local-variable 'after-save-hook) ;; (add-hook 'after-save-hook (lambda () (compile compile-command))))) ;; ;; (add-hook 'go-mode-hook 'me/go-mode-compile-on-save))) (use-package web-mode ;; :hook html-mode :mode (("\\.html?\\'" . web-mode) ("\\.xhtml?\\'" . web-mode) ("\\.tmpl\\'" . web-mode) ("\\.hbs\\'" . web-mode) ("\\.handlebars\\'" . web-mode)) :custom (web-mode-markup-indent-offset 2) (web-mode-css-indent-offset 2) (web-mode-code-indent-offset 2) (web-mode-enable-auto-pairing nil) (web-mode-enable-auto-closing t) (web-mode-enable-current-element-highlight t) (web-mode-enable-current-column-highlight t)) (use-package python :mode (("\\.py\\'" . python-mode) ("\\.wsgi$" . python-mode) ("\\.j2" . python-mode)) :hook (python-mode . abbrev-mode) :init (setq python-interpreter (cond ((executable-find "python3") "python3") ((executable-find "python") "python") (t "python3"))) (setq python-indent-guess-indent-offset nil) (setq python-indent-offset 4) (setq python-shell-interpreter "ipython") (setq python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True") :custom (fill-column 79)) ;; (use-package simple-httpd ;; :defer t) (use-package go-translate :bind (("C-c t" . gt-do-translate)) :config (setq gt-polyglot-p t) (setq gt-langs '(en de fr it es)) (setq gt-default-translator (gt-translator :taker (gt-taker :langs '(en fr de it es) :text 'paragaph :pick nil) :engines (list (gt-bing-engine) (gt-google-engine)) :render (gt-buffer-render)))) (use-package magit :defer t :bind ("C-x g" . magit-status) :init (when (eq system-type 'windows-nt) (setq magit-git-executable "C:/Program Files/Git/mingw64/libexec/git-core/git.exe")) :custom (magit-diff-refine-hunk 'all) (magit-display-buffer-function 'magit-display-buffer-fullcolumn-most-v1) (magit-ediff-dwim-show-on-hunks t) (magit-log-arguments '("--graph" "--color" "--decorate" "--show-signature" "--follow" "-n256")) (magit-log-margin-show-committer-date t) (magit-log-remove-graph-args '("--follow" "--grep" "-G" "-S" "-L")) (magit-todos-insert-after '(bottom)) :config (global-set-key (kbd "C-x M-g") 'magit-dispatch)) (use-package yaml-mode :mode "\\.yml\\'" :hook (yaml-mode . (lambda () (auto-fill-mode -1)))) (use-package csv-mode :mode "\\.csv\\'") (use-package markdown-mode :mode "\\.md\\'") ;; (use-package typescript-mode ;; :defer t ;; :mode "\\.ts\\'" ;; :hook (typescript-mode . eglot-ensure) ;; :config (setq typescript-indent-level 2)) (when (eq system-type 'gnu/linux) (use-package spotify :bind ("S-" . spotify-playpause))) (use-package mastodon :defer t :custom (mastodon-instance-url "https://fosstodon.org") (mastodon-active-user "metalisp")) (use-package jabber :defer t :bind (("C-x j c" . jabber-connect) ("C-x j d" . jabber-disconnect)) :init (setq jabber-activity-mode nil) (setq jabber-account-list '(("marcus.kammer@mailbox.org"))) :custom (jabber-muc-decorate-presence-patterns '(("enters the room" . nil) ("has entered the room" . nil) ("joined the room" . nil) ("has left the chatroom" . nil))) (jabber-muc-autojoin '("lisp@conference.a3.pm" "emacs@conference.conversations.im" "userexperience@conference.mailbox.org" "metalisp@conference.mailbox.org")) (jabber-muc-default-nicknames '(("lisp@conference.a3.pm" . "marcus") ("emacs@conference.conversations.im" . "marcus") ("userexperience@conference.mailbox.org" . "marcus") ("metalisp@conference.mailbox.org" . "marcus")))) ;; (use-package hyperbole ;; :config ;; (setq hyrolo-date-format "%Y-%m-%d %H:%M:%S") ;; (add-hook 'hyperbole-init-hook ;; (lambda () ;; (setq hyrolo-file-list ;; (append (hyrolo-initialize-file-list) ;; (cons "~/.rolo.otl" ;; (directory-files-recursively org-directory (rx "." (or "org" "otl") eos)))))))) (use-package plantuml-mode :defer t :mode ("\\.puml\\'" "\\.plantuml\\'") :config (let ((plantuml-dir (format "-Dplantuml.include.path=%s" (expand-file-name "~/.emacs.d/plantuml/")))) (setq plantuml-java-args (list "-DPLANTUML_LIMIT_SIZE=8192" plantuml-dir "-Djava.awt.headless=true" "-jar" "--illegal-access=deny"))) (setq plantuml-jar-args `("-charset" "UTF-8" "-config" ,(expand-file-name "~/.emacs.d/plantuml/plantuml.config"))) :custom (plantuml-default-exec-mode 'jar) (plantuml-jar-path "~/plantuml.jar")) (use-package tex-mode :defer t :config ;; TeX mode settings for editing .tex files (setq TeX-auto-save t) ; Enable auto-save (setq TeX-electric-math (cons "$" "$")) ; Shortcut for math mode (if (eq system-type 'windows-nt) (progn (setq TeX-view-program-list '(("SumatraPDF" "~/AppData/Local/SumatraPDF/SumatraPDF.exe %o"))) (setq TeX-view-program-selection '((output-pdf "SumatraPDF")))) (setq TeX-view-program-selection '((output-pdf "Evince")))) (setq TeX-source-correlate-start-server t) ; Enable source-correlate (setq TeX-master nil) ; Default master file (setq TeX-engine 'luatex) ; Set engine to XeTeX (setq TeX-command-extra-options "-shell-escape")) ; Allow shell escape ;; (use-package auctex ;; :hook ((LaTeX-mode . turn-on-reftex) ;; (LaTeX-mode . LaTeX-math-mode)) ;; :custom ;; (LaTeX-indent-level 4) ;; (LaTeX-item-indent 0)) (use-package epg :ensure nil :config (when (eq system-type 'windows-nt) (setq epg-gpg-home-directory "~/AppData/Roaming/gnupg" epg-gpg-program "c:/Program Files (x86)/GnuPG/bin/gpg.exe" epg-gpgconf-program "c:/Program Files (x86)/GnuPG/bin/gpgconf.exe"))) (use-package which-key :init (which-key-mode)) (use-package ssh-config-mode :mode ("/sshd_config\\'" . ssh-config-mode) :config (add-hook 'ssh-config-mode-hook 'turn-on-font-lock)) (use-package nginx-mode :mode ("/nginx/.*\\'" . nginx-mode)) (use-package dashboard :config (dashboard-setup-startup-hook)) ;; (use-package flymake-json) ;; (use-package json-mode ;; :ensure nil ;; :mode "\\.json\\'" ;; :hook (json-mode . flymake-json-load)) ;; (use-package json-navigator ;; :defer t ;; :after json-mode) ;; (use-package jq-format ;; :defer t ;; :after json-mode) (use-package gptel :bind (("C-c g" . gptel-menu) ("C-c G" . gptel) ("C-c M-g" . gptel-send) :map gptel-mode-map ("C-c C-c" . gptel-send) ("C-c C-k" . gptel-abort)) :config (gptel-make-anthropic "Claude" :stream t :key gptel-api-key :models '(claude-3-5-sonnet-20241022)) (when (eq system-type 'windows-nt) (setq gptel-use-curl t)) (setq gptel-prompt-prefix-alist '((markdown-mode . "# ") (org-mode . "* ") (text-mode . "# "))) (setq gptel-default-mode 'org-mode) (setq gptel-backend (gptel-make-perplexity "Perplexity" :key gptel-api-key :stream t :models '(sonar-pro))) (setq gptel-model 'sonar-pro) (setq gptel-directives (append gptel-directives '((lisp-dev . "You're an expert Common Lisp developer. Provide idiomatic code examples demonstrating functional and OOP techniques. Explain REPL-driven development and Emacs/SLIME usage. Be clear and technically precise.") (bash . "You're a Bash scripting teacher. Explain concepts clearly with examples. Guide through script writing step-by-step, from basics to advanced topics.") (cs-teacher . "You're a high school CS teaching assistant focusing on functional programming, data structures, and algorithms in Common Lisp. Provide clear, engaging explanations and examples suitable for high school students.") (statistic-teacher . "You're a high school statistics teacher. Explain concepts clearly with real-world examples. Apply theories to UX/usability with brief examples.") (cl-stats . "You're a high school math teacher specializing in statistics. Use simple language and Common Lisp examples emphasizing functional programming. Break down key statistical concepts step-by-step.") (prompt-writer . "You're an expert prompt engineer. Analyze user input, craft focused prompts, and explain your reasoning.") (user-story-writer . "You're an agile product manager crafting user stories. Use INVEST criteria, ask clarifying questions, structure stories properly, and suggest acceptance criteria.") (technical-writer . "You're a UX documentation specialist. Help improve grammar, structure, formatting, and consistency in technical writing. Suggest specific improvements and ask for clarification when needed.") (ux-assistant . "You're a seasoned UX Design Consultant with 10+ years of experience. Your expertise spans user research, interaction design, usability testing, and service design. Communicate professionally yet approachably, explaining UX concepts clearly."))))) (use-package gnuplot :defer t) (use-package docker) (use-package dockerfile-mode :mode ("\\.dockerfile\\'" . dockerfile-mode)) (use-package terraform-mode :defer t :custom (terraform-format-on-save t)) ;; (load "bundle--lisp") (defvar mk/hyperspec-dir-locations '("~/cl-sites/HyperSpec-7-0/HyperSpec/" "~/HyperSpec-7-0/HyperSpec/") "List of possible locations where the local HyperSpec could reside.") (defun mk/hyperspec-dir () "Finds and returns the URI of the local HyperSpec directory. Uses `mk/hyperspec-dir-locations' to find the directory." (let ((dir (seq-find 'file-directory-p mk/hyperspec-dir-locations))) (if dir (concat "file://" (and (eq system-type 'windows-nt) "/") (expand-file-name dir)) nil))) (setq common-lisp-hyperspec-root (mk/hyperspec-dir)) (use-package slime :defer t :init (setq inferior-lisp-program "sbcl") :custom (slime-autodoc-use-multiline-p t) (slime-complete-symbol-function 'slime-fuzzy-complete-symbol) (slime-net-coding-system 'utf-8-unix) :config (define-key slime-mode-map (kbd "C-c C-q") 'slime-close-all-parens-in-sexp) (slime-setup '(slime-fancy slime-autodoc slime-asdf slime-indentation slime-sbcl-exts slime-company slime-tramp)) ;; REPL syntax highlighting (defvar slime-repl-font-lock-keywords lisp-font-lock-keywords-2) (defun slime-repl-font-lock-setup () (setq font-lock-defaults '(slime-repl-font-lock-keywords nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function)))) (add-hook 'slime-repl-mode-hook 'slime-repl-font-lock-setup) ;; Custom REPL prompt (defadvice slime-repl-insert-prompt (after font-lock-face activate) (let ((inhibit-read-only t)) (add-text-properties slime-repl-prompt-start-mark (point) '(font-lock-face slime-repl-prompt-face rear-nonsticky (slime-repl-prompt read-only font-lock-face intangible))))) ;; Load custom core file if it exists (let ((core-path (expand-file-name "~/sbcl.core-for-slime"))) (when (file-exists-p core-path) (setq slime-lisp-implementations `((sbcl ("sbcl" "--noinform" "--core" ,core-path) :coding-system utf-8-unix))))) ;; Remote instance configuration (setq mk/slime-remote-instances '((:machine-instance "code-metalisp" :remote-host "code.metalisp.dev" :username "cl") (:machine-instance "u1-marcsukammer" :remote-host "u1.marcsukammer.dev" :username "marcus"))) (mapc (lambda (instance) (push (slime-create-filename-translator :machine-instance (plist-get instance :machine-instance) :remote-host (plist-get instance :remote-host) :username (plist-get instance :username)) slime-filename-translations)) mk/slime-remote-instances)) (use-package slime-company :after (slime company) :config (setq slime-company-completion 'fuzzy slime-company-after-completion 'slime-company-just-one-space)) (use-package ielm :ensure nil :hook ((ielm-mode . (lambda () (paredit-mode -1) (company-mode -1))))) (use-package elisp-mode :ensure nil :hook ((emacs-lisp-mode . prettify-symbols-mode) (emacs-lisp-mode . (lambda () (face-remap-add-relative 'font-lock-function-name-face nil :underline t)))) :mode (("\\.el$" . emacs-lisp-mode)) :config (setq-local lisp-indent-function 'lisp-indent-function)) (use-package lisp-mode :ensure nil :hook ((lisp-mode . (lambda () (face-remap-add-relative 'font-lock-function-name-face nil :underline t)))) :mode (("\\.lisp$" . lisp-mode) ("\\.lsp$" . lisp-mode) ("\\.cl$" . lisp-mode) ("\\.asd$" . lisp-mode) ("\\.sexp\\'" . lisp-data-mode)) :init (setq inferior-lisp-program "sbcl --noinform") :config (setq-local comment-start ";; ") (setq-local lisp-indent-function 'common-lisp-indent-function) (defvar g-cl-function-names '("*" "+" "-" "/" "/=" "1+" "1-" "<" "<=" "=" ">" ">=" "abort" "abs" "acons" "acos" "acosh" "add-method" "adjoin" "adjust-array" "adjustable-array-p" "allocate-instance" "alpha-char-p" "alphanumericp" "and" "append" "apply" "apropos" "apropos-list" "aref" "arithmetic-error-operands" "arithmetic-error-operation" "array-dimension" "array-dimensions" "array-displacement" "array-element-type" "array-has-fill-pointer-p" "array-in-bounds-p" "array-rank" "array-row-major-index" "array-total-size" "arrayp" "ash" "asin" "asinh" "assert" "assoc" "assoc-if" "assoc-if-not" "atan" "atanh" "atom" "bit" "bit-and" "bit-andc1" "bit-andc2" "bit-eqv" "bit-ior" "bit-nand" "bit-nor" "bit-not" "bit-orc1" "bit-orc2" "bit-vector-p" "bit-xor" "block" "boole" "both-case-p" "boundp" "break" "broadcast-stream-streams" "butlast" "byte" "byte-position" "byte-size" "caaaar" "caaadr" "caaar" "caadar" "caaddr" "caadr" "caar" "cadaar" "cadadr" "cadar" "caddar" "cadddr" "caddr" "cadr" "call-method" "car" "case" "catch" "ccase" "cdaaar" "cdaadr" "cdaar" "cdadar" "cdaddr" "cdadr" "cdar" "cddaar" "cddadr" "cddar" "cdddar" "cddddr" "cdddr" "cddr" "cdr" "ceiling" "cell-error-name" "cerror" "change-class" "char" "char-code" "char-downcase" "char-equal" "char-greaterp" "char-int" "char-lessp" "char-name" "char-not-equal" "char-not-greaterp" "char-not-lessp" "char-upcase" "char/=" "char<" "char<=" "char=" "char>" "char>=" "character" "characterp" "check-type" "cis" "class-name" "class-of" "clear-input" "clear-output" "close" "clrhash" "code-char" "coerce" "compile" "compile-file" "compile-file-pathname" "compiled-function-p" "compiler-macro-function" "complement" "complex" "complexp" "compute-applicable-methods" "compute-restarts" "concatenate" "concatenated-stream-streams" "cond" "conjugate" "cons" "consp" "constantly" "constantp" "continue" "copy-alist" "copy-list" "copy-pprint-dispatch" "copy-readtable" "copy-seq" "copy-structure" "copy-symbol" "copy-tree" "cos" "cosh" "count" "count-if" "count-if-not" "ctypecase" "decf" "declaim" "decode-float" "decode-universal-time" "defclass" "defconstant" "defgeneric" "define-compiler-macro" "define-condition" "define-method-combination" "define-modify-macro" "define-setf-expander" "define-symbol-macro" "defmacro" "defmethod" "defpackage" "defparameter" "defsetf" "defstruct" "deftype" "defun" "defvar" "delete" "delete-duplicates" "delete-file" "delete-if" "delete-if-not" "delete-package" "denominator" "deposit-field" "describe" "describe-object" "destructuring-bind" "digit-char" "digit-char-p" "directory" "directory-namestring" "disassemble" "do" "do*" "do-all-symbols" "do-external-symbols" "do-symbols" "documentation" "dolist" "dotimes" "dpb" "dribble" "ecase" "echo-stream-input-stream" "echo-stream-output-stream" "ed" "eighth" "elt" "encode-universal-time" "endp" "enough-namestring" "ensure-directories-exist" "ensure-generic-function" "eq" "eql" "equal" "equalp" "error" "etypecase" "eval" "eval-when" "evenp" "every" "exp" "export" "expt" "fboundp" "fceiling" "fdefinition" "ffloor" "fifth" "file-author" "file-error-pathname" "file-length" "file-namestring" "file-position" "file-string-length" "file-write-date" "fill" "fill-pointer" "find" "find-all-symbols" "find-class" "find-if" "find-if-not" "find-method" "find-package" "find-restart" "find-symbol" "finish-output" "first" "flet" "float" "float-digits" "float-precision" "float-radix" "float-sign" "floatp" "floor" "fmakunbound" "force-output" "format" "formatter" "fourth" "fresh-line" "fround" "ftruncate" "funcall" "function" "function-keywords" "function-lambda-expression" "functionp" "gcd" "gensym" "gentemp" "get" "get-decoded-time" "get-dispatch-macro-character" "get-internal-real-time" "get-internal-run-time" "get-macro-character" "get-output-stream-string" "get-properties" "get-setf-expansion" "get-universal-time" "getf" "gethash" "go" "graphic-char-p" "handler-bind" "handler-case" "hash-table-count" "hash-table-p" "hash-table-rehash-size" "hash-table-rehash-threshold" "hash-table-size" "hash-table-test" "host-namestring" "identity" "if" "ignore-errors" "imagpart" "import" "in-package" "incf" "initialize-instance" "input-stream-p" "inspect" "integer-decode-float" "integer-length" "integerp" "interactive-stream-p" "intern" "intersection" "invalid-method-error" "invoke-debugger" "invoke-restart" "invoke-restart-interactively" "isqrt" "keywordp" "labels" "lambda" "last" "lcm" "ldb" "ldb-test" "ldiff" "length" "let" "let*" "lisp-implementation-type" "lisp-implementation-version" "list" "list*" "list-all-packages" "list-length" "listen" "listp" "load" "load-logical-pathname-translations" "load-time-value" "locally" "log" "logand" "logandc1" "logandc2" "logbitp" "logcount" "logeqv" "logical-pathname" "logical-pathname-translations" "logior" "lognand" "lognor" "lognot" "logorc1" "logorc2" "logtest" "logxor" "long-site-name" "loop" "loop-finish" "lower-case-p" "machine-instance" "machine-type" "machine-version" "macro-function" "macroexpand" "macroexpand-1" "macrolet" "make-array" "make-broadcast-stream" "make-concatenated-stream" "make-condition" "make-dispatch-macro-character" "make-echo-stream" "make-hash-table" "make-instance" "make-instances-obsolete" "make-list" "make-load-form" "make-load-form-saving-slots" "make-package" "make-pathname" "make-random-state" "make-sequence" "make-string" "make-string-input-stream" "make-string-output-stream" "make-symbol" "make-synonym-stream" "make-two-way-stream" "makunbound" "map" "map-into" "mapc" "mapcan" "mapcar" "mapcon" "maphash" "mapl" "maplist" "mask-field" "max" "member" "member-if" "member-if-not" "merge" "merge-pathnames" "method-combination-error" "method-qualifiers" "min" "minusp" "mismatch" "mod" "muffle-warning" "multiple-value-bind" "multiple-value-call" "multiple-value-list" "multiple-value-prog1" "multiple-value-setq" "name-char" "namestring" "nbutlast" "nconc" "nintersection" "ninth" "no-applicable-method" "no-next-method" "not" "notany" "notevery" "nreconc" "nreverse" "nset-difference" "nset-exclusive-or" "nstring-capitalize" "nstring-downcase" "nstring-upcase" "nsublis" "nsubst" "nsubst-if" "nsubst-if-not" "nsubstitute" "nsubstitute-if" "nsubstitute-if-not" "nth" "nth-value" "nthcdr" "null" "numberp" "numerator" "nunion" "oddp" "open" "open-stream-p" "or" "output-stream-p" "package-error-package" "package-name" "package-nicknames" "package-shadowing-symbols" "package-use-list" "package-used-by-list" "packagep" "pairlis" "parse-integer" "parse-namestring" "pathname" "pathname-device" "pathname-directory" "pathname-host" "pathname-match-p" "pathname-name" "pathname-type" "pathname-version" "pathnamep" "peek-char" "phase" "plusp" "pop" "position" "position-if" "position-if-not" "pprint" "pprint-dispatch" "pprint-exit-if-list-exhausted" "pprint-fill" "pprint-indent" "pprint-linear" "pprint-logical-block" "pprint-newline" "pprint-pop" "pprint-tab" "pprint-tabular" "prin1" "prin1-to-string" "princ" "princ-to-string" "print" "print-not-readable-object" "print-object" "print-unreadable-object" "probe-file" "proclaim" "prog" "prog*" "prog1" "prog2" "progn" "progv" "provide" "psetf" "psetq" "push" "pushnew" "quote" "random" "random-state-p" "rassoc" "rassoc-if" "rassoc-if-not" "rational" "rationalize" "rationalp" "read" "read-byte" "read-char" "read-char-no-hang" "read-delimited-list" "read-from-string" "read-line" "read-preserving-whitespace" "read-sequence" "readtable-case" "readtablep" "realp" "realpart" "reduce" "reinitialize-instance" "rem" "remf" "remhash" "remove" "remove-duplicates" "remove-if" "remove-if-not" "remove-method" "remprop" "rename-file" "rename-package" "replace" "require" "rest" "restart-bind" "restart-case" "restart-name" "return" "return-from" "revappend" "reverse" "room" "rotatef" "round" "row-major-aref" "rplaca" "rplacd" "sbit" "scale-float" "schar" "search" "second" "set" "set-difference" "set-dispatch-macro-character" "set-exclusive-or" "set-macro-character" "set-pprint-dispatch" "set-syntax-from-char" "setf" "setq" "seventh" "shadow" "shadowing-import" "shared-initialize" "shiftf" "short-site-name" "signal" "signum" "simple-bit-vector-p" "simple-condition-format-arguments" "simple-condition-format-control" "simple-string-p" "simple-vector-p" "sin" "sinh" "sixth" "sleep" "slot-boundp" "slot-exists-p" "slot-makunbound" "slot-missing" "slot-unbound" "slot-value" "software-type" "software-version" "some" "sort" "special-operator-p" "sqrt" "stable-sort" "standard-char-p" "step" "store-value" "stream-element-type" "stream-error-stream" "stream-external-format" "streamp" "string" "string-capitalize" "string-downcase" "string-equal" "string-greaterp" "string-left-trim" "string-lessp" "string-not-equal" "string-not-greaterp" "string-not-lessp" "string-right-trim" "string-trim" "string-upcase" "string/=" "string<" "string<=" "string=" "string>" "string>=" "stringp" "sublis" "subseq" "subsetp" "subst" "subst-if" "subst-if-not" "substitute" "substitute-if" "substitute-if-not" "subtypep" "svref" "sxhash" "symbol-function" "symbol-macrolet" "symbol-name" "symbol-package" "symbol-plist" "symbol-value" "symbolp" "synonym-stream-symbol" "tagbody" "tailp" "tan" "tanh" "tenth" "terpri" "the" "third" "throw" "time" "trace" "translate-logical-pathname" "translate-pathname" "tree-equal" "truename" "truncate" "two-way-stream-input-stream" "two-way-stream-output-stream" "type-error-datum" "type-error-expected-type" "type-of" "typecase" "typep" "unbound-slot-instance" "unexport" "unintern" "union" "unless" "unread-char" "untrace" "unuse-package" "unwind-protect" "update-instance-for-different-class" "update-instance-for-redefined-class" "upgraded-array-element-type" "upgraded-complex-part-type" "upper-case-p" "use-package" "use-value" "user-homedir-pathname" "values" "values-list" "vector" "vector-pop" "vector-push" "vector-push-extend" "vectorp" "warn" "when" "wild-pathname-p" "with-accessors" "with-compilation-unit" "with-condition-restarts" "with-hash-table-iterator" "with-input-from-string" "with-open-file" "with-open-stream" "with-output-to-string" "with-package-iterator" "with-simple-restart" "with-slots" "with-standard-io-syntax" "write" "write-byte" "write-char" "write-line" "write-sequence" "write-string" "write-to-string" "y-or-n-p" "yes-or-no-p" "zerop")) (defvar g-cl-value-names '("*" "**" "***" "*break-on-signals*" "*compile-file-pathname*" "*compile-file-truename*" "*compile-print*" "*compile-verbose*" "*debug-io*" "*debugger-hook*" "*default-pathname-defaults*" "*error-output*" "*features*" "*gensym-counter*" "*load-pathname*" "*load-print*" "*load-truename*" "*load-verbose*" "*macroexpand-hook*" "*modules*" "*package*" "*print-array*" "*print-base*" "*print-case*" "*print-circle*" "*print-escape*" "*print-gensym*" "*print-length*" "*print-level*" "*print-lines*" "*print-miser-width*" "*print-pprint-dispatch*" "*print-pretty*" "*print-radix*" "*print-readably*" "*print-right-margin*" "*query-io*" "*random-state*" "*read-base*" "*read-default-float-format*" "*read-eval*" "*read-suppress*" "*readtable*" "*standard-input*" "*standard-output*" "*terminal-io*" "*trace-output*" "+" "++" "+++" "-" "/" "//" "///" "array-dimension-limit" "array-rank-limit" "array-total-size-limit" "boole-1" "boole-2" "boole-and" "boole-andc1" "boole-andc2" "boole-c1" "boole-c2" "boole-clr" "boole-eqv" "boole-ior" "boole-nand" "boole-nor" "boole-orc1" "boole-orc2" "boole-set" "boole-xor" "call-arguments-limit" "char-code-limit" "double-float-epsilon" "double-float-negative-epsilon" "internal-time-units-per-second" "lambda-list-keywords" "lambda-parameters-limit" "least-negative-double-float" "least-negative-long-float" "least-negative-normalized-double-float" "least-negative-normalized-long-float" "least-negative-normalized-short-float" "least-negative-normalized-single-float" "least-negative-short-float" "least-negative-single-float" "least-positive-double-float" "least-positive-long-float" "least-positive-normalized-double-float" "least-positive-normalized-long-float" "least-positive-normalized-short-float" "least-positive-normalized-single-float" "least-positive-short-float" "least-positive-single-float" "long-float-epsilon" "long-float-negative-epsilon" "most-negative-double-float" "most-negative-fixnum" "most-negative-long-float" "most-negative-short-float" "most-negative-single-float" "most-positive-double-float" "most-positive-fixnum" "most-positive-long-float" "most-positive-short-float" "most-positive-single-float" "multiple-values-limit" "nil" "pi" "short-float-epsilon" "short-float-negative-epsilon" "single-float-epsilon" "single-float-negative-epsilon" "t")) (defface g-cl-character-face '((default :inherit font-lock-constant-face)) "The face used to highlight Common Lisp character literals.") (defface g-cl-standard-function-face '((default :inherit font-lock-keyword-face)) "The face used to highlight standard Common Lisp function symbols.") (defface g-cl-standard-value-face '((default :inherit font-lock-variable-name-face)) "The face used to highlight standard Common Lisp value symbols.") (defvar g-cl-font-lock-keywords (let* ((character-re (concat "#\\\\" lisp-mode-symbol-regexp "\\_>")) (function-re (concat "(" (regexp-opt g-cl-function-names t) "\\_>")) (value-re (regexp-opt g-cl-value-names 'symbols))) `((,character-re . 'g-cl-character-face) (,function-re (1 'g-cl-standard-function-face)) (,value-re . 'g-cl-standard-value-face)))) (defvar g-cl-font-lock-defaults '((g-cl-font-lock-keywords) nil ; enable syntaxic highlighting t ; case insensitive highlighting nil ; use the lisp-mode syntax table (font-lock-mark-block-function . mark-defun) (font-lock-extra-managed-props help-echo) (font-lock-syntactic-face-function . lisp-font-lock-syntactic-face-function))) (defun g-init-lisp-font-lock () (setq font-lock-defaults g-cl-font-lock-defaults)) (add-hook 'lisp-mode-hook 'g-init-lisp-font-lock)) (when (eq system-type 'gnu/linux) (use-package cider :defer t) (use-package geiser :defer t :init (setq geiser-repl-prompt-read-only t) (setq geiser-repl-highlight-error-messages t) (setq geiser-active-implementations '(chez guile)) (setq geiser-default-implementation 'guile) :hook (scheme-mode . geiser-mode)) (use-package geiser-chez :defer t :after geiser) (use-package geiser-guile :defer t :after geiser :custom (geiser-guile-binary "guile"))) ;; (use-package racket-mode ;; :mode "\\.rkt\\'") ;; (use-package geiser-racket ;; :defer t ;; :after geiser ;; :config ;; (when (eq system-type 'windows-nt) ;; (setq geiser-racket-binary "c:/Program Files/Racket/Racket.exe"))) ;; (use-package ac-slime ;; :after (slime auto-complete) ;; :config ;; (add-hook 'slime-mode-hook 'set-up-slime-ac) ;; (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)) (use-package paredit :hook ((emacs-lisp-mode . paredit-mode) (eval-expression-minibuffer-setup . paredit-mode) (lisp-mode . paredit-mode) (lisp-interaction-mode . paredit-mode) (scheme-mode . paredit-mode)) :bind (:map paredit-mode-map ("M-s" . nil) ("C-M-s" . paredit-splice-sexp))) ;; (load "bundle--irc") ;; (setq debug-on-error t) ;; (setq erc-debug-irc-protocol t) ;; (setq gnutls-log-level 2) (defun mk/start-erc (nick) (interactive "sTell me your nick please: ") (let ((erc-sasl-mechanism 'external)) (erc-tls :server "irc.libera.chat" :port 6697 :nick nick :full-name "Jay Edgar Hoover" :client-certificate `(,(expand-file-name "~/.irssi/certs/libera.key") ,(expand-file-name "~/.irssi/certs/libera.crt"))))) (use-package rcirc :ensure nil :custom (rcirc-authinfo `(("libera.chat" certfp (,(expand-file-name "~/.irssi/certs/libera.key") ,(expand-file-name "~/.irssi/certs/libera.crt"))))) (rcirc-server-alist '(("irc.libera.chat" :nick "srji" :user-name "srji" :full-name "Jay Edgar Hoover" :channels nil :port 6697 :encryption tls)))) (use-package erc :defer t :custom (erc-track-exclude '("#emacs")) (erc-track-exclude-types '("JOIN" "NICK" "QUIT" "MODE" "AWAY")) (erc-hide-list '("JOIN" "NICK" "QUIT" "MODE" "AWAY")) (erc-track-exclude-server-buffer t) (erc-fill-column 80) (erc-fill-function 'erc-fill-static) (erc-fill-static-center 20) (erc-prompt-for-nickserv-password nil) (erc-track-shorten-start 8) (erc-auto-query 'bury) (erc-network-hide-list '(("libera.chat" "JOIN" "PART" "QUIT"))) (erc-rename-buffers t) (erc-interpret-mirc-color t) (erc-kill-buffer-on-part t) (erc-kill-queries-on-quit t) (erc-kill-server-buffer-on-quit t) (erc-modules '(autojoin ; Set away status automatically button ; Join channels automatically completion ; Complete nicknames and commands (programmable) fill ; Wrap long lines irccontrols ; Highlight or remove IRC control characters match ; Highlight pals, fools, and other keywords menu ; Display a menu in ERC buffers netsplit ; Detect netsplits noncommands ; Don’t display non-IRC commands after evaluation readonly ; Make displayed lines read-only ring ; Enable an input history services ; Identify to Nickserv (IRC Services) automatically smiley ; Convert smileys to pretty icons stamp ; Add timestamps to messages truncate ; Truncate buffers to a certain size ))) (use-package erc-hl-nicks :after erc :config (add-to-list 'erc-modules 'hl-nicks)) (use-package erc-image :after erc :config (setq erc-image-inline-rescale 300) (add-to-list 'erc-modules 'image)) ;; (load "bundle--news") (use-package elfeed :init (setq elfeed-feeds '(("https://netzpolitik.org/feed/" netz politik news) ("https://www.marcuskammer.dev/weblog/index.xml" personal) ("https://www.guyrutenberg.com/feed/" linux blog) ("https://blog.mozilla.org/en/feed/" browser web) ("https://blog.chromium.org/feeds/posts/default" browser web) ("https://hacks.mozilla.org/feed/" browser web) ("https://mailbox.org/share/feed-de-mailbox.xml" email mailbox web) ("https://feeds.feedburner.com/GoogleWebFonts" fonts blog google) ("https://twobithistory.org/feed.xml" history blog coding) ("https://blog.getbootstrap.com/feed.xml" web bootstrap blog) ("https://blog.mozilla.org/en/feed/" web firefox blog) ("https://fsfe.org/news/news.de.rss" fsfe news free-software) ("https://planet.lisp.org/rss20.xml" planet lisp) ("https://emacsconf.org/index.atom" emacs lisp conference) ("https://jameshunt.us/feeds/main" lisp blog) ("https://xenodium.com/rss.xml" emacs blog) ("https://stevelosh.com/rss.xml" lisp blog personal) ("https://planet.lisp.org/rss20.xml" lisp blogs) ("https://m-x-erlangen.gitlab.io/atom.xml" lisp meetup) ("https://takeonrules.com/index.atom" lisp emacs blog) ("https://emacsredux.com/atom.xml" emacs blog) ("https://planet.emacslife.com/atom.xml" emacs) ("https://yiming.dev/rss.xml" coding emacs lisp blog) ("https://endlessparentheses.com/atom.xml" emacs elisp blog) ("https://www.philnewton.net/blog/feed/" emacs blog) ("https://emacsredux.com/atom.xml" emacs blog) ("https://marcus3santos.github.io/index.xml" emacs blog) ("https://olddeuteronomy.github.io/index.xml" emacs blog) ("https://www.colinmclear.net/posts/index.xml" research emacs blog) ("https://howardism.org/index.xml" emacs blog) ("https://www.timmons.dev/rss.xml" lisp blog) ("https://batsov.com/atom.xml" lisp emacs blog) ("https://notes.eatonphil.com/rss.xml" lisp emacs blog) ("https://stackoverflow.com/feeds/tag?tagnames=hunchentoot&sort=newest" lisp stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=common-lisp&sort=newest" lisp stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=elisp&sort=newest" lisp emacs stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=org-mode&sort=newest" emacs orgmode stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=xmpp&sort=newest" xmpp stackoverflow) ;;("https://stackoverflow.com/feeds/tag?tagnames=postgresql&sort=newest" sql stackoverflow) ;;("https://stackoverflow.com/feeds/tag?tagnames=mariadb&sort=newest" sql stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=guile&sort=newest" guile scheme lisp stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=sbcl&sort=newest" sbcl lisp stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=sbcl+emacs&sort=newest" sbcl emacs lisp stackoverflow) ("https://stackoverflow.com/feeds/tag?tagnames=sbcl+common-lisp+linux&sort=newest" sbcl lisp linux stackoverflow) ("https://sourceforge.net/p/sbcl/activity/feed" lisp sbcl) ("https://fukamachi.hashnode.dev/rss.xml" lisp blog) ("https://sourceforge.net/projects/sbcl/rss?path=/sbcl" lisp sbcl sourceforge) ("https://threatpost.com/feed/" security) ("https://krebsonsecurity.com/feed/" security blog) ("https://www.schneier.com/feed/atom/" security blog) ("https://www.nngroup.com/feed/rss/" ux design) ("https://feedpress.me/UXmatters" ux design) ("https://uxmovement.com/feed" ux design) ("https://www.uxbeginner.com/feed/" ux design) ("https://jeffgothelf.com/feed/" lean ux design blog) ("https://leananalyticsbook.com/feed/" lean analytics blog) ("https://uxwritinghub.com/feed/" ux writing blog) ("https://www.w3.org/WAI/feed.xml" ux wai aria w3c) ("https://measuringu.com/feed/" ux blog) ("https://datascience.stackexchange.com/feeds" data stackexchange) ("https://ux.stackexchange.com/feeds" ux stackexchange) ("https://emacs.stackexchange.com/feeds" emacs stackexchange) ("https://www.mdr.de/nachrichten/podcast/general/russland-angriff-krieg-ukraine100-podcast.xml" krieg ukraine podcast) ("https://www.mdr.de/nachrichten/podcast/kekule-corona/kompass-104-podcast.xml" podcast gesundheit) ("https://www.mdr.de/nachrichten/podcast/kemfert-klima/klimawandel-aktuell-klimapolitik-100-podcast.xml" podcast klima) ("https://www.deutschlandfunk.de/umwelt-und-verbraucher-100.rss" umwelt verbraucher klima podcast) ("https://jung-naiv.podigee.io/feed/mp3" politik podcast) ("https://www.ndr.de/nachrichten/info/podcast4696.xml" podcast umwelt klima) ("https://ct-uplink.podigee.io/feed/mp3" podcast technik computer) ("https://feeds.soundcloud.com/users/soundcloud:users:261098918/sounds.rss" podcast osint) ("https://hacks.mozilla.org/feed/" blog firefox web) ("https://karthinks.com/index.xml" blog emacs) ("https://www.destatis.de/SiteGlobals/Functions/RSSFeed/DE/RSSNewsfeed/Aktuell.xml" destatis aktuelles presse) ("http://www.umweltbundesamt.de/rss/presse" uba aktuelles presse) ("https://www.test.de/rss/geldanlage-banken/" test geld finanzen) ("https://www.test.de/rss/steuern-recht/" test steuern recht) ("https://thefetishistas.com/feed/" latex fetish news) ("https://tonsky.me/atom.xml" blog computer) ("https://www.copernicus.eu/news/rss" klima) ("https://gegenblende.dgb.de/@@rss?count=10&feed=b3b8f76e-53f1-11e6-a380-525400e5a74a" arbeit gewerkschaft news) ("https://drewdevault.com/blog/index.xml" blog programming computer) ("https://inkppl.com/en/rss.xml" tattoo magazin people culture) ("https://novaramedia.com/feed/" politics capitalism climate left media) ("https://www.youtube.com/feeds/videos.xml?channel_id=UCN29LJGZ8FY30ysxdTnDsaw" youtube video) ("https://www.youtube.com/feeds/videos.xml?channel_id=UC5Ghe5TBQGYIOANuiNW4hDQ" youtube video) ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0p5jTq6Xx_DosDFxVXnWaQ" youtube video) ("https://www.youtube.com/feeds/videos.xml?channel_id=UC0p5jTq6Xx_DosDFxVXnWaQ" youtube video) ("https://www.youtube.com/feeds/videos.xml?channel_id=UCK7tptUDHh-RYDsdxO1-5QQ" youtube video news documentation science economics wsj) ("https://www.vag.de/rss/meldungen" ubahn opnv vag) ("https://feeds.feedblitz.com/sethsblog" management author blog) ("https://ourworldindata.org/atom-data-insights.xml" data world) ("https://ourworldindata.org/atom.xml" data world) ("https://www.amazon.science/index.rss" science blog amazon data) ("https://feed.theregister.com/atom?a=Liam%20Proven" register foss) ("https://benswift.me/feed.xml" blog creative technology emacs computing) ("https://media.rss.com/l0wl1f3podcast/feed.xml" cyberpunk podcast) ("https://sachachua.com/blog/feed/" emacs blog lisp programming) ("https://peertube.tv/feeds/videos.xml?videoChannelId=3483" lisp video) ("https://www.youtube.com/feeds/videos.xml?channel_id=UCYg6qFXDE5SGT_YXhuJPU0A" programming video lisp) ("https://frame.work/de/de/blog.rss" framework laptop blog company) ("https://codeberg.org/SystemCrafters/systemcrafters-site/rss/branch/master/publish.el" emacs) ("https://developer.mozilla.org/en-US/blog/rss.xml" web docs javascript) ("https://nextcloud.com/feed/" cloud news blog) ("https://codeberg.org/forgejo/forgejo/releases.rss" golang forgejo release) ("https://forgejo.org/rss.xml" forgejo) ("https://www.omnycontent.com/d/playlist/e73c998e-6e60-432f-8610-ae210140c5b1/cf0c25ad-cf01-4da5-ae1c-b0fc015f790e/53ed270b-7147-4f70-81c2-b0fc015fe4ed/podcast.rss" tech industry podcast) ("https://elmord.org/blog/?rss=entries" blog programming) ("https://www.heise.de/make/rss/hardware-hacks-atom.xml" hardware hacks news technik) )) :custom (elfeed-search-filter "@7-day-ago +unread") :config ;; Play videos from elfeed (defun elfeed-mpv (&optional use-generic-p) "Play video link with mpv." (interactive "P") (let ((entries (elfeed-search-selected))) (cl-loop for entry in entries do (elfeed-untag entry 'unread) when (elfeed-entry-link entry) do (start-process-shell-command "elfeed-video" nil (format "mpv \"%s\"" it))) (mapc #'elfeed-search-update-entry entries) (unless (use-region-p) (forward-line)))) (let ((feeds (expand-file-name "~/feeds.el"))) (when (file-exists-p feeds) (load-file feeds))) :bind (("C-x w" . elfeed) :map elfeed-search-mode-map ("v" . 'elfeed-mpv) ("U" . 'elfeed-update))) ;; (load "bundle--calendar") (setq holiday-oriental-holidays nil) (setq holiday-islamic-holidays nil) (setq holiday-bahai-holidays nil) (setq holiday-hebrew-holidays nil) (setq holiday-general-holidays '((holiday-fixed 1 1 "Neujahr") (holiday-fixed 5 1 "1. Mai") (holiday-fixed 10 3 "Tag der Deutschen Einheit"))) (setq holiday-christian-holidays '((holiday-float 12 0 -4 "1. Advent" 24) (holiday-float 12 0 -3 "2. Advent" 24) (holiday-float 12 0 -2 "3. Advent" 24) (holiday-float 12 0 -1 "4. Advent" 24) (holiday-fixed 12 25 "1. Weihnachtstag") (holiday-fixed 12 26 "2. Weihnachtstag") (holiday-fixed 1 6 "Heilige Drei Könige") (holiday-easter-etc -48 "Rosenmontag") ;; (holiday-easter-etc -3 "Gründonnerstag") (holiday-easter-etc -2 "Karfreitag") (holiday-easter-etc 0 "Ostersonntag") (holiday-easter-etc +1 "Ostermontag") (holiday-easter-etc +39 "Christi Himmelfahrt") (holiday-easter-etc +49 "Pfingstsonntag") (holiday-easter-etc +50 "Pfingstmontag") (holiday-easter-etc +60 "Fronleichnam") (holiday-fixed 8 15 "Mariae Himmelfahrt") (holiday-fixed 11 1 "Allerheiligen") ;; (holiday-float 11 3 1 "Buss- und Bettag" 16) (holiday-float 11 0 1 "Totensonntag" 20))) (use-package calendar :ensure nil :config (setq calendar-latitude 49.4) (setq calendar-longitude 11.0) (setq calendar-location-name "Nuremberg, DE") :custom (european-calendar-style t) (calendar-christian-all-holidays-flag t) (calendar-date-style (quote iso)) (calendar-view-diary-initially-flag t) (calendar-week-start-day 1) (calendar-intermonth-text '(propertize (format "%2d" (car (calendar-iso-from-absolute (calendar-absolute-from-gregorian (list month day year ))))) 'font-lock-face 'font-lock-function-name-face))) ;; (load "bundle--email") (setq mml-default-sign-method "pgpmime" mml-default-encrypt-method "pgpmime" mml-secure-openpgp-sign-with-sender t mail-user-agent 'message-user-agent compose-mail-user-agent-warnings nil) (defun mk/sign-email () ;; Sign an Email using the key of the sender. (interactive) (mml-secure-message-sign-pgpmime)) (defun mk/encrypt-email () ;; Encrypt an Email using the key of the recipient. (interactive) (mml-secure-message-encrypt-pgpmime)) (defvar mk/gps-location (eval '(let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) (abs calendar-latitude) (+ (aref calendar-latitude 0) (/ (aref calendar-latitude 1) 60.0))) (if (numberp calendar-latitude) (if (> calendar-latitude 0) "N" "S") (if (eq (aref calendar-latitude 2) 'north) "N" "S")) (if (numberp calendar-longitude) (abs calendar-longitude) (+ (aref calendar-longitude 0) (/ (aref calendar-longitude 1) 60.0))) (if (numberp calendar-longitude) (if (> calendar-longitude 0) "E" "W") (if (eq (aref calendar-longitude 2) 'east) "E" "W")))))) (defvar mk/signature-name (concat "Cheers, " user-full-name " (" calendar-location-name ", " mk/gps-location ")\n")) (defvar mk/signature-gpg "GnuPG Key: https://meta.sr.ht/~marcuskammer.pgp\nFingerprint: 86DB 0F30 F9F1 661A 54E2 1664 C374 817B E285 268F") (defun mk/signature-time () (format-time-string "Written on: %a, %d %b %Y %R %z\n")) (defun mk/signature () (concat ;;mk/signature-name ;;(mk/signature-time) mk/signature-gpg)) (use-package smtpmail :custom (smtpmail-smtp-server "smtp.mailbox.org") (smtpmail-smtp-service 465) (smtpmail-stream-type 'ssl) (smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg"))) (add-hook 'message-signature-setup-hook (lambda () (setf message-signature (mk/signature)))) ;; (add-hook 'mail-send-hook #'ispell-message) ;; (add-hook 'message-send-hook #'ispell-message) (add-hook 'message-mode-hook 'turn-on-auto-fill) (setq message-directory "~/Maildir") (setq message-auto-save-directory "~/Maildir/Drafts") (setq message-send-mail-function 'smtpmail-send-it) (use-package gnus :defer t :custom (gnus-use-full-window nil) (gnus-summary-line-format "%O%U%R%z%d %B%(%[%4L: %-22,22f%]%) %s\n") (gnus-summary-mode-line-format "Gnus: %p [%A / Sc:%4z] %Z") (gnus-summary-same-subject "") (gnus-summary-make-false-root 'adopt) (gnus-summary-make-false-root-always nil) (gnus-sum-thread-tree-indent " ") (gnus-sum-thread-tree-root "* ") (gnus-sum-thread-tree-false-root "") (gnus-sum-thread-tree-single-indent "") (gnus-sum-thread-tree-leaf-with-other "+-+> ") (gnus-sum-thread-tree-vertical "|") (gnus-sum-thread-tree-single-leaf "=--> ") (gnus-thread-sort-functions '(gnus-thread-sort-by-subject gnus-thread-sort-by-most-recent-date)) (gnus-large-newsgroup nil) (gnus-inhibit-startup-message t) (gnus-check-new-newsgroups nil) (gnus-select-method '(nnnil "")) (gnus-secondary-select-methods '((nntp "news.eternal-september.org" (nntp-open-connection-function nntp-open-ssl-stream) (nntp-port-number 563) (nntp-authinfo-file "~/.authinfo.gpg")) (nnimap "mailbox" (nnimap-address "imap.mailbox.org") (nnimap-inbox "INBOX") (nnimap-server-port 993) (nnimap-stream ssl) (nnimap-authinfo-file "~/.authinfo.gpg")) (nnimap "code@metalisp" (nnimap-address "mail.your-server.de") (nnimap-inbox "INBOX") (nnimap-server-port 993) (nnimap-stream ssl) (nnimap-authinfo-file "~/.authinfo.gpg")) (nnimap "marcus.kammer@metalisp" (nnimap-address "mail.your-server.de") (nnimap-inbox "INBOX") (nnimap-server-port 993) (nnimap-stream ssl) (nnimap-authinfo-file "~/.authinfo.gpg")))) :config (add-hook 'gnus-summary-prepare-hook 'gnus-summary-sort-by-most-recent-date)) (when (eq system-type 'gnu/linux) (let ((mu4e-dir (expand-file-name "/usr/share/emacs/site-lisp/mu4e/"))) (when (file-directory-p mu4e-dir) (add-to-list 'load-path mu4e-dir) (use-package mu4e :ensure nil :hook (mu4e-compose-pre . (lambda () (setf mu4e-compose-signature (mk/signature)))) :custom (mu4e-confirm-quit nil) (mu4e-change-filenames-when-moving t) (mu4e-drafts-folder "/Drafts") (mu4e-get-mail-command "mbsync -a") (mu4e-headers-date-format "%Y-%m-%d %H:%M") (mu4e-refile-folder "/Archive") (mu4e-sent-folder "/Sent") (mu4e-trash-folder "/Trash") (mu4e-split-view 'horizontal) (mu4e-update-interval (* 10 60)))))) ;; (load "bundle--org") (use-package org :ensure nil :defer t :hook ((org-mode . (lambda () (auto-fill-mode -1)))) :init (org-clock-persistence-insinuate) :bind (("C-c l" . org-store-link) ("C-c a" . org-agenda) ("C-c c" . org-capture) ("C-c b" . org-switchb)) :init ;; (org-babel-lob-ingest "~/.emacs.d/library-of-babel.org") (setq org-capture-templates '()) :custom (abbrev-suggest t) (org-hide-block-startup t) (org-hide-emphasis-markers nil) (org-default-notes-file "notes.org") (org-insert-mode-line-in-empty-file t) (org-adapt-indentation nil) (org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t%-6e% s") (todo . " %i %-12:c %-6e") (tags . " %i %-12:c") (search . " %i %-12:c"))) (org-agenda-dim-blocked-tasks nil) (org-agenda-inhibit-startup nil) (org-agenda-span 14) (org-agenda-start-on-weekday 1) (org-agenda-include-diary t) (org-attach-dir-relative nil) (org-attach-auto-tag nil) (org-attach-archive-delete t) (org-attach-use-inheritance nil) (org-clock-out-remove-zero-time-clocks t) (org-clock-persist t) (org-clock-rounding-minutes 5) (org-confirm-babel-evaluate nil) (org-duration-format (quote h:mm)) (org-export-dispatch-use-expert-ui nil) (org-export-default-language "en") (org-export-with-smart-quotes t) (org-export-with-emphasize t) (org-export-with-special-strings t) (org-export-with-fixed-width t) (org-export-with-timestamps nil) (org-export-preserve-breaks nil) (org-export-with-sub-superscripts nil) (org-export-with-archived-trees nil) (org-export-with-author t) (org-export-with-broken-links t) (org-export-with-clocks nil) (org-export-with-creator nil) (org-export-with-drawers nil) (org-export-with-date t) (org-export-with-entities t) (org-export-with-email nil) (org-export-with-footnotes t) (org-export-headline-levels 3) (org-export-with-inlinetasks nil) (org-export-with-section-numbers t) (org-export-with-planning nil) (org-export-with-priority nil) (org-export-with-properties nil) (org-export-with-statistics-cookies nil) (org-export-with-tags nil) (org-export-with-tasks 'done) (org-export-with-latex t) (org-export-time-stamp-file nil) (org-export-with-title t) (org-export-with-toc 2) (org-export-with-todo-keywords nil) (org-export-with-tables t) (org-export-date-timestamp-format "%a, %d %b %Y %R %z") (org-export-backends '(ascii html latex md odt texinfo)) (org-global-properties '(("EFFORT_ALL" . "0:30 1:00 2:00 3:00 5:00 8:00"))) (org-html-doctype "html5") (org-html-html5-fancy t) (org-html-head-include-default-style nil) (org-log-done (quote time)) (org-refile-targets '((nil :maxlevel . 3))) (org-startup-folded t) (org-startup-truncated nil) (org-src-fontify-natively t) (org-src-tab-acts-natively t) (org-src-window-setup 'other-window) (org-time-stamp-rounding-minutes '(0 5)) (org-todo-keywords '((sequence "TODO" "DOING(!)" "DONE(!)") (sequence "RECRUIT" "INTERVIEW" "QDA" "DOC" "REVIEW"))) (org-use-property-inheritance nil) (org-attach-store-link-p 'attached) (org-agenda-custom-commands '(("p" "Projects" ((tags "PROJECT"))))) ;; PLANTUML (org-plantuml-exec-mode 'jar) (org-plantuml-jar-path "~/plantuml.jar") (org-plantuml-args `("-headless" "-charset" "UTF-8" "-config" ,(expand-file-name "~/.emacs.d/plantuml/plantuml.config"))) :config (add-to-list 'org-file-apps '("\\.pdf\\'" . emacs)) (if (eq system-type 'windows-nt) (setq org-babel-python-command "python") (setq org-babel-python-command "python3")) (setq time-stamp-active t time-stamp-start "#\\+[dD][aA][tT][eE]: [\t]*" time-stamp-end "$" time-stamp-inserts t time-stamp-format "[%Y-%m-%d %H:%M]") (add-hook 'before-save-hook 'time-stamp nil) ;; (when (eq system-type 'windows-nt) ;; (setq org-babel-sqlite3-command "c:/msys64/ucrt64/bin/sqlite3.exe")) ;; (org-babel-library-of-babel "~/.emacs.d/library-of-babel.org") (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (lisp . t) (gnuplot . t) (python . t) (sqlite . t) (shell . t) (plantuml . t) (C . t) (js . t) (scheme . t) (dot . t))) ;; work with org-agenda dispatcher [c] "Today Clocked Tasks" to view today's clocked tasks. :custom-face (org-tag ((t (:weight normal :height 0.8)))) (org-level-1 ((t (:slant italic :inherit outline-1 :height 1.5)))) (org-level-2 ((t (:slant italic :inherit outline-2 :height 1.4)))) (org-level-3 ((t (:slant italic :inherit outline-3 :height 1.3)))) (org-level-4 ((t (:slant italic :inherit outline-4 :height 1.2)))) (org-level-5 ((t (:slant italic :inherit outline-5 :height 1.1))))) ;; Define custom LaTeX class with specific formatting (setq mk/latex-toc-command "\\tableofcontents\\clearpage\\listoffigures\\listoftables\\lstlistoflistings\\clearpage ") (with-eval-after-load 'ox-latex (setq org-latex-title-command "\\TitlePage{logo.png} ") (setq org-latex-packages-alist nil) (setq org-latex-default-packages-alist '(("AUTO" "polyglossia" t ("xelatex" "lualatex")))) (setq org-latex-pdf-process '("latexmk -lualatex -shell-escape -quiet -f %f")) (setq org-latex-compiler "lualatex") (setq org-latex-tables-booktabs t) (setq org-latex-images-centered t) (setq org-latex-prefer-user-labels t) (setq org-latex-toc-command mk/latex-toc-command) (setq org-latex-listings nil) (setq org-latex-listings-options nil) (setq org-latex-src-block-backend 'listings) (setq org-latex-inputenc-alist '((\"utf8\" . \"utf8x\"))) (setq org-latex-hyperref-template "\\hypersetup{ pdfstartview={FitV}, pdfview={FitV}, pdfpagemode={UseOutlines}, bookmarksopen=true, bookmarksnumbered=true, hidelinks, linkcolor=darkgray, filecolor=darkgray, urlcolor=darkgray, citecolor=darkgray, pdfauthor={%a}, pdftitle={%t}, pdfkeywords={%k}, pdfsubject={%d}, pdfcreator={%c}, pdflang={%L}}\n") (setq org-latex-classes nil) (add-to-list 'org-latex-classes ;; ~/.emacs.d/texmf/tex/latex/mycustomstyles/ '("koma-general" "\\documentclass[10pt]{scrartcl} \\usepackage{komageneral}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) (setq org-latex-default-class "koma-general")) (setq org-html-protect-char-alist '(("&" . "&") ("<" . "<") (">" . ">") (":lambda:" . "λ") (":python:" . "🐍") (":whale:" . "🐳") (":turtle:" . "🐢") (":dash:" . "💨") (":party:" . "🥳") (":see-no-evil:" . "🙈") (":cloud:" . "☁️") (":abacus:" . "🧮") (":desktop:" . "🖥️") (":rocket:" . "🚀") (":unicorn:" . "🦄") (":recycling:" . "♻") (":crystalball:" . "🔮") (":photography:" . "📷") (":money:" . "💵") (":-)" . "😊") (":-(" . "😞"))) (require 'request) (use-package org-roam :defer t :after org :init (org-roam-db-autosync-mode) (setq org-roam-v2-ack t) (setq org-roam-db-location "~/org-roam.db") (require 'org-roam-dailies) :bind (("C-c r l" . org-roam-buffer-toggle) ("C-c r f" . org-roam-node-find) ("C-c r g" . org-roam-graph) ("C-c r i" . org-roam-node-insert) ("C-c r c" . org-roam-capture) ("C-c r j" . org-roam-dailies-map) :map org-roam-dailies-map ("t" . org-roam-dailies-capture-today) ("y" . org-roam-dailies-capture-yesterday) ("T" . org-roam-dailies-capture-tomorrow) :map org-mode-map ("C-M-i" . completion-at-point)) :custom (org-roam-completion-everywhere nil) (org-roam-dailies-capture-templates '(("d" "default" entry "* %<%R> %?" :if-new (file+head "%<%F>.org" "#+title: %<%F>\n")))) (org-roam-capture-templates '(("d" "default" plain "%?" :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") :unnarrowed t)))) (use-package org-roam-ui :after org-roam :config (setq org-roam-ui-sync-theme t org-roam-ui-follow t org-roam-ui-update-on-save t org-roam-ui-open-on-start t)) (use-package org-tree-slide :bind ("" . org-tree-slide-mode) :custom (org-image-actual-width nil)) (use-package org-web-tools :defer t :custom (org-web-tools-pandoc-sleep-time 0.4)) ;; (use-package ob-go ;; :after org) (use-package ox-reveal :after org) ;; (use-package ox-pandoc ;; :after org ;; :custom ;; (org-pandoc-options-for-beamer-pdf '((pdf-engine . "xelatex")))) ;; (defun me/write-readme-md-on-save () ;; ;; when README.org, also write README.md on save ;; (when (string-match "README" (buffer-file-name)) ;; (make-local-variable 'after-save-hook) ;; (add-hook 'after-save-hook ;; (lambda () (let ((outfile (org-export-output-file-name ".md"))) ;; (org-export-to-file 'md outfile)))))) ;; (add-hook 'org-mode-hook 'me/write-readme-md-on-save) ;; (use-package ob-go ;; :after org ;; :config ;; (append '((go . t)) org-babel-load-languages)) (use-package ob-http :after org :config (append '((http . t)) org-babel-load-languages)) (use-package company :config (global-company-mode)) (use-package company-terraform :after (company terraform) :config (company-terraform-init)) (when (eq system-type 'windows-nt) (use-package ob-powershell :after org)) (use-package kotlin-mode :mode "\\.kt\\'") ;; (use-package ob-racket ;; :after org ;; :pin manual ;; :config ;; (append '((racket . t) (scribble . t)) org-babel-load-languages)) ;; (use-package ox-rss ;; :after org) ;; (use-package ob-restclient ;; :after org ;; :config ;; (append '((restclient . t)) org-babel-load-languages)) ;; This assumes you've installed the package via MELPA. ;; (use-package ligature ;; :config ;; ;; Enable the "www" ligature in every possible major mode ;; (ligature-set-ligatures 't '("www")) ;; ;; Enable traditional ligature support in eww-mode, if the ;; ;; `variable-pitch' face supports it ;; (ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi")) ;; ;; Enable all Cascadia Code ligatures in programming modes ;; (ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "" "---" "-<<" ;; "<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->" ;; "<--" "<-<" "<<=" "<<-" "<<<" "<+>" "" "###" "#_(" "..<" ;; "..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~=" ;; "~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|" ;; "[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:" ;; ">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:" ;; "<$" "<=" "<>" "<-" "<<" "<+" "" "++" "?:" ;; "?=" "?." "??" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)" ;; "\\\\" "://")) ;; ;; Enables ligature checks globally in all buffers. You can also do it ;; ;; per mode with `ligature-mode'. ;; (global-ligature-mode t)) (let ((bundle-dir (expand-file-name "~/.emacs.d/bundle/"))) (when (file-directory-p bundle-dir) (add-to-list 'load-path bundle-dir) (load "bundle--ct") (load "bundle--mk"))) (let ((cl-sites-dir (expand-file-name "~/cl-sites/cl-sites.el"))) (when (file-exists-p cl-sites-dir) (load cl-sites-dir)))