Browse Source

commenting mu4e, ace-jump and ace-window; needs clean vars**

master
parent
commit
408f63f409
1 changed files with 206 additions and 135 deletions
  1. +206
    -135
      .emacs

+ 206
- 135
.emacs View File

@ -2,7 +2,8 @@
;;--------
;; Melpa repository:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")t)
(package-initialize)
;; use-package
(unless (package-installed-p 'use-package)
@ -310,143 +311,42 @@
:ensure t
:config
(pyvenv-mode 1))
;;ess:
;(use-package ess
; :ensure t)
;(require 'ess-site)
;; org-configuration:
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)))
;;-=-=-=-=-=-=-
;; mu4e
(use-package mu4e
:commands (mu4e)
:init
;;(progn (require 'helm-mu))
:config
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e")
(setq mu4e-mu-binary "/usr/local/bin/mu"))
;;-+-+-+-+-+-+-+-+-+-+-+-+
;; "default" parameters from Gmail
(setq user-full-name "Gerardo Marx Chávez-Campos") ;;user
(setq mu4e-compose-signature t) ;; signature in file ~/.signature
(add-hook 'mu4e-compose-mode-hook 'flyspell-mode(setq ispell-local-dictionary "castellano")) ;; spell check
;; attempt to show images when viewing messages
(setq mu4e-view-show-images t)
(setq mu4e-sent-folder "/Gmail/sent"
;; mu4e-sent-messages-behavior 'delete ;; Unsure how this should be configured
mu4e-drafts-folder "/Gmail/drafts"
user-mail-address "gmarx_cc@itmorelia.edu.mx"
smtpmail-local-domain "gmail.com"
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-stream-type 'starttls
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587)
;; ---
;; Now I set a list of
(defvar my-mu4e-account-alist
'(("Gmail"
(mu4e-sent-folder "/Gmail/sent")
(mu4e-drafts-folder "/Gmail/drafts")
(user-mail-address "gmarx_cc@itmorelia.edu.mx")
(smtpmail-smtp-user "gmarx_cc@itmorelia.edu.mx")
(smtpmail-local-domain "gmail.com")
(smtpmail-default-smtp-server "smtp.gmail.com")
(smtpmail-stream-type starttls)
(smtpmail-smtp-server "smtp.gmail.com")
(smtpmail-smtp-service 587)
)
;; Include any other accounts here ...
("Exchange"
(mu4e-sent-folder "/Exchange/sent")
(mu4e-drafts-folder "/Exchange/drafts")
(user-mail-address "gerardo.cc@morelia.tecnm.mx")
(smtpmail-smtp-user "gerardo.cc@morelia.tecnm.mx")
(smtpmail-local-domain "office365.com")
(smtpmail-default-smtp-server "smtp.office365.com")
(smtpmail-stream-type starttls)
(smtpmail-smtp-server "smtp.office365.com")
(smtpmail-smtp-service 587)
)
;;
;; hotmail
("Hotmail"
(mu4e-sent-folder "/Hotmail/sent")
(mu4e-drafts-folder "/Hotmail/drafts")
(user-mail-address "gmarx_cc@hotmail.com")
(smtpmail-smtp-user "gmarx_cc@hotmail.com")
(smtpmail-local-domain "office365.com")
(smtpmail-default-smtp-server "smtp.office365.com")
(smtpmail-stream-type starttls)
(smtpmail-smtp-server "smtp.office365.com")
(smtpmail-smtp-service 25)
)
))
;; ---
(defun my-mu4e-set-account ()
"Set the account for composing a message.
This function is taken from:
https://www.djcbsoftware.nl/code/mu/mu4e/Multiple-accounts.html"
(let* ((account
(if mu4e-compose-parent-message
(let ((maildir (mu4e-message-field mu4e-compose-parent-message :maildir)))
(string-match "/\\(.*?\\)/" maildir)
(match-string 1 maildir))
(completing-read (format "Compose with account: (%s) "
(mapconcat #'(lambda (var) (car var))
my-mu4e-account-alist "/"))
(mapcar #'(lambda (var) (car var)) my-mu4e-account-alist)
nil t nil nil (caar my-mu4e-account-alist))))
(account-vars (cdr (assoc account my-mu4e-account-alist))))
(if account-vars
(mapc #'(lambda (var)
(set (car var) (cadr var)))
account-vars)
(error "No email account found"))))
(add-hook 'mu4e-compose-pre-hook 'my-mu4e-set-account)
;;-+-+-+-+-+-+-+-+-+-+-+-+
;;---------
;; mu4e-maildirs-extension
(use-package mu4e-maildirs-extension
;;ess:
(use-package ess
:ensure t
:init
(mu4e-maildirs-extension)
:custom
(mu4e-maildirs-extension-custom-list '("/Gmail/INBOX" "/Exchange/INBOX" "/Hotmail/INBOX"))
)
:init (require 'ess-site))
;; mu4e-alert
(use-package mu4e-alert
;; markdown:
(use-package markdown-mode
:ensure t
:after mu4e
:commands (markdown-mode gfm-mode)
:mode (("README\\.md\\'" . gfm-mode)
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
:init
(setq mu4e-alert-interesting-mail-query
(concat
"flag:unread maildir:/Exchange/INBOX "
"OR "
"flag:unread maildir:/Gmail/INBOX"
))
(mu4e-alert-enable-mode-line-display)
(defun gjstein-refresh-mu4e-alert-mode-line ()
(interactive)
(mu4e~proc-kill)
(mu4e-alert-enable-mode-line-display)
)
(run-with-timer 0 60 'gjstein-refresh-mu4e-alert-mode-line))
;; helm
(use-package helm-mu
:ensure t
:config
;;(define-key mu4e-main-mode-map "s" 'helm-mu)
;;(define-key mu4e-headers-mode-map "s" 'helm-mu)
;;(define-key mu4e-view-mode-map "s" 'helm-mu)
(setq markdown-command "multimarkdown")
(add-hook 'markdown-mode-hook
(lambda()
(ispell-change-dictionary "en")
(flyspell-mode 1)))
(setq markdown-css-paths '(
"./assets/stylesheets/style.css"
"./assets/stylesheets/pilcrow.css"
"./assets/stylesheets/hljs-github.min.css"
))
)
;;agenda files
;;(setq org-agenda-files '("~/beorg/phd.org" "~/beorg/students.org" "~/beorg/inbox.org" "~/beorg/academia.org"))
(setq recentf-exclude (org-agenda-files))
;;criticMarkup
(use-package cm-mode
:ensure t)
;;org-trello
(require 'org-trello)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@ -455,17 +355,23 @@
'(LaTeX-command "latex -synctex=1")
'(custom-safe-themes
(quote
("2f1518e906a8b60fac943d02ad415f1d8b3933a5a7f75e307e6e9a26ef5bf570" "71e5acf6053215f553036482f3340a5445aee364fb2e292c70d9175fb0cc8af7" "99ea831ca79a916f1bd789de366b639d09811501e8c092c85b2cb7d697777f93" "bf387180109d222aee6bb089db48ed38403a1e330c9ec69fe1f52460a8936b66" default)))
("7a994c16aa550678846e82edc8c9d6a7d39cc6564baaaacc305a3fdc0bd8725f" "5b809c3eae60da2af8a8cfba4e9e04b4d608cb49584cb5998f6e4a1c87c057c4" "d74c5485d42ca4b7f3092e50db687600d0e16006d8fa335c69cf4f379dbd0eee" "2f1518e906a8b60fac943d02ad415f1d8b3933a5a7f75e307e6e9a26ef5bf570" "71e5acf6053215f553036482f3340a5445aee364fb2e292c70d9175fb0cc8af7" "99ea831ca79a916f1bd789de366b639d09811501e8c092c85b2cb7d697777f93" "bf387180109d222aee6bb089db48ed38403a1e330c9ec69fe1f52460a8936b66" default)))
'(markdown-command "/usr/local/bin/pandoc" t)
'(org-agenda-files
(quote
("~/beorg/inbox.org" "~/beorg/academia.org" "~/beorg/water-quality.org" "~/beorg/phd.org" "~/lwc/projects/dynamicSystems/dynamic-systems.org")))
("~/lwc/projects/dynamicSystems/trello-jason.org" "~/beorg/inbox.org" "~/beorg/academia.org" "~/beorg/water-quality.org" "~/beorg/phd.org" "~/lwc/projects/dynamicSystems/dynamic-systems.org")))
'(org-trello-current-prefix-keybinding "C-c o" nil (org-trello))
'(org-trello-files (quote ("~/beorg/trello-org.org")) nil (org-trello))
'(package-selected-packages
(quote
(pyvenv ess ace-mc ox-twbs org-alert latex-preview-pane org-pomodoro which-key virtualenvwrapper use-package treemacs-projectile pdf-tools org-bullets mu4e-maildirs-extension mu4e-alert magit helm-projectile helm-mu flycheck expand-region doom-themes doom-modeline dashboard company auctex)))
(ace-jump cm-mode org-trello markdown-mode pyvenv ess ace-mc ox-twbs org-alert latex-preview-pane org-pomodoro which-key virtualenvwrapper use-package treemacs-projectile pdf-tools org-bullets mu4e-maildirs-extension mu4e-alert magit helm-projectile helm-mu flycheck expand-region doom-themes doom-modeline dashboard company auctex)))
'(pdf-tools-handle-upgrades nil)
'(safe-local-variable-values
(quote
((fill-column . 5000:)
((markdown-css-paths . "./assets/stylesheets/main.css")
(markdown-css-path . "./assets/stylesheets/main.css")
(column-width . 5000)
(fill-column . 5000:)
(ispell-local-dictionary . castellano)
(ispell-local-directory . castellano)
(LaTeX-includegraphics-read-file . LaTeX-includegraphics-read-file-relative)
@ -478,6 +384,171 @@
(org-attach-preferred-new-method . ask))))
'(send-mail-function (quote smtpmail-send-it)))
;; org-trello:
(use-package org-trello
:ensure t)
;; ace-window
(use-package ace-window
:ensure t
:bind
("M-o" . 'ace-window)
:config
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
;; ace-jump
(use-package ace-jump-mode
:ensure t
:bind
("C-c SPC" . 'ace-jump-mode)
("C-c C-j l" . 'ace-jump-line-mode)
("C-c C-j c" . 'ace-jump-char-mode))
;;-0-0-0-0-0-0-0
;; my functions:
;; show in finder
(defun show-in-finder ()
(interactive)
(shell-command (concat "open -R " buffer-file-name)))
(global-set-key (kbd "C-x x f") 'show-in-finder)
;;
;;-=-=-=-=-=-=-
;; mu4e
;; (use-package mu4e
;; :commands (mu4e)
;; :init
;; ;;(progn (require 'helm-mu))
;; :config
;; (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e")
;; (setq mu4e-mu-binary "/usr/local/bin/mu"))
;; ;;-+-+-+-+-+-+-+-+-+-+-+-+
;; ;; "default" parameters from Gmail
;; (setq user-full-name "Gerardo Marx Chávez-Campos") ;;user
;; (setq mu4e-compose-signature t) ;; signature in file ~/.signature
;; (add-hook 'mu4e-compose-mode-hook 'flyspell-mode(setq ispell-local-dictionary "castellano")) ;; spell check
;; ;; attempt to show images when viewing messages
;; (setq mu4e-view-show-images t)
;; (setq mu4e-sent-folder "/Gmail/sent"
;; ;; mu4e-sent-messages-behavior 'delete ;; Unsure how this should be configured
;; mu4e-drafts-folder "/Gmail/drafts"
;; user-mail-address "gmarx_cc@itmorelia.edu.mx"
;; smtpmail-local-domain "gmail.com"
;; smtpmail-default-smtp-server "smtp.gmail.com"
;; smtpmail-stream-type 'starttls
;; smtpmail-smtp-server "smtp.gmail.com"
;; smtpmail-smtp-service 587)
;; ;; ---
;; ;; Now I set a list of
;; (defvar my-mu4e-account-alist
;; '(("Gmail"
;; (mu4e-sent-folder "/Gmail/sent")
;; (mu4e-drafts-folder "/Gmail/drafts")
;; (user-mail-address "gmarx_cc@itmorelia.edu.mx")
;; (smtpmail-smtp-user "gmarx_cc@itmorelia.edu.mx")
;; (smtpmail-local-domain "gmail.com")
;; (smtpmail-default-smtp-server "smtp.gmail.com")
;; (smtpmail-stream-type starttls)
;; (smtpmail-smtp-server "smtp.gmail.com")
;; (smtpmail-smtp-service 587)
;; )
;; ;; Include any other accounts here ...
;; ("Exchange"
;; (mu4e-sent-folder "/Exchange/sent")
;; (mu4e-drafts-folder "/Exchange/drafts")
;; (user-mail-address "gerardo.cc@morelia.tecnm.mx")
;; (smtpmail-smtp-user "gerardo.cc@morelia.tecnm.mx")
;; (smtpmail-local-domain "office365.com")
;; (smtpmail-default-smtp-server "smtp.office365.com")
;; (smtpmail-stream-type starttls)
;; (smtpmail-smtp-server "smtp.office365.com")
;; (smtpmail-smtp-service 587)
;; )
;; ;;
;; ;; hotmail
;; ("Hotmail"
;; (mu4e-sent-folder "/Hotmail/sent")
;; (mu4e-drafts-folder "/Hotmail/drafts")
;; (user-mail-address "gmarx_cc@hotmail.com")
;; (smtpmail-smtp-user "gmarx_cc@hotmail.com")
;; (smtpmail-local-domain "office365.com")
;; (smtpmail-default-smtp-server "smtp.office365.com")
;; (smtpmail-stream-type starttls)
;; (smtpmail-smtp-server "smtp.office365.com")
;; (smtpmail-smtp-service 25)
;; )
;; ))
;; ;; ---
;; (defun my-mu4e-set-account ()
;; "Set the account for composing a message.
;; This function is taken from:
;; https://www.djcbsoftware.nl/code/mu/mu4e/Multiple-accounts.html"
;; (let* ((account
;; (if mu4e-compose-parent-message
;; (let ((maildir (mu4e-message-field mu4e-compose-parent-message :maildir)))
;; (string-match "/\\(.*?\\)/" maildir)
;; (match-string 1 maildir))
;; (completing-read (format "Compose with account: (%s) "
;; (mapconcat #'(lambda (var) (car var))
;; my-mu4e-account-alist "/"))
;; (mapcar #'(lambda (var) (car var)) my-mu4e-account-alist)
;; nil t nil nil (caar my-mu4e-account-alist))))
;; (account-vars (cdr (assoc account my-mu4e-account-alist))))
;; (if account-vars
;; (mapc #'(lambda (var)
;; (set (car var) (cadr var)))
;; account-vars)
;; (error "No email account found"))))
;; (add-hook 'mu4e-compose-pre-hook 'my-mu4e-set-account)
;; ;;-+-+-+-+-+-+-+-+-+-+-+-+
;; ;;---------
;; ;; mu4e-maildirs-extension
;; (use-package mu4e-maildirs-extension
;; :ensure t
;; :init
;; (mu4e-maildirs-extension)
;; :custom
;; (mu4e-maildirs-extension-custom-list '("/Gmail/INBOX" "/Exchange/INBOX" "/Hotmail/INBOX"))
;; )
;; ;; mu4e-alert
;; (use-package mu4e-alert
;; :ensure t
;; :after mu4e
;; :init
;; (setq mu4e-alert-interesting-mail-query
;; (concat
;; "flag:unread maildir:/Exchange/INBOX "
;; "OR "
;; "flag:unread maildir:/Gmail/INBOX"
;; ))
;; (mu4e-alert-enable-mode-line-display)
;; (defun gjstein-refresh-mu4e-alert-mode-line ()
;; (interactive)
;; (mu4e~proc-kill)
;; (mu4e-alert-enable-mode-line-display)
;; )
;; (run-with-timer 0 60 'gjstein-refresh-mu4e-alert-mode-line))
;; ;; helm
;; (use-package helm-mu
;; :ensure t
;; :config
;; ;;(define-key mu4e-main-mode-map "s" 'helm-mu)
;; ;;(define-key mu4e-headers-mode-map "s" 'helm-mu)
;; ;;(define-key mu4e-view-mode-map "s" 'helm-mu)
;; )
;;=-=-=-=-=-=-=-=-=-=-=-=
;;agenda files
;;(setq org-agenda-files '("~/beorg/phd.org" "~/beorg/students.org" "~/beorg/inbox.org" "~/beorg/academia.org"))
(setq recentf-exclude (org-agenda-files))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.


Loading…
Cancel
Save