(yas-reload-all)
)
)
+(use-package yasnippet-snippets
+ :ensure t
+ )
#+END_SRC
*** Auto-YASnippet
#+BEGIN_SRC emacs-lisp
lsp-ui-doc-delay 2)
:hook (lsp-mode . lsp-ui-mode)
:bind (:map lsp-ui-mode-map
- ("c-c i" . lsp-ui-imenu)))
+ ("C-c i" . lsp-ui-imenu)))
#+END_SRC
*** LSP Pyright -- Python language server
#+BEGIN_SRC emacs-lisp
;; load tinyprocmail
(use-package tinyprocmail
: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
#+BEGIN_SRC emacs-lisp
(use-package reftex
:hook ((LaTeX-mode latex-mode) . reftex-mode)
+ :hook (org-mode . my-org-mode-setup)
+ :after org
:config
(setq-default reftex-default-bibliography
- '("~/projects/research/references.bib"))
+ '("~/projects/research/references.bib"))
(setq-default reftex-plug-into-AUCTeX t)
+ (defun org-mode-reftex-search ()
+ (interactive)
+ (org-open-link-from-string (format "[[notes:%s]]" (first (reftex-citation t)))))
+ (defun my-org-mode-setup ()
+ (and (buffer-file-name)
+ (file-exists-p (buffer-file-name))
+ (progn
+ ;; (reftex-parse-all)
+ (reftex-set-cite-format
+ '((?b . "[[bib:%l][%l-bib]]")
+ (?n . "[[notes:%l][%l-notes]]")
+ (?c . "\\cite{%l}")
+ (?h . "*** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%l][%l xoj]] [[papers-pdf:%l][pdf]]")))
+ ))
+ (define-key org-mode-map (kbd "C-c )") 'reftex-citation)
+ (define-key org-mode-map (kbd "C-c [") 'reftex-citation)
+ (define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search)
+ (define-key org-mode-map (kbd "C-c 0") 'reftex-view-crossref)
+ )
)
#+END_SRC
** BibTex
:straight nil
:delight
:init
- (setq outline-minor-mode-prefix "C-c C-2")
+ ; (setq outline-minor-mode-prefix nil)
:config
(define-prefix-command 'cm-map nil "Outline-")
(global-set-key "\M-o" cm-map)
** Beancount
#+BEGIN_SRC emacs-lisp
(use-package beancount
- :straight nil
+ :straight (beancount
+ :type git
+ :host github
+ :repo "cnsunyour/beancount.el")
:load-path "~/lib/emacs_el/beancount-mode/"
- :mode "\\.beancount\\'"
+ :mode "\\.bean\\(?:count\\)?\\'"
)
#+END_SRC
)
#+END_SRC
+** Terraform/Tofu
+#+BEGIN_SRC emacs-lisp
+(use-package terraform-mode
+ :delight 🍜
+ :custom (terraform-indent-level 4)
+ :config
+ (defun my-terraform-mode-init ()
+ ;; if you want to use outline-minor-mode
+ (outline-minor-mode 1)
+ )
+ (add-hook 'terraform-mode-hook 'my-terraform-mode-init)
+ )
+#+END_SRC
+
* Email
** Mutt
*** Message-mode
(use-package mutt-mode
:mode "muttngrc"
:mode "muttrc"
+ :config
+ (setq mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
)
#+END_SRC
*** Set mail User agent
#+BEGIN_SRC emacs-lisp
(setq mail-user-agent (quote sendmail-user-agent))
#+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")))
-; )
-#+END_SRC
* Base emacs
** Reverting buffers
#+BEGIN_SRC emacs-lisp
; org mode agenda files
(setq org-agenda-files
(append
- (file-expand-wildcards "~/projects/org-notes/*.org")
+ (directory-files "~/projects/org-notes/" 1 "^[^.#].+\.org$")
(file-expand-wildcards "~/org-mode/from-mobile.org")
(file-expand-wildcards "~/org-notes-*/*.org")
)
;; add support for "mutt:ID" links
(org-add-link-type "mutt" 'open-mail-in-mutt)
-(defun my-org-mode-setup ()
- ; (load-library "reftex")
- (and (buffer-file-name)
- (file-exists-p (buffer-file-name))
- (progn
- ; (reftex-parse-all)
- (reftex-set-cite-format
- '((?b . "[[bib:%l][%l-bib]]")
- (?n . "[[notes:%l][%l-notes]]")
- (?c . "\\cite{%l}")
- (?h . "*** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%l][%l xoj]] [[papers-pdf:%l][pdf]]")))
- ))
- (define-key org-mode-map (kbd "C-c )") 'reftex-citation)
- (define-key org-mode-map (kbd "C-c [") 'reftex-citation)
- (define-key org-mode-map (kbd "C-c (") 'org-mode-reftex-search)
- (define-key org-mode-map (kbd "C-c 0") 'reftex-view-crossref)
- )
-(add-hook 'org-mode-hook 'my-org-mode-setup)
-
-(defun org-mode-reftex-search ()
- (interactive)
- (org-open-link-from-string (format "[[notes:%s]]" (first (reftex-citation t)))))
(defun open-research-paper (bibtexkey)
"Open a paper by bibtex key"
(setq debian-changelog-mailing-address "don@debian.org")
(setq debian-changelog-full-name "Don Armstrong"))
#+END_SRC
+** dpkg-dev-el (debian/control and others)
+#+BEGIN_SRC emacs-lisp
+(use-package dpkg-dev-el
+ :ensure dpkg-dev-el
+ :mode ("debian/control" . debian-control-mode)
+ :mode ("debian/.*README.*Debian$" . readme-debian-mode)
+ :mode ("^/usr/share/doc/.*/README.*Debian.*$" . readme-debian-mode)
+)
+#+END_SRC
* Misc (uncharacterized)
#+BEGIN_SRC emacs-lisp
(setq calendar-latitude 38.6)