...
 
Commits (10)
......@@ -5,17 +5,20 @@
;; I use <https://semente.io/emacs.el> as system wide configuration for GNU
;; Emacs (/etc/emacs/site-start.d/99semente.el).
;; Some customizations use the setq-default command. It is to set values only
;; Some customizations use the `setq-default' command. It is to set values only
;; in buffers that do not have their own local values for the variable.
;; If a customization lacks comments, the "describe-*" functions, such as
;; `describe-variable' (C-h v) and `describe-function' (C-h f) are your friends.
;; is the default `page-delimiter', you can move backward and forward to page
;; boundaries using backward-page (C-x [) and forward-page (C-x ]).
;; is the default `page-delimiter', you can move backward and forward to
;; "page boundaries" using `backward-page' (C-x [) and `forward-page' (C-x ]).
;;; Code:
(require 'cl)
(progn
......@@ -95,8 +98,8 @@ user)."
(eq major-mode 'mu4e-headers-mode))
(mu4e-quit)
(progn
(mu4e-update-mail-and-index nil)
(mu4e-headers-search-bookmark semente-mu4e-inbox-expr))))
(mu4e t)
(mu4e-headers-search semente-mu4e-inbox-expr))))
(defun semente-mu4e-view-in-external-browser ()
(interactive)
......@@ -117,6 +120,7 @@ You may find other key bindings inside use-package statements."
(bind-key "M-\\" 'cycle-spacing)
(bind-key "C-c x" 'save-buffers-kill-emacs)
(bind-key "C-c m" 'semente-switch-to-minibuffer)
(bind-key "C-c r" 'semente-mu4e)
(bind-keys :prefix-map semente-customize-prefix-map
:prefix "C-c e"
("f" . customize-face)
......@@ -503,7 +507,56 @@ You may find other key bindings inside use-package statements."
(setq shr-color-visible-luminance-min 60
shr-width 72
shr-use-fonts nil
shr-max-image-proportion 0.7)))
shr-max-image-proportion 0.7))
(use-package elfeed
:ensure t
:bind (:map elfeed-show-mode-map ("&" . semente-elfeed-show-visit-external))
:bind (:map elfeed-show-mode-map ("R" . semente-elfeed-show-readable))
:preface
(setq-default semente-eww-readable nil)
(defun semente-elfeed-show-visit-external ()
(interactive)
(let ((url (elfeed-entry-link elfeed-show-entry)))
(funcall shr-external-browser url)))
(defun semente-elfeed-show-readable ()
(interactive)
(set (make-local-variable 'semente-eww-readable) t)
(eww-browse-url (elfeed-entry-link elfeed-show-entry)))
(add-hook 'eww-after-render-hook
(lambda ()
(let ((elfeed-entry-buffer (get-buffer "*elfeed-entry*")))
(if elfeed-entry-buffer
(if (buffer-local-value 'semente-eww-readable elfeed-entry-buffer)
(eww-readable))))))
:init
(setq-default elfeed-search-filter "@4-weeks-ago -muted +unread ")
:config
;; see elfeed-org below
;;(elfeed-load-opml "~/feeds.opml")
;; bold entries tagged as "must"
(defface elfeed-entry-bold '((t :weight bold)) "Bold elfeed entry")
(push '(must elfeed-entry-bold) elfeed-search-face-alist)
;; mark older entries as read
(add-hook 'elfeed-new-entry-hook
(elfeed-make-tagger :before "4 weeks ago" :remove 'unread))
;; mark some feed entries older than 1 days as read
(add-hook 'elfeed-new-entry-hook
(elfeed-make-tagger :feed-url "example\.net" :before "1 days ago" :remove 'unread)))
(use-package elfeed-org
:ensure t
:config
(elfeed-org)
(setq rmh-elfeed-org-files (list "~/org/feeds.org"))))
......@@ -682,7 +735,14 @@ You may find other key bindings inside use-package statements."
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh))
(use-package magit-todos
:ensure t)
:ensure t
:config
(magit-todos-mode t))
(use-package hl-todo
:ensure t
:config
(add-hook 'prog-mode-hook 'hl-todo-mode))
(use-package forge
:ensure t
......@@ -931,33 +991,15 @@ You may find other key bindings inside use-package statements."
"E-mail"
(use-package mu4e-alert
:ensure t
:config
(setq mu4e-alert-email-notification-types '(subjects)
mu4e-alert-interesting-mail-query
"(maildir:/inbox AND flag:unread AND date:today..now AND NOT flag:list)")
(mu4e-alert-enable-notifications)
(mu4e-alert-set-default-style 'libnotify)
;; display stuff on modeline as well as notify
(add-hook 'after-init-hook #'mu4e-alert-enable-notifications)
(add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display))
(use-package mu4e
:demand
:load-path "/usr/share/emacs/site-lisp/mu4e"
;; :demand
:load-path "~/.local/share/emacs/site-lisp/mu4e"
:bind (:map mu4e-headers-mode-map ("q" . semente-mu4e))
:bind (:map mu4e-view-mode-map ("&" . semente-mu4e-view-in-external-browser))
:preface
(defalias 'mu 'semente-mu4e)
(defadvice mu4e-quit (after delete-mu4e-frame activate)
"Advise mu4e-quit to close the frame mu4e"
(if (equal "mu4e" (frame-parameter nil 'name))
(delete-frame)))
(defun semente-maybe-reply-encrypted ()
(let ((msg mu4e-compose-parent-message))
(when (and msg (member 'encrypted (mu4e-message-field msg :flags)))
......@@ -975,7 +1017,8 @@ You may find other key bindings inside use-package statements."
mu4e-compose-dont-reply-to-self t
mu4e-compose-signature t
mu4e-compose-format-flowed t)
(setq mu4e-view-scroll-to-next nil
(setq mu4e-view-use-gnus t
mu4e-view-scroll-to-next nil
mu4e-view-show-images t
mu4e-view-show-addresses t)
(setq mu4e-headers-include-related nil
......@@ -996,10 +1039,9 @@ You may find other key bindings inside use-package statements."
'(((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 "(flag:flagged AND " semente-mu4e-inbox-expr ") OR (NOT flag:list AND "
semente-mu4e-inbox-expr ")") "Important messages" ?x)
("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))
semente-mu4e-inbox-expr ")") "Important messages" ?i)
("flag:list AND NOT (flag:trashed OR m:/archive OR m:/spam)" "Mailing lists" ?l)
("date:7d..now AND NOT m:/spam" "Last 7 days" ?7))
mu4e-sent-messages-behavior
(lambda ()
"Don't save sent messages for certain services
......@@ -1048,6 +1090,20 @@ even if you aren't using their client."
(local-set-key (kbd "<tab>") 'shr-next-link)
(local-set-key (kbd "<backtab>") 'shr-previous-link)))))
(use-package mu4e-alert
:ensure t
:config
(setq mu4e-alert-email-notification-types '(count)
mu4e-alert-set-window-urgency nil
mu4e-alert-interesting-mail-query
"(maildir:/inbox AND flag:unread AND date:today..now AND NOT flag:list)")
(mu4e-alert-enable-notifications)
(mu4e-alert-set-default-style 'libnotify)
;; display stuff on modeline as well as notify
;;(add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display)
(add-hook 'after-init-hook #'mu4e-alert-enable-notifications))
(use-package message
:defer
:init
......@@ -1089,10 +1145,7 @@ even if you aren't using their client."
"Experimental customizations"
;; http://www.emacswiki.org/emacs/ElectricHelp
(use-package ehelp
:bind (("C-h" . ehelp-command)
([help] . ehelp-command))))
(setq help-window-select t))
......