Added new commands!

This commit is contained in:
Carolyn Grey Bridgette Knight-Serrano 2019-12-15 01:05:50 -08:00
parent ced12164ed
commit 9637101ff7
Signed by: gigavinyl
GPG Key ID: 50858748146544CB
1 changed files with 129 additions and 32 deletions

161
init.el
View File

@ -9,6 +9,9 @@
(setq package-check-signature nil)
;;; Making the interface not terrible ;;;
(set-face-attribute 'default t :font "scientifica")
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
@ -82,6 +85,10 @@
;;; Evil!!
; evil-collection
(use-package evil-collection
:config (evil-collection-init))
; General
(use-package general
:config
@ -270,7 +277,6 @@
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'xresources t)
(set-default-font "scientifica 12")
; fix those pesky highligts
(set-face-attribute 'region nil :background "brightblack")
@ -355,6 +361,7 @@
:mode ("\\.org\\'" . org-mode)
:interpreter ("org" . org-mode)
:config
(define-key global-map "\C-cl" 'org-store-link)
(custom-set-variables)
'(org-directory "~/.org")
'(org-agenda-files (list org-directory)))
@ -433,6 +440,7 @@
; magit ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
(use-package magit)
(use-package smerge)
(use-package git-gutter
:config
@ -444,30 +452,103 @@
;;; Misc
(use-package tramp)
(use-package mentor
:config (autoload 'mentor "mentor" nil t))
;notmuch
(require 'notmuch)
(load "~/.emacs.d/lisp/org-notmuch.el")
(require 'org-notmuch)
(setq notmuch-saved-searches '((:name "unread"
:query "tag:inbox and tag:unread"
:count-query "tag:unread"
:sort-order newest-first)
(:name "inbox"
:query "tag:inbox"
:count-query "tag:inbox"
:sort-order newest-first)))
(setq mail-specify-envelope-from t)
(setq message-sendmail-envelope-from header)
(setq mail-envelope-from header)
(add-hook 'message-setup-hook 'mml-secure-sign-pgpmime)
(setq notmuch-crypto-process-mime t)
(define-key notmuch-search-mode-map "g"
'notmuch-poll-and-refresh-this-buffer)
(define-key notmuch-hello-mode-map "g"
'notmuch-poll-and-refresh-this-buffer)
(define-key notmuch-search-mode-map "d"
(lambda ()
"toggle deleted tag for thread"
(interactive)
(if (member "deleted" (notmuch-search-get-tags))
(notmuch-search-tag '("-deleted"))
(notmuch-search-tag '("+deleted" "-inbox" "-unread")))))
(define-key notmuch-search-mode-map "!"
(lambda ()
"toggle unread tag for thread"
(interactive)
(if (member "unread" (notmuch-search-get-tags))
(notmuch-search-tag '("-unread"))
(notmuch-search-tag '("+unread")))))
(define-key notmuch-show-mode-map "d"
(lambda ()
"toggle deleted tag for message"
(interactive)
(if (member "deleted" (notmuch-show-get-tags))
(notmuch-show-tag '("-deleted"))
(notmuch-show-tag '("+deleted" "-inbox" "-unread")))))
(define-key notmuch-search-mode-map "a"
(lambda ()
"toggle archive"
(interactive)
(if (member "archive" (notmuch-search-get-tags))
(notmuch-search-tag '("-archive"))
(notmuch-search-tag '("+archive" "-inbox" "-unread")))))
(define-key notmuch-show-mode-map "a"
(lambda ()
"toggle archive"
(interactive)
(if (member "archive" (notmuch-show-get-tags))
(notmuch-show-tag '("-archive"))
(notmuch-show-tag '("+archive" "-inbox" "-unread")))))
(define-key notmuch-hello-mode-map "i"
(lambda ()
(interactive)
(notmuch-hello-search "tag:inbox")))
(define-key notmuch-hello-mode-map "u"
(lambda ()
(interactive)
(notmuch-hello-search "tag:unread")))
(define-key notmuch-hello-mode-map "a"
(lambda ()
(interactive)
(notmuch-hello-search "tag:archive")))
(use-package w3m)
(use-package circe
:config
(setq auth-sources '("~/.authinfo.gpg"))
(use-package weechat)
(defun my-fetch-password (&rest params)
(require 'auth-source)
(let ((match (car (apply 'auth-source-search params))))
(if match
(let ((secret (plist-get match :secret)))
(if (functionp secret)
(funcall secret)
secret))
(error "Password not found for %S" params))))
(defun my-nickserv-password (server)
(my-fetch-password :login "forcer" :machine "irc.freenode.net"))
(setq circe-network-options
'(("Freenode"
:nick "gigavinyl"
:channels ("#emacs" "#emacs-circe" "#clojure" "#netbsd")
:nickserv-password my-nickserv-password))))
(use-package exec-path-from-shell
:config
@ -543,15 +624,17 @@
(eval-after-load 'flycheck '(flycheck-clojure-setup))
(add-hook 'after-init-hook #'global-flycheck-mode))
;; (use-package clj-refactor
;; :after clojure-mode
;; :config
;; (defun my-clojure-mode-hook ()
;; (clj-refactor-mode 1
;; (yas-minor-mode 1))
;; (cljr-add-keybindings-with-prefix "C-c C-m"))
;; (add-hook 'clojure-mode-hook #'my-clojure-mode-hook)) ; for adding require/use/import statements
;; This choice of keybinding leaves cider-macroexpand-1 unbound
(use-package clj-refactor
:after clojure-mode
:config
(defun my-clojure-mode-hook ()
(clj-refactor-mode 1
(yas-minor-mode 1))
(cljr-add-keybindings-with-prefix "C-c C-m"))
(add-hook 'clojure-mode-hook #'my-clojure-mode-hook)) ; for adding require/use/import statements
(use-package clojure-snippets
:after clojure-mode)
;;; Misc langs
(use-package yaml-mode
@ -578,8 +661,22 @@
'(custom-safe-themes
(quote
("c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "e4c8810d9ab925567a69c11d5c95d198a4e7d05871453b2c92c020712559c4c1" default)))
'(lui-buttons-list
(quote
(("\\(?:id\\|mid\\|thread\\):[0-9A-Za-z][0-9A-Za-z.@-]*" 0 notmuch-show 0)
("`\\([A-Za-z0-9+=*/-]+\\)'" 1 lui-button-elisp-symbol 1)
("\\<debbugs[#:]\\([0-9]+\\)" 0 "https://debbugs.gnu.org/cgi/bugreport.cgi?bug=%s" 1)
("\\<RFC ?\\([0-9]+\\)" 0 "http://www.ietf.org/rfc/rfc%s.txt" 1)
("\\<CVE[- ]\\([0-9]+-[0-9]+\\)" 0 "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s" 1)
("\\<SRFI[- ]?\\([0-9]+\\)" 0 "http://srfi.schemers.org/srfi-%s/srfi-%s.html" 1 1)
("\\<PEP[- ]?\\([0-9]+\\)" 0 lui-button-pep 1)
("\\<xkcd[ #]*\\([0-9]+\\)" 0 "https://xkcd.com/%s" 1)
("\\([0-9a-zA-Z_.-]+/[0-9a-zA-Z_.-]+\\)#\\([0-9]+\\)" 0 "https://github.com/%s/issues/%s" 1 2))))
'(org-journal-date-format "%A, %d %B %Y")
'(org-journal-dir "~/org/journal/")
'(package-selected-packages
(quote
(git-gutter doom-modeline clj-refactor paredit yascroll yaml-mode writeroom-mode which-key w3m use-package toml-mode smartparens smart-mode-line rainbow-delimiters racer projectile parinfer org-plus-contrib org-journal neotree multiple-cursors minimap lsp-ui lsp-haskell inflections hydra general focus flycheck-rust flycheck-pos-tip flycheck-clojure flx exec-path-from-shell evil-org evil-magit evil-escape evil-commentary emidje edn editorconfig counsel company-quickhelp company-math company-lsp company-auctex bug-hunter auto-package-update all-the-icons aggressive-indent))))
(weehcat git-gutter doom-modeline clj-refactor paredit yascroll yaml-mode writeroom-mode which-key w3m use-package toml-mode smartparens smart-mode-line rainbow-delimiters racer projectile parinfer org-plus-contrib org-journal neotree multiple-cursors minimap lsp-ui lsp-haskell inflections hydra general focus flycheck-rust flycheck-pos-tip flycheck-clojure flx exec-path-from-shell evil-org evil-magit evil-escape evil-commentary emidje edn editorconfig counsel company-quickhelp company-math company-lsp company-auctex bug-hunter auto-package-update all-the-icons aggressive-indent)))
'(send-mail-function (quote smtpmail-send-it))
'(smtpmail-smtp-server "smtp.riseup.net")
'(smtpmail-smtp-service 587))