Commit eb99982b authored by Guilherme Semente's avatar Guilherme Semente 🌱

Refactoring .emacs

parent 9ccb2387
......@@ -46,7 +46,7 @@ These settings are often sensitive or too much specific and not
worth to share."
;; Load local settings if it exists
(load "~/etc/local.el.gpg" t))
(load "~/etc/emacs/local.el.gpg" t))
......@@ -675,7 +675,7 @@ You may find other key bindings inside use-package statements."
(global-magit-file-mode t)
(setq auto-revert-check-vc-info t
magit-auto-revert-mode t
magit-repository-directories semente-magit-repository-directories
magit-repository-directories '(("~/src" . 3))
;; magit-completing-read-function 'magit-ido-completing-read
magit-completing-read-function 'magit-builtin-completing-read)
:config
......@@ -740,10 +740,9 @@ You may find other key bindings inside use-package statements."
(add-hook 'racer-mode-hook #'eldoc-mode))
(use-package yapfify
:ensure t
:config
;; (add-hook 'python-mode-hook 'yapf-mode)
)
:ensure t)
;; :config
;; (add-hook 'python-mode-hook 'yapf-mode))
(use-package rainbow-mode
:ensure t
......@@ -861,43 +860,33 @@ You may find other key bindings inside use-package statements."
(require 'ob-shell nil t)
(require 'org-habit)
(require 'org-protocol)
(require 'ox-publish)
(diminish 'orgstruct-mode "")
(diminish 'orgtbl-mode "") ; XXX: not working
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\(\\.gpg\\)?\\'"
org-agenda-files '("~/org/agenda.org.gpg" "~/org/tasks.org.gpg" "~/org/notes.org.gpg")
org-default-notes-file "~/org/notes.org.gpg"
org-agenda-text-search-extra-files '(agenda-archives)
(setq org-agenda-text-search-extra-files '(agenda-archives)
org-babel-load-languages '((emacs-lisp . t) (sh . t) (python . t))
org-export-backends '(ascii html icalendar latex odt md))
org-export-backends '(ascii html icalendar latex odt md)
org-capture-templates semente-org-capture-templates)
(setq org-archive-default-command 'org-archive-subtree
org-archive-location "~/org/archive.org.gpg::* %s :archive:"
org-archive-reversed-order t)
(setq org-agenda-window-setup 'only-window
org-agenda-restore-windows-after-quit t
org-catch-invisible-edits 'show-and-error
(setq org-catch-invisible-edits 'show-and-error
org-time-stamp-custom-formats '(("<%d/%m/%Y %a>" . "<%d/%m/%Y %a %H:%M>"))
org-display-custom-times t
org-return-follows-link t
org-special-ctrl-k t
org-startup-indented t
;; org-ellipsis "↴"
org-capture-templates semente-org-capture-templates
org-protocol-default-template-key "xp")
(setq org-todo-keyword-faces
'(("OPEN" . "coral")
("ATTEND" . "aquamarine")
("PAY" . "aquamarine")))
(setq org-refile-allow-creating-parent-nodes 'confirm
org-refile-targets '((nil :maxlevel . 4)
(org-agenda-files :maxlevel . 1))
org-outline-path-complete-in-steps nil
org-refile-use-outline-path t)
(setq org-log-into-drawer t
org-log-done 'time)
(setq org-agenda-include-diary t
org-enforce-todo-dependencies t
org-protocol-default-template-key "xp"
org-default-notes-file "~/org/notes.org.gpg")
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\(\\.gpg\\)?\\'"
org-agenda-files '("~/org/agenda.org.gpg" "~/org/tasks.org.gpg" "~/org/notes.org.gpg")
org-agenda-window-setup 'reorganize-frame
org-agenda-restore-windows-after-quit t
org-agenda-include-diary t
org-agenda-insert-diary-extract-time t
org-agenda-start-on-weekday nil
org-agenda-span 4
......@@ -905,8 +894,7 @@ You may find other key bindings inside use-package statements."
org-agenda-skip-deadline-if-done t
org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled
org-agenda-skip-scheduled-if-done t
org-agenda-skip-scheduled-if-deadline-is-shown t)
(setq org-enforce-todo-dependencies t
org-agenda-skip-scheduled-if-deadline-is-shown t
org-agenda-todo-ignore-scheduled 'future
org-agenda-todo-ignore-timestamp 'future
org-agenda-todo-ignore-deadlines 'near
......@@ -916,6 +904,13 @@ You may find other key bindings inside use-package statements."
org-icalendar-alarm-time 45
;; org-icalendar-timezone "America/Sao_Paulo"
org-icalendar-combined-agenda-file "~/.org.ics")
(setq org-refile-allow-creating-parent-nodes 'confirm
org-refile-targets '((nil :maxlevel . 4)
(org-agenda-files :maxlevel . 1))
org-refile-use-outline-path t
org-outline-path-complete-in-steps nil)
(setq org-log-into-drawer t
org-log-done 'time)
(setq org-clock-mode-line-total 'today
org-clock-string-limit 48
org-clock-persist t
......@@ -924,6 +919,10 @@ You may find other key bindings inside use-package statements."
org-clock-out-remove-zero-time-clocks t
org-clock-report-include-clocking-task t
org-clock-x11idle-program-name "xprintidle")
(setq org-todo-keyword-faces
'(("OPEN" . "coral")
("ATTEND" . "aquamarine")
("PAY" . "aquamarine")))
(org-clock-persistence-insinuate)))
......@@ -966,19 +965,11 @@ You may find other key bindings inside use-package statements."
:config
(setq mu4e-update-interval 480
mu4e-get-mail-command "mbsync --all"
mu4e-change-filenames-when-moving t ; non-nil works better with mbsync
)
mu4e-change-filenames-when-moving t) ; non-nil works better with mbsync
(setq mail-user-agent 'mu4e-user-agent
mu4e-confirm-quit nil
;; mu4e-split-view 'single-window
mu4e-use-fancy-chars nil
mu4e-attachment-dir "~/downloads/mu4e")
(setq
mu4e-maildir "~/mail"
mu4e-refile-folder "/archive"
mu4e-drafts-folder "/drafts"
mu4e-sent-folder "/sent"
mu4e-trash-folder "/trash")
mu4e-use-fancy-chars nil)
(setq mu4e-compose-complete-only-after "2016-01-01"
mu4e-compose-dont-reply-to-self t
mu4e-compose-signature t
......@@ -989,22 +980,51 @@ You may find other key bindings inside use-package statements."
(setq mu4e-headers-include-related nil
mu4e-headers-skip-duplicates nil
mu4e-headers-results-limit 1000
mu4e-headers-fields '((:human-date . 12)
(:flags . 6)
(:from . 18)
(:subject)))
(setq mu4e-bookmarks semente-mu4e-bookmarks
mu4e-contexts semente-mu4e-contexts
mu4e-context-policy 'pick-first
mu4e-compose-context-policy 'ask
mu4e-sent-messages-behavior semente-mu4e-sent-messages-behavior
mu4e-user-mail-address-list ; built from mu4e-contexts data
(delq nil
(mapcar (lambda (context)
(when (mu4e-context-vars context)
(cdr (assq 'user-mail-address (mu4e-context-vars context)))))
mu4e-contexts)))
mu4e-headers-fields '((:human-date . 12) (:flags . 6) (:from . 18) (:subject)))
(setq mu4e-maildir "~/mail"
mu4e-refile-folder "/archive"
mu4e-drafts-folder "/drafts"
mu4e-sent-folder "/sent"
mu4e-trash-folder "/trash"
mu4e-attachment-dir "~/downloads/mu4e"
mu4e-maildir-shortcuts '(("/inbox" . ?i) ("/archive" . ?a) ("/drafts" . ?d)
("/trash" . ?t) ("/spam" . ?s)))
(setq
(setq semente-mu4e-inbox-expr "((m:/inbox OR m:/drafts) OR (m:/sent)"
mu4e-contexts semente-mu4e-contexts
mu4e-bookmarks
'(((concat "date:today..now AND " semente-mu4e-inbox-expr) "Today's Inbox" ?t)
((concat "date:..1d AND " semente-mu4e-inbox-expr) "Yesterday's Inbox" ?y)
((concat
(concat "NOT list:* AND " semente-mu4e-inbox-expr)
" OR "
(concat "flagged AND " semente-mu4e-inbox-expr))
"Important messages" ?x)
("flag:flagged" "Flagged" ?f)
("flag:list AND NOT (flag:trashed OR m:/archive OR m:/spam)" "Mailing lists" ?g)
("date:7d..now AND NOT m:/spam" "Last 7 days" ?l)
("m:/spam" "Spam" ?s))
mu4e-sent-messages-behavior
(lambda ()
"Don't save sent messages for certain services
Useful for SMTP services that already save a copy in the Sent folder
even if you aren't using their client."
(if (or (string-match "@gmail\\.com$" (message-sendmail-envelope-from))
(string-match "@protonmail\\.ch$" (message-sendmail-envelope-from))
(string-match "@protonmail\\.com$" (message-sendmail-envelope-from)))
'delete
'sent))
mu4e-context-policy 'pick-first
mu4e-compose-context-policy 'ask
mu4e-user-mail-address-list ; built from mu4e-contexts data
(delq nil
(mapcar (lambda (context)
(when (mu4e-context-vars context)
(cdr (assq 'user-mail-address (mu4e-context-vars context)))))
mu4e-contexts)))
(add-hook 'mu4e-compose-mode-hook 'flyspell-mode)
(add-hook 'mu4e-compose-mode-hook (lambda () (set-fill-column 72)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment