diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/jao-custom-completion.el | 3 | ||||
-rw-r--r-- | custom/jao-custom-exwm.el | 5 | ||||
-rw-r--r-- | custom/jao-custom-gnus.el | 41 |
3 files changed, 27 insertions, 22 deletions
diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el index 34701b3..490fd65 100644 --- a/custom/jao-custom-completion.el +++ b/custom/jao-custom-completion.el @@ -126,8 +126,7 @@ ("M-g e" . consult-error) ("M-s m" . consult-multi-occur) ("M-y" . consult-yank-pop) - ("C-s" . isearch-forward) - ("<help> a" . consult-apropos)) + ("C-s" . isearch-forward)) :custom ((consult-preview-key (kbd "`"))) diff --git a/custom/jao-custom-exwm.el b/custom/jao-custom-exwm.el index e5c67f8..3cb3fc9 100644 --- a/custom/jao-custom-exwm.el +++ b/custom/jao-custom-exwm.el @@ -194,7 +194,9 @@ (defun jao-exwm-switch-to-next-x () (interactive) - (let ((bfs (seq-filter (lambda (b) (buffer-local-value 'exwm-class-name b)) + (let ((bfs (seq-filter (lambda (b) + (with-current-buffer b + (derived-mode-p 'exwm-mode))) (buffer-list (window-frame))))) (when (car bfs) (switch-to-buffer (car (reverse bfs)))))) @@ -530,6 +532,7 @@ ([f9] . jao-bright-show))) ;; (customize-set-variable 'exwm-input-global-keys exwm-input-global-keys) +(exwm-wm-mode) ;;; . (provide 'jao-custom-exwm) diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 32571c0..ce77285 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -212,8 +212,10 @@ (when jao-gnus-use-nnml (add-to-list 'gnus-secondary-select-methods - `(nnml "" (gnus-search-engine gnus-search-recoll - (remove-prefix ,(jao-gnus-dir "Mail/")))))) + ;; `(nnml "" (gnus-search-engine gnus-search-recoll + ;; (remove-prefix ,(jao-gnus-dir "Mail/")))) + `(nnml "" (gnus-search-engine gnus-search-notmuch + (remove-prefix "/home/jao/var/mail/gnus"))))) (when jao-gnus-use-nnml (dolist (p jao-gnus-nnml-group-params) @@ -448,7 +450,8 @@ :config (add-to-list 'org-capture-templates '("x" "arXiv" entry (file "notes/physics/arxiv.org") - "* %(jao-gnus-subject)\n\n %i" :immediate-finish t) + "* %(jao-gnus-subject)\n\n %i\n\n %(jao-gnus-org-url)" + :immediate-finish t) t) (add-to-list 'org-capture-templates '("X" "arXiv" entry (file "notes/physics/arxiv.org") @@ -458,6 +461,7 @@ (org-capture-upgrade-templates org-capture-templates)) (defvar jao-gnus-org-url nil) +(defun jao-gnus-org-url () jao-gnus-org-url) (defun jao-gnus-org-paragraph (x) (with-temp-buffer (insert " " (string-trim (or x "")) "\n ") @@ -475,20 +479,18 @@ (setq jao-gnus-subject (gnus-summary-article-subject)) (gnus-summary-select-article-buffer) (gnus-article-goto-part 0) - (setq-local transient-mark-mode 'lambda) - (set-mark (point)) - (forward-paragraph) - (unless (save-excursion - (when (re-search-forward "^Link" nil t) - (beginning-of-line) - (setq jao-gnus-org-url (org-eww-url-below-point)) - (org-capture nil "X") - t)) - (next-line) + (let ((transient-mark-mode t)) (set-mark (point)) - (end-of-buffer) - (org-capture nil "x")) - (set-mark (point)) + (forward-paragraph) + (or (and (save-excursion + (when (re-search-forward "^Link" nil t) + (beginning-of-line) + (setq jao-gnus-org-url (org-eww-url-below-point)))) + (org-capture nil "X")) + (and (save-excursion + (when (re-search-forward "^URL: " nil t) + (setq jao-gnus-org-url (thing-at-point-url-at-point)))) + (org-capture nil "x")))) (gnus-article-show-summary)) ;;; article @@ -591,7 +593,7 @@ (gnus-summary-select-article-buffer) (save-excursion (goto-char (point-min)) - (let ((offset (or (and (search-forward-regexp "^Enclosure: " nil t) 2) + (let ((offset (or (and (search-forward-regexp "^Enclosure: ?" nil t) 2) (and (search-forward-regexp "^Enclosure$" nil t) -2)))) (when offset (forward-char offset)) (if-let ((url (jao-url-around-point))) @@ -644,13 +646,14 @@ (seq-difference '("feeds.trove"))))) `(("nnml:bigml\\.inbox" "B" jao-themes-f00) ("nnml:bigml\\.alba" "A" jao-themes-f00) + ("nnml:bigml\\.ryou" "R" jao-themes-f00) ("nnml:bigml\\.bugs" "b" jao-themes-error) ("nnml:bigml\\.support" "S" default) + ("nnml:bigml\\.[^aibsr]" "W" jao-themes-dimm) ("nnml:jao\\.\\(inbox\\|trove\\)" "I" jao-themes-f01) - ("nnml:bigml\\.[^aibs]" "W" jao-themes-dimm) ("nnml:jao.hacking" "H" jao-themes-dimm) ("nnml:jao.write" "W" jao-themes-warning) - ("nnml:jao.[^isthw]" "J" jao-themes-dimm) + ("nnml:jao.[^ithw]" "J" jao-themes-dimm) (,(format "^nnml:%s" (regexp-opt feeds)) "F" jao-themes-dimm) ("feeds\\.e" "E" jao-themes-dimm) ("nnml:local" "l" jao-themes-dimm) |