Browse Source

Swapped Ivy/Counsel for Helm and added org-jira. In addition restructured README.org

master
Josh Wolfe 3 years ago
parent
commit
0b25ce0ec7
1 changed files with 299 additions and 257 deletions
  1. 299
    257
      emacs/.emacs.d/README.org

+ 299
- 257
emacs/.emacs.d/README.org View File

@@ -40,22 +40,22 @@ Runs a different function on startup depending on display mode.
#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(defun wolfe/term-setup ()
(load-theme 'base16-default-dark t)
(setq nlinum-format "%d ")
;;(global-hl-line-mode 1)
;;(add-to-list 'default-frame-alist '(background-color . "color-16"))
(custom-set-faces
'(linum ((t (:background "color-18"))))
'(region ((t :background "color-19")))
'(mode-line ((t (:background "color-19" :foreground "brightblue" :box nil))))
'(mode-line-inactive
((t (:background "color-18" :foreground "color-244")))))
(defun wolfe/term-setup ()
(load-theme 'base16-default-dark t)
(setq nlinum-format "%d ")
;;(global-hl-line-mode 1)
;;(add-to-list 'default-frame-alist '(background-color . "color-16"))
(custom-set-faces
'(linum ((t (:background "color-18"))))
'(region ((t :background "color-19")))
'(mode-line ((t (:background "color-19" :foreground "brightblue" :box nil))))
'(mode-line-inactive
((t (:background "color-18" :foreground "color-244")))))

;;'(iedit-occurrence ((t (:background "color-93"))))
;;'(column-marker-1 ((t (:background "color-88"))))
;;'(hl-line ((t (:weight bold))))))
)
;;'(iedit-occurrence ((t (:background "color-93"))))
;;'(column-marker-1 ((t (:background "color-88"))))
;;'(hl-line ((t (:weight bold))))))
)
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle yes
@@ -72,14 +72,19 @@ Runs a different function on startup depending on display mode.
evil-visual-state-cursor `(,(plist-get my/base16-colors :base09) box))
(set-face-attribute 'fringe nil :background nil))

(load-file "~/.emacs.d/lisp/init-powerline-doom-one.el")
(setq powerline-height 24)
(use-package smart-mode-line
:init
(setq sml/no-confirm-load-theme t)
(setq sml/theme 'respectful)
(sml/setup))

(custom-set-faces
'(org-done ((t (:box (:line-width 1) :weight bold))))
'(org-level-1 ((t (:inherit outline-1 :height 1.3))))
'(org-todo ((t (:box (:line-width 1) :weight bold))))))
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle yes
;; Not a function but it needs to be after the 2 setup functions
(if (display-graphic-p)
(wolfe/gui-setup)
@@ -363,6 +368,93 @@ Better narrowing.
(org-try-structure-completion))
#+END_SRC

* Org Mode

#+BEGIN_SRC emacs-lisp :tangle yes
(require 'ox-latex)
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))

(require 'org-agenda)
(use-package ox-reveal
:ensure nil
:config
(use-package htmlize
:ensure nil))

(use-package calfw
:config
(use-package calfw-org)
(custom-set-faces
'(cfw:face-title ((t (:foreground "#f0dfaf" :weight bold :height 2.0 :inherit variable-pitch))))
'(cfw:face-header ((t (:foreground "#d0bf8f" :weight bold))))
'(cfw:face-sunday ((t :foreground "#cc9393" :background "grey10" :weight bold)))
'(cfw:face-saturday ((t :foreground "#8cd0d3" :background "grey10" :weight bold)))
'(cfw:face-holiday ((t :background "grey10" :foreground "#8c5353" :weight bold)))
'(cfw:face-grid ((t :foreground "DarkGrey")))
'(cfw:face-default-content ((t :foreground "#bfebbf")))
'(cfw:face-periods ((t :foreground "cyan")))
'(cfw:face-day-title ((t :background "grey10")))
'(cfw:face-default-day ((t :weight bold :inherit cfw:face-day-title)))
'(cfw:face-annotation ((t :foreground "RosyBrown" :inherit cfw:face-day-title)))
'(cfw:face-disable ((t :foreground "DarkGray" :inherit cfw:face-day-title)))
'(cfw:face-today-title ((t :background "#7f9f7f" :weight bold)))
'(cfw:face-today ((t :background: "grey10" :weight bold)))
'(cfw:face-select ((t :background "#2f2f2f")))
'(cfw:face-toolbar ((t :foreground "Steelblue4" :background "Steelblue4")))
'(cfw:face-toolbar-button-off ((t :foreground "Gray10" :weight bold)))
'(cfw:face-toolbar-button-on ((t :foreground "Gray50" :weight bold)))))


;; Formats the agenda into nice columns
(setq org-agenda-prefix-format
'((agenda . " %i %-12t% s %-12(car (last (org-get-outline-path)))")
(timeline . " % s")
(todo . " %i %-12:c")
(tags . " %i %-12:c")
(search . " %i %-12:c")))

;; Sets location of org files
(setq org-agenda-files '("~/Dropbox/org/everything.org"))
(setq browse-url-browser-function 'browse-url-chromium)
(add-hook 'org-mode-hook
'(lambda ()
(setq org-file-apps
(append '(("\\.pdf\\'" . "zathura \"%s\"")) org-file-apps ))))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key (kbd "C-M-y") 'yank)
(define-key org-agenda-mode-map "j" 'org-agenda-next-item)
(define-key org-agenda-mode-map "k" 'org-agenda-previous-item)

;; ispell ignores SRC blocks
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_SRC" . "#\\+END_SRC"))
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_LATEX" . "#\\+END_LATEX"))

(setq org-pretty-entities t
org-src-fontify-natively t
org-src-tab-acts-natively t
org-src-window-setup 'current-window
org-fontify-whole-heading-line t
org-fontify-done-headline t
org-fontify-quote-and-verse-blocks t
org-log-done 'time
org-agenda-use-time-grid nil
org-agenda-skip-deadline-if-done t
org-agenda-skip-scheduled-if-done t
org-ellipsis "⤵")

;; Better looking org headers
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
#+END_SRC

* Hydra
#+BEGIN_SRC emacs-lisp :tangle yes
@@ -373,28 +465,51 @@ Better narrowing.
(setq wolfe/hydra-projectile
(defhydra hydra-projectile (:color blue :columns 3)
"Projectile"
("f" projectile-find-file "Find File")
("f" helm-projectile "Super Find")
("o" projectile-multi-occur "Multi Occur")
("z" projectile-add-known-project "Add Known Project")

("r" projectile-recentf "Recent Files")
("b" projectile-switch-to-buffer "Switch to Buffer")
("F" helm-projectile-find-file "Find File")
("b" helm-projectile-switch-to-buffer "Switch to Buffer")
("x" projectile-remove-known-project "Remove Known Project")

("d" projectile-find-dir "Find Directory")
("c" projectile-invalidate-cache "Clear Cache")
("r" helm-projectile-recentf "Recent Files")
("s" helm-projectile-switch-project "Switch Project")
("X" projectile-cleanup-known-projects "Cleanup Known Projects")

("s" projectile-switch-project "Switch Project")
("d" helm-projectile-find-dir "Find Directory")
("c" projectile-invalidate-cache "Clear Cache")
("k" projectile-kill-buffers "Kill Buffers")
("q" nil "Cancel" :color blue)
))

(setq wolfe/hydra-jira
(defhydra hydra-jira (:color blue :columns 4)
"Jira"
("p" org-jira-get-projects "Get Projects")
("b" org-jira-browse-issue "Browse Issue")
("g" org-jira-get-issues "Get Issues")
("u" org-jira-update-issue "Update Issue")

("p" org-jira-progress-issue "Update Issue Progress")
("a" org-jira-assign-issue "Assign Issue")
("r" org-jira-refresh-issue "Refresh Issue")
("R" org-jira-refresh-issues-in-buffer "Refresh Issues in Buffer")

("c" org-jira-create-issue "Create Issue")
("y" org-jira-copy-current-issue-key "Copy Current Issue Key")
("s" org-jira-create-subtask "Create Subtask")
("G" org-jira-get-subtasks "Get Subtasks")

("U" org-jira-update-comment "Update Comment")
("t" org-jira-todo-to-jira "Todo to Jira")
("O" (funcall wolfe/hydra-org-expand) "Org Hydra")))

(setq wolfe/hydra-csharp
(defhydra hydra-csharp (:color blue)
"Omnisharp"
("d" omnisharp-go-to-definition "Goto definition")
("D" omnisharp-go-to-definition-other-window "Pop-open definition")
("u" omnisharp-find-usages "Find usages")
("r" omnisharp-rename "Rename symbol")
("R" omnisharp-reload-solution "Reload solution")
("i" omnisharp-code-format-region "Indent region")
@@ -404,12 +519,12 @@ Better narrowing.
(setq wolfe/hydra-org-expand
(defhydra hydra-org-template (:color blue :hint nil)
"
_c_enter _q_uote _L_aTeX:
_l_atex _e_xample _i_ndex:
_a_scii _v_erse _I_NCLUDE:
_s_rc ^ ^ _H_TML:
_h_tml ^ ^ _A_SCII:
"
_c_enter _q_uote _L_aTeX:
_l_atex _e_xample _i_ndex:
_a_scii _v_erse _I_NCLUDE:
_s_rc ^ ^ _H_TML:
_h_tml ^ ^ _A_SCII:
"
("s" (hot-expand "<s"))
("e" (hot-expand "<e"))
("q" (hot-expand "<q"))
@@ -440,6 +555,7 @@ Better narrowing.
(defun wolfe/hydra-selector ()
(cond
((derived-mode-p 'csharp-mode) wolfe/hydra-csharp)
((bound-and-true-p org-jira-mode) wolfe/hydra-jira)
((derived-mode-p 'org-mode) wolfe/hydra-org)
(:else wolfe/hydra-default)))
#+END_SRC
@@ -460,7 +576,7 @@ Better narrowing.
(setq-default evil-symbol-word-search t)
(setq evil-lookup-func #'wolfe/man)
(evil-ex-define-cmd "re[load]" 'wolfe/load-init) ; Custom reload command
(define-key evil-ex-map "e " 'counsel-find-file) ; Trigger file completion :e
(define-key evil-ex-map "e " 'helm-find-files) ; Trigger file completion :e
(global-unset-key (kbd "M-SPC")) ; Unbind secondary leader

(general-create-definer wolfe/bind-leader
@@ -499,7 +615,7 @@ Better narrowing.
"s" 'eval-defun
"b" 'mode-line-other-buffer
"k" 'kill-buffer
"m" 'ivy-switch-buffer
"m" 'helm-mini
"t" 'wolfe/find-tag
"e" 'iedit-mode
"c" 'wolfe/compile-no-prompt
@@ -529,113 +645,71 @@ Better narrowing.
(global-evil-matchit-mode 1))

#+END_SRC
* Org Mode
* Helm
#+BEGIN_SRC emacs-lisp :tangle yes
(require 'ox-latex)
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)
(setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))

(require 'org-agenda)
(use-package ox-reveal
:ensure nil
:config
(use-package htmlize
:ensure nil))

(use-package calfw
(use-package helm
:bind
(("M-x" . helm-M-x)
("M-y" . helm-show-kill-ring))
:config
(require 'calfw-org)
(custom-set-faces
'(cfw:face-title ((t (:foreground "#f0dfaf" :weight bold :height 2.0 :inherit variable-pitch))))
'(cfw:face-header ((t (:foreground "#d0bf8f" :weight bold))))
'(cfw:face-sunday ((t :foreground "#cc9393" :background "grey10" :weight bold)))
'(cfw:face-saturday ((t :foreground "#8cd0d3" :background "grey10" :weight bold)))
'(cfw:face-holiday ((t :background "grey10" :foreground "#8c5353" :weight bold)))
'(cfw:face-grid ((t :foreground "DarkGrey")))
'(cfw:face-default-content ((t :foreground "#bfebbf")))
'(cfw:face-periods ((t :foreground "cyan")))
'(cfw:face-day-title ((t :background "grey10")))
'(cfw:face-default-day ((t :weight bold :inherit cfw:face-day-title)))
'(cfw:face-annotation ((t :foreground "RosyBrown" :inherit cfw:face-day-title)))
'(cfw:face-disable ((t :foreground "DarkGray" :inherit cfw:face-day-title)))
'(cfw:face-today-title ((t :background "#7f9f7f" :weight bold)))
'(cfw:face-today ((t :background: "grey10" :weight bold)))
'(cfw:face-select ((t :background "#2f2f2f")))
'(cfw:face-toolbar ((t :foreground "Steelblue4" :background "Steelblue4")))
'(cfw:face-toolbar-button-off ((t :foreground "Gray10" :weight bold)))
'(cfw:face-toolbar-button-on ((t :foreground "Gray50" :weight bold)))))


;; Formats the agenda into nice columns
(setq org-agenda-prefix-format
'((agenda . " %i %-12t% s %-12(car (last (org-get-outline-path)))")
(timeline . " % s")
(todo . " %i %-12:c")
(tags . " %i %-12:c")
(search . " %i %-12:c")))

;; Sets location of org files
(setq org-agenda-files '("~/Dropbox/org/everything.org"))
(setq browse-url-browser-function 'browse-url-chromium)
(add-hook 'org-mode-hook
'(lambda ()
(setq org-file-apps
(append '(("\\.pdf\\'" . "zathura \"%s\"")) org-file-apps ))))
(require 'helm-config)

;; Misc settings
(setq helm-split-window-in-side-p t
helm-move-to-line-cycle-in-source t
helm-ff-search-library-in-sexp t
helm-scroll-amount 8
helm-ff-file-name-history-use-recentf t)

;; Fuzzyness
(setq helm-recentf-fuzzy-match t
helm-locate-fuzzy-match nil ;; locate fuzzy is worthless
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-semantic-fuzzy-match t
helm-apropos-fuzzy-match t
helm-imenu-fuzzy-match t
helm-lisp-fuzzy-completion t
helm-completion-in-region-fuzzy-match t)

(helm-autoresize-mode 1)

(use-package helm-ext
:config
(helm-ext-ff-enable-skipping-dots t)
(helm-ext-minibuffer-enable-header-line-maybe t))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key (kbd "C-M-y") 'yank)
(define-key org-agenda-mode-map "j" 'org-agenda-next-item)
(define-key org-agenda-mode-map "k" 'org-agenda-previous-item)

;; ispell ignores SRC blocks
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_SRC" . "#\\+END_SRC"))
(add-to-list 'ispell-skip-region-alist '("#\\+BEGIN_LATEX" . "#\\+END_LATEX"))
(helm-mode 1))

(setq org-pretty-entities t
org-src-fontify-natively t
org-src-tab-acts-natively t
org-src-window-setup 'current-window
org-fontify-whole-heading-line t
org-fontify-done-headline t
org-fontify-quote-and-verse-blocks t
org-log-done 'time
org-agenda-use-time-grid nil
org-agenda-skip-deadline-if-done t
org-agenda-skip-scheduled-if-done t
org-ellipsis "⤵")

;; Better looking org headers
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
#+END_SRC
* Projectile

* Packages
** Delight
#+BEGIN_SRC emacs-lisp :tangle yes
(use-package projectile
:config
(use-package helm-projectile
:config
(helm-projectile-on))
(setq projectile-enable-caching t)
(setq projectile-indexing-method 'alien)
(setq projectile-globally-ignored-file-suffixes '(".dll" ".exe"))
(projectile-global-mode))
#+END_SRC
* Magit

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package delight
(use-package magit
:config
(delight '((emacs-lisp-mode "ξ" :major)
(lisp-interaction-mode "λ" :major)
(python-mode "π" :major)
(c-mode "𝐂 " :major)
(org-mode "Ø" :major)
(company-mode " α" company)
(ivy-mode " ι" ivy)
(eldoc-mode " ε" eldoc)
(undo-tree-mode "" undo-tree)
(auto-revert-mode "" autorevert))))
(global-set-key "\C-x\g" 'magit-status))
#+END_SRC

** Nlinum
* Nlinum

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package nlinum-relative
@@ -647,7 +721,7 @@ Better narrowing.

#+END_SRC
** Iedit
* Iedit

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package iedit
@@ -655,42 +729,7 @@ Better narrowing.
(setq iedit-toggle-key-default nil))
#+END_SRC
** Magit

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package magit
:config
(global-set-key "\C-x\g" 'magit-status))
#+END_SRC
** Ivy, Counsel and Swiper

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package ivy
:demand
:bind (("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file)
:map ivy-minibuffer-map
("TAB" . ivy-next-line)
("RET" . ivy-alt-done))
:init
(use-package smex)
(use-package counsel)
:config
(setq ivy-re-builders-alist
'((t . wolfe/ivy--regex-fuzzy)))
(setq ivy-wrap t)
(ivy-mode 1)
(setq ivy-use-virtual-buffers t))

#+END_SRC
#+BEGIN_SRC emacs-lisp :tangle yes
(use-package swiper
:bind (("C-s" . swiper)))
#+END_SRC
** Flycheck
* Flycheck

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package flycheck
@@ -700,92 +739,27 @@ Better narrowing.
(with-eval-after-load 'flycheck
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))))
#+END_SRC
** Projectile

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package projectile
:config
(use-package counsel-projectile
:config
(counsel-projectile-on))
(setq projectile-enable-caching t)
(setq projectile-indexing-method 'alien)
(setq projectile-globally-ignored-file-suffixes '(".dll" ".exe"))
(projectile-global-mode))
#+END_SRC
* Delight

* Email
#+BEGIN_SRC emacs-lisp :tangle yes
(when (require 'mu4e nil 'noerror)
(setq mu4e-msg2pdf "/usr/bin/msg2pdf")
(setq
;; set mu4e as default mail client
mail-user-agent 'mu4e-user-agent
;; root mail directory - can't be switched
;; with context, can only be set once
mu4e-maildir "~/.mail"
mu4e-attachments-dir "~/Downloads/Attachments"
;; update command
mu4e-get-mail-command "mbsync -q -a"
;; update database every seven minutes
mu4e-update-interval (* 60 7)
;; use smtpmail (bundled with emacs) for sending
message-send-mail-function 'smtpmail-send-it
;; optionally log smtp output to a buffer
smtpmail-debug-info t
;; close sent message buffers
message-kill-buffer-on-exit t
;; customize list columns
mu4e-headers-fields '((:flags . 4)
(:from . 20)
(:human-date . 10)
(:subject))
;; for mbsync
mu4e-change-filenames-when-moving t
;; pick first context automatically on launch
mu4e-context-policy 'pick-first
;; use current context for new mail
mu4e-compose-context-policy nil
mu4e-confirm-quit nil)

(global-set-key (kbd "<f12>") 'mu4e)
(global-set-key (kbd "<C-f12>") 'mu4e-update-mail-and-index)

(setq mu4e-contexts
`(,(make-mu4e-context
:name "gmail"
:match-func (lambda(msg)
(when msg
(mu4e-message-contact-field-matches msg :to "@gmail.com")))
:vars '(
;; local directories, relative to mail root
(mu4e-sent-folder . "/gmail/[Gmail]/.Sent Mail")
(mu4e-drafts-folder . "/gmail/[Gmail]/.Drafts")
(mu4e-trash-folder . "/gmail/[Gmail]/.Trash")
(mu4e-refile-folder . "/gmail/[Gmail]/.All Mail")
;; account details
(user-mail-address . "joshuafwolfe@gmail.com")
(user-full-name . "Josh Wolfe")
(mu4e-user-mail-address-list . ( "@gmail.com" ))
;; gmail saves every outgoing message automatically
(mu4e-sent-messages-behavior . delete)
(mu4e-maildir-shortcuts . (("/gmail/INBOX" . ?j)
("/gmail/[Gmail]/.All Mail" . ?a)
("/gmail/[Gmail]/.Trash" . ?t)
("/gmail/[Gmail]/.Drafts" . ?d)))
;; outbound mail server
(smtpmail-smtp-server . "smtp.gmail.com")
;; outbound mail port
(smtpmail-smtp-service . 465)
;; use ssl
(smtpmail-stream-type . ssl)
;; the All Mail folder has a copy of every other folder's contents,
;; and duplicates search results, which is confusing
(mue4e-headers-skip-duplicates . t)))))
(use-package delight
:config
(custom-set-faces
'(sml/minor-modes ((t (:inherit sml/global :family "Arial")))))

(use-package evil-mu4e))
(delight '((emacs-lisp-mode "ξ" :major)
(lisp-interaction-mode "λ" :major)
(python-mode "π" :major)
(c-mode "c" :major)
(org-mode "Ø" :major)
(company-mode " Ȼ" company)
(helm-mode " H" helm)
(projectile-mode " ρ" projectile)
(eldoc-mode " ε" eldoc)
(flycheck-mode " ƒ" flycheck)
(undo-tree-mode "" undo-tree)
(auto-revert-mode "" autorevert))))
#+END_SRC

* Language Specific
@@ -803,16 +777,6 @@ Better narrowing.
(use-package json-mode)
#+END_SRC

** Haskell

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package haskell-mode)

(use-package company-ghc
:config
(add-to-list 'company-backends 'company-ghc))
#+END_SRC

** Latex

#+BEGIN_SRC emacs-lisp :tangle yes
@@ -845,7 +809,7 @@ Autocomplete engine
:init
(global-company-mode)
:config
(setq company-idle-delay 0) ; Delay to complete
(setq company-idle-delay 0.5) ; Delay to complete
(setq company-minimum-prefix-length 1)
(setq company-selection-wrap-around t) ; Loops around suggestions

@@ -883,6 +847,79 @@ Autocomplete engine

#+END_SRC

* Email
#+BEGIN_SRC emacs-lisp :tangle yes
(when (require 'mu4e nil 'noerror)
(setq mu4e-msg2pdf "/usr/bin/msg2pdf")
(setq
;; set mu4e as default mail client
mail-user-agent 'mu4e-user-agent
;; root mail directory - can't be switched
;; with context, can only be set once
mu4e-maildir "~/.mail"
mu4e-attachments-dir "~/Downloads/Attachments"
;; update command
mu4e-get-mail-command "mbsync -q -a"
;; update database every seven minutes
mu4e-update-interval (* 60 7)
;; use smtpmail (bundled with emacs) for sending
message-send-mail-function 'smtpmail-send-it
;; optionally log smtp output to a buffer
smtpmail-debug-info t
;; close sent message buffers
message-kill-buffer-on-exit t
;; customize list columns
mu4e-headers-fields '((:flags . 4)
(:from . 20)
(:human-date . 10)
(:subject))
;; for mbsync
mu4e-change-filenames-when-moving t
;; pick first context automatically on launch
mu4e-context-policy 'pick-first
;; use current context for new mail
mu4e-compose-context-policy nil
mu4e-confirm-quit nil)

(global-set-key (kbd "<f12>") 'mu4e)
(global-set-key (kbd "<C-f12>") 'mu4e-update-mail-and-index)

(setq mu4e-contexts
`(,(make-mu4e-context
:name "gmail"
:match-func (lambda(msg)
(when msg
(mu4e-message-contact-field-matches msg :to "@gmail.com")))
:vars '(
;; local directories, relative to mail root
(mu4e-sent-folder . "/gmail/[Gmail]/.Sent Mail")
(mu4e-drafts-folder . "/gmail/[Gmail]/.Drafts")
(mu4e-trash-folder . "/gmail/[Gmail]/.Trash")
(mu4e-refile-folder . "/gmail/[Gmail]/.All Mail")
;; account details
(user-mail-address . "joshuafwolfe@gmail.com")
(user-full-name . "Josh Wolfe")
(mu4e-user-mail-address-list . ( "@gmail.com" ))
;; gmail saves every outgoing message automatically
(mu4e-sent-messages-behavior . delete)
(mu4e-maildir-shortcuts . (("/gmail/INBOX" . ?j)
("/gmail/[Gmail]/.All Mail" . ?a)
("/gmail/[Gmail]/.Trash" . ?t)
("/gmail/[Gmail]/.Drafts" . ?d)))
;; outbound mail server
(smtpmail-smtp-server . "smtp.gmail.com")
;; outbound mail port
(smtpmail-smtp-service . 465)
;; use ssl
(smtpmail-stream-type . ssl)
;; the All Mail folder has a copy of every other folder's contents,
;; and duplicates search results, which is confusing
(mue4e-headers-skip-duplicates . t)))))

(use-package evil-mu4e))
#+END_SRC

* Misc

#+BEGIN_SRC emacs-lisp :tangle yes
@@ -891,6 +928,11 @@ Autocomplete engine
;; Non-nil means display source file containing the main routine at startup
)
(use-package help-fns+)

(use-package org-jira
:config
(setq jiralib-url "https://indigoca.atlassian.net"))

#+END_SRC

* Backups

Loading…
Cancel
Save