diff options
author | jao <jao@gnu.org> | 2021-07-01 16:38:23 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-07-01 16:38:23 +0100 |
commit | fcd76f37e9d5f6004830e9dabbc91c96506b90d3 (patch) | |
tree | 8fb9e8eb9c2c308ba3e084cea94b5561663ea525 | |
parent | d79d85fe3f844cd2c15379f277a6887f02184dc9 (diff) | |
download | elibs-fcd76f37e9d5f6004830e9dabbc91c96506b90d3.tar.gz elibs-fcd76f37e9d5f6004830e9dabbc91c96506b90d3.tar.bz2 |
gnus: improved geometry specification
-rw-r--r-- | gnus.org | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -63,6 +63,8 @@ #+begin_src emacs-lisp ;;; geometry: (defvar jao-gnus-use-three-panes t) + (defvar jao-gnus-groups-width 60) + (defvar jao-gnus-wide-width 190) (setq gnus-use-trees nil gnus-generate-tree-function 'gnus-generate-horizontal-tree @@ -73,12 +75,14 @@ ("inbox.org" 0.4) ("*Org Agenda*" 1.0) ("*Calendar*" 8))) - (wide-len 190)) + (wide-len jao-gnus-wide-width) + (groups-len jao-gnus-groups-width) + (summary-len (- jao-gnus-wide-width jao-gnus-groups-width))) (gnus-add-configuration `(article (horizontal 1.0 - (vertical 60 (group 1.0)) - (vertical 130 + (vertical ,groups-len (group 1.0)) + (vertical ,summary-len (summary 0.25 point) (article 1.0)) ,side-bar))) @@ -95,14 +99,14 @@ (gnus-add-configuration `(summary (horizontal 1.0 - (vertical 60 (group 1.0)) - (vertical 130 (summary 1.0 point)) + (vertical ,groups-len (group 1.0)) + (vertical ,summary-len (summary 1.0 point)) ,side-bar))) (gnus-add-configuration `(reply (horizontal 1.0 - (message 90 point) + (message ,(- wide-len 100) point) (article 100) ,side-bar))))) #+end_src @@ -189,6 +193,8 @@ '(nnmaildir "feeds" (directory "~/var/mail/feeds/") ,(jao-gnus-search-engine 'gnus-search-notmuch)))) + (add-to-list 'gnus-secondary-select-methods '(nndiary "diary")) + #+end_src * Demons and notifications #+begin_src emacs-lisp @@ -435,7 +441,7 @@ #+end_src * Summary buffer *** Configuration, summary line - #+BEGIN_SRC emacs-lisp + #+begin_src emacs-lisp (setq gnus-summary-ignore-duplicates t gnus-suppress-duplicates t gnus-summary-ignored-from-addresses jao-mails-regexp @@ -461,12 +467,12 @@ "\n")) (defun jao-gnus--set-summary-line (&optional w) - (let* ((d (if jao-gnus-use-three-panes 75 12)) + (let* ((d (if jao-gnus-use-three-panes (+ jao-gnus-groups-width 11) 12)) (w (- (or w (window-width)) d))) (setq gnus-summary-line-format (format jao-gnus--summary-line-fmt w)))) - ;; (add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) - (jao-gnus--set-summary-line 190) + (add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line) + ;; (jao-gnus--set-summary-line 187) (defun jao-gnus--maybe-reselect (&rest _i) (when (string-match-p "^nnselect" (or (gnus-group-name-at-point) "")) @@ -490,17 +496,15 @@ "¬" ;; "~" " ")))) - (setq gnus-summary-user-date-format-alist + (setq gnus-user-date-format-alist '(((gnus-seconds-today) . "%H:%M") ((+ 86400 (gnus-seconds-today)) . "'%H:%M") - ;; (604800 . "%a %H:%M") ;;that's one week + ;; (604800 . "%a %H:%M") ;; that's one week ((gnus-seconds-month) . "%a %d") ((gnus-seconds-year) . "%b %d") (t . "%b '%y"))) - ;; old name, for emacs 23 - (setq gnus-user-date-format-alist gnus-summary-user-date-format-alist) - #+END_SRC + #+end_src *** Moving messages around #+BEGIN_SRC emacs-lisp (defvar-local jao-gnus--spam-group nil) |