summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-10-03 02:28:02 +0100
committerjao <jao@gnu.org>2022-10-03 02:33:52 +0100
commit649d6ff53accc4c07f3f771c7354b95c19511aa2 (patch)
treead19073b2225095ccaf48cbb19a5de5ead240152
parent00f4ac1320d5f521e34b280a88eca6709cfff890 (diff)
downloadelibs-649d6ff53accc4c07f3f771c7354b95c19511aa2.tar.gz
elibs-649d6ff53accc4c07f3f771c7354b95c19511aa2.tar.bz2
attic
-rw-r--r--attic/elisp/misc.el25
-rw-r--r--custom/jao-custom-notmuch.el3
-rw-r--r--init.el29
-rw-r--r--lib/net/jao-notmuch.el12
4 files changed, 38 insertions, 31 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el
index 12da196..8ae7ab8 100644
--- a/attic/elisp/misc.el
+++ b/attic/elisp/misc.el
@@ -687,3 +687,28 @@
(unless jao-modeline-in-minibuffer
(add-hook 'jao-afio-switch-hook #'jao-afio--set-mode-line))
+
+;;
+
+(defun jao-word-definition-lookup ()
+ "Look up the word under cursor in a browser."
+ (interactive)
+ (require 'thingatpt)
+ (browse-url
+ (concat "http://www.wordnik.com/words/"
+ ;; "http://www.answers.com/main/ntquery?s="
+ (thing-at-point 'word))))
+
+;;
+
+(defun jao-notmuch-format-author (width msg)
+ (let* ((headers (plist-get msg :headers))
+ (auth (notmuch-tree-clean-address (plist-get headers :From)))
+ (awidth (string-width auth))
+ (auth (if (> awidth width)
+ (substring auth 0 width)
+ (concat auth (make-string (- width awidth) 32))))
+ (face (if (plist-get msg :match)
+ 'notmuch-tree-match-author-face
+ 'notmuch-tree-no-match-author-face)))
+ (propertize auth 'face face)))
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index 731a277..4938e01 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -445,7 +445,8 @@
:init
(setq notmuch-tree-result-format
`(("date" . "%12s ")
- (jao-notmuch-format-author . 25)
+ ("authors" . "%-25s")
+ ;; (jao-notmuch-format-author . 25)
(jao-notmuch-format-msg-ticks . ,jao-mails-regexp)
(jao-notmuch-format-tree-and-subject . "%>-85s")
(jao-notmuch-format-tags . " (%s)"))
diff --git a/init.el b/init.el
index c4b2b1b..5780280 100644
--- a/init.el
+++ b/init.el
@@ -641,10 +641,10 @@
;;;; so-long
(setq large-file-warning-threshold (* 200 1024 1024))
-(use-package so-long
- :ensure t
- :diminish)
-(global-so-long-mode 1)
+;; (use-package so-long
+;; :ensure t
+;; :diminish)
+;; (global-so-long-mode 1)
;;;; persistent scratch
(use-package persistent-scratch
@@ -1125,15 +1125,6 @@
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;;;; dictionaries
-(defun jao-word-definition-lookup ()
- "Look up the word under cursor in a browser."
- (interactive)
- (require 'thingatpt)
- (browse-url
- (concat "http://www.wordnik.com/words/"
- ;; "http://www.answers.com/main/ntquery?s="
- (thing-at-point 'word))))
-
(use-package dictionary
:init (setq dictionary-use-single-buffer t
dictionary-server "localhost")
@@ -2178,7 +2169,7 @@
(defun jao-org--set-geiser-impl () (setq-local geiser-repl--impl 'guile))
(add-hook 'org-mode-hook #'jao-org--set-geiser-impl)
-(jao-load-path "geiser/geiser/elisp")
+(jao-load-path "geiser")
(use-package geiser
:init
(setq geiser-repl-history-filename "~/.emacs.d/cache/geiser-history"
@@ -2188,7 +2179,7 @@
geiser-active-implementations '(guile)
geiser-default-implementation 'guile))
-(jao-load-path "geiser/guile")
+(jao-load-path "geiser-guile")
(use-package geiser-guile)
;; (jao-load-path "geiser/mit")
@@ -2215,6 +2206,8 @@
;;;; Haskell
;;;;; packages
+(jao-load-path "haskell-mode")
+
(use-package haskell-mode
:ensure t
:custom
@@ -2553,6 +2546,7 @@
;;;; ement
(use-package ement
+ :disabled t
:ensure t
:init (setq ement-save-sessions t
ement-sessions-file (locate-user-emacs-file "cache/ement.el")
@@ -2567,8 +2561,7 @@
:config
(defun jao-ement-track (event room session)
- (when (run-hook-with-args-until-success
- 'ement-notify-notification-predicates event room session)
+ (when (ement-notify--room-unread-p event room session)
(when-let ((n (ement-room--buffer-name room))
(b (get-buffer n)))
(tracking-add-buffer b))))
@@ -2584,7 +2577,7 @@
(slack-start))
(when (or p (y-or-n-p "Connect to telegram? "))
(telega))
- (when (or p (y-or-n-p "Connect to matrix? "))
+ (when (and (fboundp 'ement-connect) (or p (y-or-n-p "Connect to matrix? ")))
(unless (get-buffer "*Ement Rooms*")
(jao-with-auth "matrix.org" u p (ement-connect :user-id u :password p))))
(when (or p (y-or-n-p "Connect to libera? "))
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el
index aa82459..48a8ff8 100644
--- a/lib/net/jao-notmuch.el
+++ b/lib/net/jao-notmuch.el
@@ -357,18 +357,6 @@
(seq-sort-by #'length #'<))))
(format-spec fmt `((?s . ,(mapconcat #'identity ts " "))))))
-(defun jao-notmuch-format-author (width msg)
- (let* ((headers (plist-get msg :headers))
- (auth (notmuch-tree-clean-address (plist-get headers :From)))
- (awidth (string-width auth))
- (auth (if (> awidth width)
- (substring auth 0 width)
- (concat auth (make-string (- width awidth) 32))))
- (face (if (plist-get msg :match)
- 'notmuch-tree-match-author-face
- 'notmuch-tree-no-match-author-face)))
- (propertize auth 'face face)))
-
(defun jao-notmuch-format-tree-and-subject (fmt msg)
(let ((tr (notmuch-tree-format-field "tree" " %s" msg))
(sb (notmuch-tree-format-field "subject" " %s" msg)))