#+PROPERTY: header-args:emacs-lisp :tangle don-configuration.el
#+OPTIONS: auto-id:f
+
+* General Notes
+
+** Delight
+To look up options for symbols for delight, check out https://en.wikipedia.org/wiki/Emoji#Unicode_blocks
+
* Load debugger
# if for some reason, things get pear-shaped, we want to be able to
* Paths
** Update PATH
#+BEGIN_SRC emacs-lisp
- (add-to-list 'exec-path '"/usr/local/bin")
- (add-to-list 'exec-path '"~/bin/")
+(add-to-list 'exec-path '"/usr/local/bin")
+(add-to-list 'exec-path '"~/bin/")
#+END_SRC
** Add library paths
#+BEGIN_SRC emacs-lisp
-(eval-and-compile
- (let ((default-directory "~/lib/emacs_el/"))
- (normal-top-level-add-subdirs-to-load-path))
- )
-(eval-and-compile
- (let ((default-directory "~/var/emacs/elpa"))
- (normal-top-level-add-subdirs-to-load-path))
- )
-(eval-and-compile
- (add-to-list 'load-path '"~/lib/emacs_el")
- )
-(eval-and-compile
- (setq package-user-dir "~/var/emacs/elpa")
-)
+(let ((default-directory "~/lib/emacs_el/"))
+ (normal-top-level-add-subdirs-to-load-path))
+;; (eval-and-compile
+;; (let ((default-directory "~/var/emacs/elpa"))
+;; (normal-top-level-add-subdirs-to-load-path))
+;; )
+(add-to-list 'load-path '"~/lib/emacs_el")
+(setq package-user-dir "~/var/emacs/elpa")
#+END_SRC
* Initial startup stuff
** Disable startup screen
#+BEGIN_SRC emacs-lisp
- (setq inhibit-startup-screen t)
+(setq inhibit-startup-screen t)
#+END_SRC
** Disable cluter
#+BEGIN_SRC emacs-lisp
- ; (if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
- (if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
- (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
+; (if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
+(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
+(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
#+END_SRC
** Fullscreen
#+BEGIN_SRC emacs-lisp
- (setq frame-resize-pixelwise t)
- (add-to-list 'default-frame-alist '(fullscreen . maximixed))
+(setq frame-resize-pixelwise t)
+(add-to-list 'default-frame-alist '(fullscreen . maximixed))
#+END_SRC
* Package management
+** Bootstrap straight.el
+#+BEGIN_SRC emacs-lisp
+(defvar bootstrap-version)
+(setq straight-base-dir '"~/var/emacs/")
+(let ((bootstrap-file
+ (expand-file-name "straight/repos/straight.el/bootstrap.el" straight-base-dir))
+ (bootstrap-version 6))
+ (unless (file-exists-p bootstrap-file)
+ (with-current-buffer
+ (url-retrieve-synchronously
+ "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
+ 'silent 'inhibit-cookies)
+ (goto-char (point-max))
+ (eval-print-last-sexp)))
+ (load bootstrap-file nil 'nomessage))
+#+END_SRC
** package repositories and package manager
#+BEGIN_SRC emacs-lisp
-(require 'use-package)
-(setq use-package-always-ensure t)
+(straight-use-package 'use-package)
+(setq straight-use-package-by-default t)
+(setq use-package-verbose (not (bound-and-true-p byte-compile-current-file)))
(require 'gnutls)
(add-to-list 'gnutls-trustfiles "/etc/ssl/ca-global/ca-certificates.crt")
-(use-package package
- :init
-(setq package-enable-at-startup nil)
-(setq package--init-file-ensured t)
-(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
- ("melpa" . "https://melpa.org/packages/")
- ("org" . "http://orgmode.org/elpa/")))
-(setq use-package-verbose (not (bound-and-true-p byte-compile-current-file)))
-)
#+END_SRC
** Paradox
#+BEGIN_SRC emacs-lisp
(use-package paradox
- :ensure paradox
+ ;:ensure paradox
:commands (paradox-upgrade-packages paradox-list-packages)
:config
(setq paradox-execute-asynchronously t)
** Flyspell π
#+BEGIN_SRC emacs-lisp
(use-package flyspell
- :delight flyspell-mode π
+ ; :delight flyspell-mode π
:config
+ (setq flyspell-mode-line-string " π")
(add-hook 'text-mode-hook 'turn-on-flyspell)
(add-hook 'c-mode-common-hook 'flyspell-prog-mode)
(add-hook 'cperl-mode-hook 'flyspell-prog-mode)
:init
(setq ispell-program-name "ispell")
)
-
#+END_SRC
** Flycheck
#+begin_src emacs-lisp :tangle yes
(use-package flycheck
- :ensure t
:delight π¦
:if (version<= "24.4" emacs-version)
:commands flycheck-mode
)
;; Other pkgs
(use-package flycheck-tip
- :ensure t
:commands 'flycheck-tip-cycle
:after flycheck
:bind (:map flycheck-mode-map
("C-c C-n" . flycheck-tip-cycle)))
-(use-package flycheck-package
- :ensure t)
+(use-package flycheck-package)
(use-package flycheck-checkpatch
- :ensure t
:config (flycheck-checkpatch-setup)
:config (setq flycheck-checkers (delete 'checkpatch
flycheck-checkers))
; (setq-local completion-at-point-functions (list (cape-capf-buster #'lsp-completion-at-point)))
:hook (python-mode . lsp-deferred)
+ (cperl-mode . lsp-deferred)
(lsp-completion-mode . my/lsp-mode-setup-completion)
:custom
(lsp-completion-provider :none) ;; we use Corfu!
+ :config
+ (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]venv\\'")
)
-;; Provides visual help in the buffer
-;; For example definitions on hover.
-;; The `imenu` lets me browse definitions quickly.
+#+END_SRC
+** LSP mode
+#+BEGIN_SRC emacs-lisp
+;; provides visual help in the buffer
+;; for example definitions on hover.
+;; the `imenu` lets me browse definitions quickly.
(use-package lsp-ui
:defer t
+ :after lsp-mode
:config
- (setq lsp-ui-sideline-enable nil
+ (setq lsp-ui-sideline-enable t
lsp-ui-doc-delay 2)
:hook (lsp-mode . lsp-ui-mode)
:bind (:map lsp-ui-mode-map
- ("C-c i" . lsp-ui-imenu)))
-;; Language server for Python
-;; Read the docs for the different variables set in the config.
+ ("c-c i" . lsp-ui-imenu)))
+#+END_SRC
+*** LSP Pyright -- Python language server
+#+BEGIN_SRC emacs-lisp
+;; language server for python
+;; read the docs for the different variables set in the config.
(use-package lsp-pyright
:defer t
:config
** Corfu
#+BEGIN_SRC emacs-lisp
(use-package corfu
- :ensure t
- :demand t
;; Optional customizations
:custom
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
(corfu-auto t) ;; Enable auto completion
(corfu-separator ?\s) ;; Orderless field separator
- (corfu-quit-at-boundary nil) ;; Never quit at completion boundary
- (corfu-quit-no-match nil) ;; Never quit, even if there is no match
+ (corfu-quit-at-boundary t)
+ (corfu-quit-no-match 'separator)
(corfu-preview-current nil) ;; Disable current candidate preview
(corfu-preselect 'prompt) ;; Preselect the prompt
(corfu-on-exact-match nil) ;; Configure handling of exact matches
(corfu-scroll-margin 5) ;; Use scroll margin
+ :bind (
+ :map corfu-map
+ ("M-m" , corfu-move-to-minibuffer)
+ )
+ :init
+ (global-corfu-mode)
+ (setq completion-cycle-threshold 3)
+ (setq tab-always-indent 'complete)
:config
- (global-corfu-mode))
+ (defun corfu-move-to-minibuffer ()
+ (interactive)
+ (when completion-in-region--data
+ (let ((completion-extra-properties corfu--extra)
+ completion-cycle-threshold completion-cycling)
+ (apply #'consult-completion-in-region completion-in-region--data))))
+ (add-to-list 'corfu-continue-commands #'corfu-move-to-minibuffer)
+ )
#+END_SRC
** Dabbrv
#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp
;; load tinyprocmail
(use-package tinyprocmail
- :defer t
- :load-path "~/lib/emacs_el/tiny-tools/lisp/tiny"
+ :straight (tinytools :type git :type git :host github :repo "jaalto/project--emacs-tiny-tools")
+ ; :load-path "~/lib/emacs_el/tiny-tools/lisp/tiny"
:mode (".procmailrc" . turn-on-tinyprocmail-mode)
)
#+END_SRC
)
(use-package magit-annex
:defer t
- :load-path "~/lib/emacs_el/magit-annex/"
+ :after magit
)
(use-package magit-vcsh
:defer t
+ :after magit
)
#+END_SRC
*** Forge (github/gitlab)
#+BEGIN_SRC emacs-lisp
(use-package forge
+ :defer t
:after magit
)
#+END_SRC
** Perl
#+BEGIN_SRC emacs-lisp
(use-package cperl-mode
- :ensure t
+ :mode ("\\.pl'" . cperl-mode)
+ ("\\.perl5\\'" . cperl-mode)
+ ("\\.perl\\'" . cperl-mode)
+ ("\\.miniperl\\'" . cperl-mode)
+ ("\\.\\([Pp][Llm]\\|al\\)\\'" . cperl-mode)
+ ;; use c-mode for perl .xs files
+ ("\\.xs\\'" . c-mode)
:config
- (progn
- ;; Use c-mode for perl .xs files
- (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
- (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
- (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
- (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
- (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
- (setq cperl-hairy t
+ (setq cperl-hairy t
cperl-indent-level 4
cperl-auto-newline nil
cperl-auto-newline-after-colon nil
cperl-tab-always-indent t)
(setq cperl-lazy-help-time nil)
;;(add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
-))
+)
#+END_SRC
** Markdown mode
#+BEGIN_SRC emacs-lisp
(use-package markdown-mode
- :ensure t
:defer t
:mode (("\\.md\\'" . markdown-mode)
("\\.mdwn\\'" . markdown-mode)
#+BEGIN_SRC emacs-lisp
; load sql-indent when sql is loaded
(use-package sql-indent
- :defer t
+ :after sql
:hook sql-mode
)
(use-package sql
- :defer t
+ :commands (sql-mode)
:mode (("\\.sql\\'" . sql-mode))
)
#+END_SRC
** Ediff
#+BEGIN_SRC emacs-lisp
(use-package ediff
- :defer t
:commands ediff ediff3
:config
;; ediff configuration
(use-package vcl-mode
:mode "\\.vcl\\'"
)
-
#+END_SRC
** Vertico
#+BEGIN_SRC emacs-lisp
:custom
(vertico-grid-separator " ")
(vertico-grid-lookahead 50)
+)
+(use-package vertico-multiform
+ :straight nil
+ :load-path "~/var/emacs/straight/build/vertico/extensions/"
+ :after vertico
:config
- (require 'vertico-multiform)
(setq vertico-multiform-categories
'((file reverse)
(consult-grep buffer)
)
(vertico-multiform-mode)
)
+
(use-package vertico-grid
- :ensure nil
+ :straight nil
:after vertico
)
(use-package vertico-reverse
- :ensure nil
+ :straight nil
:after vertico
)
(use-package vertico-indexed
- :ensure nil
+ :straight nil
:after vertico
)
(use-package vertico-buffer
- :ensure nil
+ :straight nil
:after vertico
)
+
;; Persist history over Emacs restarts. Vertico sorts by history position.
(use-package savehist
:demand t
** Orderless: advanced completion style
#+begin_src emacs-lisp
(use-package orderless
- :demand t
- :config
+ :init
;; Configure a custom style dispatcher (see the Consult wiki)
;; (setq orderless-style-dispatchers '(+orderless-dispatch)
;; orderless-component-separator #'orderless-escapable-split-on-space)
:hook
(embark-collect-mode . consult-preview-at-point-mode))
#+end_src
+** which-key (show possible completions of a key combination)
+#+BEGIN_SRC emacs-lisp
+(use-package which-key
+ :demand t
+ )
+#+END_SRC
** Consult
#+begin_src emacs-lisp
(use-package consult
;; relevant when you use the default completion UI.
:hook (completion-list-mode . consult-preview-at-point-mode)
+ :commands (consult-xref)
+
;; The :init configuration is always executed (Not lazy)
:init
;; Configure other variables and modes in the :config section,
;; after lazily loading the package.
:config
-
;; Optionally configure preview. The default value
;; is 'any, such that any key triggers the preview.
;; (setq consult-preview-key 'any)
** Zap to char
#+BEGIN_SRC emacs-lisp
(use-package avy-zap
- :ensure t
:bind ("M-z" . avy-zap-up-to-char-dwim))
#+END_SRC
** Hydra
#+BEGIN_SRC emacs-lisp
- (use-package hydra
- :bind (("C-c 2" . my/hydra-orgmodes/body)
- ("C-c @" . my/hydra-orgmodes/body)
- ("C-c #" . my/hydra-outline/body)
- ("C-c 3" . my/hydra-outline/body)
- )
- :config
- (defhydra my/hydra-orgmodes (:color blue :hint nil)
- "
- _n_: notes _c_: chaim _w_: wildman _o_: ool
- _u_: uddin _s_: steve _r_: refile _f_: fh
- _p_: read papers _R_: paper notes
- _h_: hpcbio
- _q_: quit
- _z_: quit
+(use-package hydra
+ :bind (("C-c 2" . my/hydra-orgmodes/body)
+ ("C-c @" . my/hydra-orgmodes/body)
+ ("C-c #" . my/hydra-outline/body)
+ ("C-c 3" . my/hydra-outline/body)
+ )
+ :config
+ (defhydra my/hydra-orgmodes (:color blue :hint nil)
"
- ("n" (find-file "~/projects/org-notes/notes.org"))
- ("c" (find-file "~/projects/org-notes/chaim.org"))
- ("w" (find-file "~/projects/org-notes/wildman.org"))
- ("u" (find-file "~/projects/org-notes/uddin.org"))
- ("o" (find-file "~/projects/org-notes/ool.org"))
- ("f" (find-file "~/projects/org-notes/fh.org"))
- ("s" (find-file "~/projects/org-notes/sndservers.org"))
- ("r" (find-file my/org-refile-file))
- ("p" (find-file "~/projects/research/papers_to_read.org"))
- ("R" (find-file "~/projects/research/paper_notes.org"))
- ("h" (find-file "~/projects/org-notes/hpcbio.org"))
- ("q" nil "quit")
- ("z" nil "quit")
- )
-
- ;; from https://github.com/abo-abo/hydra/wiki/Emacs
- (defhydra my/hydra-outline (:color pink :hint nil)
- "
- ^Hide^ ^Show^ ^Move
- ^^^^^^------------------------------------------------------
- _q_: sublevels _a_: all _u_: up
- _t_: body _e_: entry _n_: next visible
- _o_: other _i_: children _p_: previous visible
- _c_: entry _k_: branches _f_: forward same level
- _l_: leaves _s_: subtree _b_: backward same level
- _d_: subtree
+_n_: notes _c_: chaim _w_: wildman _o_: ool
+_u_: uddin _s_: steve _r_: refile _f_: fh
+_p_: read papers _R_: paper notes
+_h_: hpcbio
+_q_: quit
+_z_: quit
+"
+ ("n" (find-file "~/projects/org-notes/notes.org"))
+ ("c" (find-file "~/projects/org-notes/chaim.org"))
+ ("w" (find-file "~/projects/org-notes/wildman.org"))
+ ("u" (find-file "~/projects/org-notes/uddin.org"))
+ ("o" (find-file "~/projects/org-notes/ool.org"))
+ ("f" (find-file "~/projects/org-notes/fh.org"))
+ ("s" (find-file "~/projects/org-notes/sndservers.org"))
+ ("r" (find-file my/org-refile-file))
+ ("p" (find-file "~/projects/research/papers_to_read.org"))
+ ("R" (find-file "~/projects/research/paper_notes.org"))
+ ("h" (find-file "~/projects/org-notes/hpcbio.org"))
+ ("q" nil "quit")
+ ("z" nil "quit")
+ )
+ ;; from https://github.com/abo-abo/hydra/wiki/Emacs
+ (defhydra my/hydra-outline (:color pink :hint nil)
"
- ;; Hide
- ("q" outline-hide-sublevels) ; Hide everything but the top-level headings
- ("t" outline-hide-body) ; Hide everything but headings (all body lines)
- ("o" outline-hide-other) ; Hide other branches
- ("c" outline-hide-entry) ; Hide this entry's body
- ("l" outline-hide-leaves) ; Hide body lines in this entry and sub-entries
- ("d" outline-hide-subtree) ; Hide everything in this entry and sub-entries
- ;; Show
- ("a" outline-show-all) ; Show (expand) everything
- ("e" outline-show-entry) ; Show this heading's body
- ("i" outline-show-children) ; Show this heading's immediate child sub-headings
- ("k" outline-show-branches) ; Show all sub-headings under this heading
- ("s" outline-show-subtree) ; Show (expand) everything in this heading & below
- ;; Move
- ("u" outline-up-heading) ; Up
- ("n" outline-next-visible-heading) ; Next
- ("p" outline-previous-visible-heading) ; Previous
- ("f" outline-forward-same-level) ; Forward - same level
- ("b" outline-backward-same-level) ; Backward - same level
- ("z" nil "leave"))
- )
+^Hide^ ^Show^ ^Move
+^^^^^^------------------------------------------------------
+_q_: sublevels _a_: all _u_: up
+_t_: body _e_: entry _n_: next visible
+_o_: other _i_: children _p_: previous visible
+_c_: entry _k_: branches _f_: forward same level
+_l_: leaves _s_: subtree _b_: backward same level
+_d_: subtree
+
+"
+ ;; Hide
+ ("q" outline-hide-sublevels) ; Hide everything but the top-level headings
+ ("t" outline-hide-body) ; Hide everything but headings (all body lines)
+ ("o" outline-hide-other) ; Hide other branches
+ ("c" outline-hide-entry) ; Hide this entry's body
+ ("l" outline-hide-leaves) ; Hide body lines in this entry and sub-entries
+ ("d" outline-hide-subtree) ; Hide everything in this entry and sub-entries
+ ;; Show
+ ("a" outline-show-all) ; Show (expand) everything
+ ("e" outline-show-entry) ; Show this heading's body
+ ("i" outline-show-children) ; Show this heading's immediate child sub-headings
+ ("k" outline-show-branches) ; Show all sub-headings under this heading
+ ("s" outline-show-subtree) ; Show (expand) everything in this heading & below
+ ;; Move
+ ("u" outline-up-heading) ; Up
+ ("n" outline-next-visible-heading) ; Next
+ ("p" outline-previous-visible-heading) ; Previous
+ ("f" outline-forward-same-level) ; Forward - same level
+ ("b" outline-backward-same-level) ; Backward - same level
+ ("z" nil "leave"))
+)
#+END_SRC
** Tramp
#+BEGIN_SRC emacs-lisp
(use-package tramp
+ :demand t
+ ; use the built in tramp
+ :straight nil
:config
+ (setq tramp-use-ssh-controlmaster-options nil)
(add-to-list 'tramp-methods '("vcsh"
(tramp-login-program "vcsh")
(tramp-login-args
** LaTeX
#+BEGIN_SRC emacs-lisp
(use-package tex
- :defer t
- :ensure auctex
+ :straight auctex
+ :mode ("\\.tex\\'" . LaTeX-mode)
+ :mode ("\\.bib\\'" . bibtex-mode)
:config
; (add-to-list 'TeX-style-path '"/home/don/lib/emacs_el/auctex/style")
;; REFTEX (much enhanced management of cross-ref, labels, etc)
"latex"
'(add-to-list 'LaTeX-fill-excluded-macros
'("Sexpr")))
-
- (use-package font-latex
- :config
- (setq font-latex-match-reference-keywords
- '(
- ("fref" "{")
- ("Fref" "{")
- ("citep" "{")
- ("citet" "{")
- ("acs" "{")
- ("acsp" "{")
- ("ac" "{")
- ("acp" "{")
- ("acl" "{")
- ("aclp" "{")
- ("acsu" "{")
- ("aclu" "{")
- ("acused" "{")
- ("DLA" "{")
- ("RZ" "{")
- ("OM" "{")
- ("DL" "{")
- ("fixme" "{"))
- )
- )
+
+ (setq font-latex-match-reference-keywords
+ '(
+ ("fref" "{")
+ ("Fref" "{")
+ ("citep" "{")
+ ("citet" "{")
+ ("acs" "{")
+ ("acsp" "{")
+ ("ac" "{")
+ ("acp" "{")
+ ("acl" "{")
+ ("aclp" "{")
+ ("acsu" "{")
+ ("aclu" "{")
+ ("acused" "{")
+ ("DLA" "{")
+ ("RZ" "{")
+ ("OM" "{")
+ ("DL" "{")
+ ("fixme" "{"))
+ )
(setq font-latex-fontify-script nil)
(setq font-latex-fontify-sectioning (quote color))
(setq font-latex-script-display (quote (nil)))
#+BEGIN_SRC emacs-lisp
(use-package rainbow-mode
+ :delight π
;; add ess to the x major mode
:config (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[S])
(add-to-list 'rainbow-x-colors-major-mode-list 'ESS[R])
:mode ("\\.Rmd" . poly-markdown+r-mode)
)
(use-package polymode
+ :defer t
)
#+END_SRC
** Outlining
-*** Outline magic
+*** outline minor mode
#+BEGIN_SRC emacs-lisp
-; this package doesn't really do exactly what we want it to do
-; (use-package outline-magic)
+(use-package outline
+ :straight nil
+ :delight
+ :init
+ (setq outline-minor-mode-prefix "C-c C-2")
+)
#+END_SRC
-*** Outline mode
+*** outshine (outlining) integration
#+BEGIN_SRC emacs-lisp
-;; change the outline mode prefix from C-c @ to C-c C-2
-(setq outline-minor-mode-prefix "C-c C-2")
-;;(add-hook 'outline-minor-mode-hook
-;; (lambda () (local-set-key (kbd "C-c C-2")
-;; outline-mode-prefix-map)))
-
+(use-package outshine
+ :after outline
+ :hook (outline-minor-mode . outshine-mode)
+)
#+END_SRC
** Writeroom Mode
#+BEGIN_SRC emacs-lisp
** Web Mode
#+BEGIN_SRC emacs-lisp
(use-package web-mode
- :load-path "/home/don/projects/web-mode/"
:mode ("\\.\\(tx|tmpl\\)\\'" . web-mode)
:config
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
** Spamassassin Mode
#+BEGIN_SRC emacs-lisp
(use-package spamassassin-mode
+ :straight nil
+ :load-path "~/lib/emacs_el"
:commands spamassassin-mode
)
#+END_SRC
** CSS mode
#+BEGIN_SRC emacs-lisp
(use-package css
+ :straight css-mode
:mode "\\.css'"
:config
;; fix up css mode to not be silly
** Abbrev Mode
#+BEGIN_SRC emacs-lisp
(use-package abbrev
+ :straight nil
:delight abbrev-mode
:config
;; load abbreviations from
(quietly-read-abbrev-file))
;; for now, use abbrev mode everywhere
+ :init
(setq default-abbrev-mode t))
#+END_SRC
** Debugging (realgud)
#+BEGIN_SRC emacs-lisp
(use-package realgud
+ :commands (realgud:pdb realgud:gdb)
)
#+END_SRC
** Python Programming
#+BEGIN_SRC emacs-lisp
(use-package python-mode
- :delight π
+ :delight Py π
:hook
- (python-mode . pyenv-mode)
+ (python-mode . pyvenv-mode)
(python-mode . flycheck-mode)
(python-mode . blacken-mode)
(python-mode . yas-minor-mode)
(python-mode . anaconda-mode)
)
-(use-package pyenv-mode
+(use-package pyvenv
+ :delight
:after python-mode
)
(use-package blacken
- :delight β
+ :delight
:after python-mode
+ :commands (blacken-buffer)
:config
(setq-default blacken-fast-unsafe t)
)
#+END_SRC
*** Black
#+begin_src emacs-lisp :tangle yes
- (use-package python-black
- :demand t
- :after python)
+(use-package python-black
+ :delight
+ :commands (python-black-buffer python-black-statement)
+ :after python)
#+end_src
*** Sphinx Documentation
#+begin_src emacs-lisp :tangle yes
(use-package numpydoc
- :ensure t
:after python
:bind (:map python-mode-map
("C-c C-n" . numpydoc-generate)))
(use-package sphinx-doc
- :ensure t
+ :delight π
:config
- (sphinx-doc-mode t)
(setq sphinx-doc-include-types t)
- :after python)
+ :after python
+ :hook (python-mode . sphinx-doc-mode)
+ )
(use-package python-docstring
- :ensure t
+ :delight
:after python
- :hook
- (python-mode . python-docstring-mode)
+ :hook (python-mode . python-docstring-mode)
)
#+end_src
+*** Anaconda Mode (Documentation lookup and completion)
+#+BEGIN_SRC emacs-lisp
+(use-package anaconda-mode
+ :delight
+ :after python
+)
+#+END_SRC
** Go language
#+BEGIN_SRC emacs-lisp
(use-package go-mode
** Beancount
#+BEGIN_SRC emacs-lisp
(use-package beancount
+ :straight nil
:load-path "~/lib/emacs_el/beancount-mode/"
- :ensure f
:mode "\\.beancount\\'"
)
#+END_SRC
+** Apache
+#+BEGIN_SRC emacs-lisp
+(use-package apache-mode
+ :delight πͺΆ
+ :mode "apache\\.conf\\'"
+ )
+#+END_SRC
+** ELDoc
+#+BEGIN_SRC emacs-lisp
+(use-package eldoc
+ :delight
+ :commands eldoc-mode
+ :straight nil
+ )
+#+END_SRC
+
* Email
** Mutt
*** Message-mode
#+BEGIN_SRC emacs-lisp
(use-package message
+ :straight nil
:delight (message "β")
:delight (message-mode "β")
:mode ("muttng-[a-z0-9]+-[0-9]+-" . message-mode)
:hook 'my/message-mode-settings
:hook 'turn-on-flyspell
:bind (:map message-mode-map
- ("C-c C-a" . my/post-attach-file))
+ ("C-c C-a" . my/post-attach-file)
+ ("C-x p" . my/message-kill-buffer)
+ )
:config
(defun my/message-mode-settings ()
(font-lock-add-keywords nil
("^[ \t]*>[ \t]*>.*$"
(0 'message-double-quoted-text-face))))
)
-
+ (defun my/message-kill-buffer ()
+ (interactive)
+ (kill-buffer nil)
+ )
(defun my/post-attach-file ()
"Prompt for an attachment."
(interactive)
#+END_SRC
*** Muttrc mode
#+BEGIN_SRC emacs-lisp
-(use-package muttrc-mode
+(use-package mutt-mode
:mode "muttngrc"
:mode "muttrc"
)
#+END_SRC
*** Mail aliases
#+BEGIN_SRC emacs-lisp
-(use-package
- :straight t
- :hook message
- :config
- (setq mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
-)
+; (use-package
+; :straight t
+; :hook message
+; :config
+; (setq mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
+; )
#+END_SRC
* Base emacs
** Reverting buffers
(use-package org
:delight (org-mode "ΓΈ")
:mode ("\\.\\(org\\|org_archive\\|txt\\)\\'" . org-mode)
- :bind (("C-c l" . org-store-link)
+ :bind (("C-c l l" . org-store-link)
("C-c a" . org-agenda)
("C-c b" . org-iswitchb))
#+END_SRC
#+END_SRC
** LaTeX configuration
#+BEGIN_SRC emacs-lisp
-(use-package org-plus-contrib
+(use-package org-contrib
:no-require t
:after org
:config
#+END_SRC
** appt integration
#+BEGIN_SRC emacs-lisp
- (use-package appt
- :ensure f
- :config
- ;; Show notification 10 minutes before event
- (setq appt-message-warning-time 10)
- ;; Disable multiple reminders
- (setq appt-display-interval appt-message-warning-time)
- (setq appt-display-mode-line nil)
-
- ;; add automatic reminders for appointments
- (defun my/org-agenda-to-appt ()
- (interactive)
- (setq appt-time-msg-list nil)
- (org-agenda-to-appt))
- ;; add reminders when starting emacs
+(use-package appt
+ :straight nil
+ :config
+ ;; Show notification 10 minutes before event
+ (setq appt-message-warning-time 10)
+ ;; Disable multiple reminders
+ (setq appt-display-interval appt-message-warning-time)
+ (setq appt-display-mode-line nil)
+
+ ;; add automatic reminders for appointments
+ (defun my/org-agenda-to-appt ()
+ (interactive)
+ (setq appt-time-msg-list nil)
+ (org-agenda-to-appt))
+ ;; add reminders when starting emacs
+ (my/org-agenda-to-appt)
+ ;; when rebuilding the agenda
+ (defadvice org-agenda-redo (after org-agenda-redo-add-appts)
+ "Pressing `r' on the agenda will also add appointments."
(my/org-agenda-to-appt)
- ;; when rebuilding the agenda
- (defadvice org-agenda-redo (after org-agenda-redo-add-appts)
- "Pressing `r' on the agenda will also add appointments."
- (my/org-agenda-to-appt)
- )
- ;; when saving all org buffers
- (defadvice org-save-all-org-buffers (after org-save-all-org-buffers-add-appts)
- "Re-add appts after saving all org buffers"
- (my/org-agenda-to-appt))
- ;; Display appointments as a window manager notification
- (setq appt-disp-window-function 'my/appt-display)
- (setq appt-delete-window-function (lambda () t))
-
- (setq my/appt-notification-app (concat (getenv "HOME") "/bin/appt_notification"))
-
- (defun my/appt-display (min-to-app new-time msg)
- (if (atom min-to-app)
- (start-process "my/appt-notification-app" nil my/appt-notification-app min-to-app msg)
- (dolist (i (number-sequence 0 (1- (length min-to-app))))
- (start-process "my/appt-notification-app" nil my/appt-notification-app
- (nth i min-to-app) (nth i msg))))
- )
)
+ ;; when saving all org buffers
+ (defadvice org-save-all-org-buffers (after org-save-all-org-buffers-add-appts)
+ "Re-add appts after saving all org buffers"
+ (my/org-agenda-to-appt))
+ ;; Display appointments as a window manager notification
+ (setq appt-disp-window-function 'my/appt-display)
+ (setq appt-delete-window-function (lambda () t))
+
+ (setq my/appt-notification-app (concat (getenv "HOME") "/bin/appt_notification"))
+
+ (defun my/appt-display (min-to-app new-time msg)
+ (if (atom min-to-app)
+ (start-process "my/appt-notification-app" nil my/appt-notification-app min-to-app msg)
+ (dolist (i (number-sequence 0 (1- (length min-to-app))))
+ (start-process "my/appt-notification-app" nil my/appt-notification-app
+ (nth i min-to-app) (nth i msg))))
+ )
+ )
-#+END_SRC
-** outshine (outlining) integration
-#+BEGIN_SRC emacs-lisp
-(use-package outshine
- :ensure t
- :hook (outline-minor-mode . outshine-hook-function)
-)
#+END_SRC
** End use-package
#+BEGIN_SRC emacs-lisp
#+END_SRC
** Goto line
#+BEGIN_SRC emacs-lisp
- (global-unset-key "\M-g")
- (global-set-key (kbd "M-g l") 'goto-line)
+ ; (global-unset-key "\M-g")
+ ; (global-set-key (kbd "M-g l") 'goto-line)
#+END_SRC
* Debian
** debian-changelog
#+BEGIN_SRC emacs-lisp
- (use-package debian-changelog-mode
- :mode "debian/changelog"
- :config
- (setq debian-changelog-mailing-address "don@debian.org")
- (setq debian-changelog-full-name "Don Armstrong"))
+(use-package debian-changelog-mode
+ :mode "debian/changelog"
+ :ensure debian-el
+ :config
+ (setq debian-changelog-mailing-address "don@debian.org")
+ (setq debian-changelog-full-name "Don Armstrong"))
#+END_SRC
* Misc (uncharacterized)
#+BEGIN_SRC emacs-lisp
))
; (setq mouse-drag-copy-region t)
-;; tramp configuration
-(setq tramp-use-ssh-controlmaster-options nil)
-
(setq-default c-indent-level 4)
(setq-default c-brace-imaginary-offset 0)
(setq-default c-brace-offset -4)
If the envvar EMACS_SERVER_NAME is set, consider this a separate
emacs, and use a different desktop file to restore history
#+BEGIN_SRC emacs-lisp
- (use-package desktop
- :demand
- :config
- (setq desktop-base-file-name
- (convert-standard-filename
- (concat ".emacs"
- (or (getenv "EMACS_SERVER_NAME")
- "")
- ".desktop")
- ))
- (setq desktop-base-lock-name
- (convert-standard-filename
- (concat desktop-base-file-name
- ".lock")))
- (setq desktop-auto-save-timeout 60)
- (setq desktop-restore-eager 5)
- (setq desktop-lazy-verbose nil)
- (desktop-save-mode 1)
- ; (desktop-read)
- )
+(use-package desktop
+ :demand
+ :config
+ (setq desktop-base-file-name
+ (convert-standard-filename
+ (concat ".emacs"
+ (or (getenv "EMACS_SERVER_NAME")
+ "")
+ ".desktop")
+ ))
+ (setq desktop-base-lock-name
+ (convert-standard-filename
+ (concat desktop-base-file-name
+ ".lock")))
+ (setq desktop-auto-save-timeout 60)
+ (setq desktop-restore-eager 5)
+ (setq desktop-lazy-verbose nil)
+ (desktop-save-mode 1)
+ ; (desktop-read)
+)
#+END_SRC
** Misc (Uncharacterized)
#+BEGIN_SRC emacs-lisp