# HG changeset patch # User Oleksandr Gavenko # Date 1368549851 -10800 # Node ID 3fd11f075f60ffb089e4f53d6faef7e4fa412493 # Parent 154ab823d934bfc5ee0a1996c3c3bba506e180c5# Parent 63dd116e3153bc8cd67702074b4f65c8c1f77474 merged diff -r 63dd116e3153 -r 3fd11f075f60 .emacs-my --- a/.emacs-my Wed May 08 12:09:07 2013 +0300 +++ b/.emacs-my Tue May 14 19:44:11 2013 +0300 @@ -753,12 +753,12 @@ (setq iswitchb-use-virtual-buffers t) (setq iswitchb-buffer-ignore '("^ " - "^\*Buffer" - "^\*Completions\*" - "^\*tramp" - "^\*Dired log\*" - "^\*Quail Completions\*" - "^\*Disabled Command\*" + "^\\*Buffer" + "^\\*Completions\\*" + "^\\*tramp" + "^\\*Dired log\\*" + "^\\*Quail Completions\\*" + "^\\*Disabled Command\\*" "^TAGS" )) @@ -1427,8 +1427,8 @@ (flyspell-mode 1)) (add-hook 'message-mode-hook 'my-message-mode-hook) -;; Mark all send message with same domain "Message-Id" to provide for replays -;; to me in followups. +;; Mark all my messages by "common" string in "Message-Id" field to simplify +;; lookup for followups to me. (setq message-user-fqdn "gavenkoa.example.com") ;; Kill message buffer after mail send. You always can use C-c C-s to preserve it. @@ -1484,10 +1484,7 @@ (let ( (gnus-interactive-exit nil) ) (gnus-group-exit) )) -(eval-after-load 'gnus - '(progn - (add-hook 'kill-emacs-hook 'my-kill-gnus) - )) +(eval-after-load 'gnus '(add-hook 'kill-emacs-hook 'my-kill-gnus)) (eval-after-load 'gnus-art '(progn @@ -1583,7 +1580,7 @@ (signature-file "~/.signature")))) (gnus-add-configuration - '(article (vertical 1.0 (group .10 point) (summary .30 point) (article 1.0)))) + '(article (vertical 1.0 (summary .30 point) (article 1.0)))) (setq gnus-summary-display-arrow t) @@ -1647,6 +1644,10 @@ (setq gnus-show-threads t gnus-thread-sort-functions '(gnus-thread-sort-by-date gnus-thread-sort-by-total-score) + gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject + gnus-summary-gather-subject-limit 'fuzzy + gnus-thread-hide-killed t + gnus-thread-ignore-subject t ) ;; gnus-summary-mark-below gnus-summary-default-score gnus-summary-default-high-score gnus-summary-default-low-score @@ -1656,15 +1657,14 @@ gnus-use-scoring t gnus-save-score t gnus-score-expiry-days 60 - gnus-decay-scores t + ;; gnus-decay-scores t gnus-score-decay-constant 3 ) -(setq - gnus-score-interactive-default-score 100 - gnus-summary-mark-below 0 - gnus-summary-expunge-below -40 - gnus-thread-expunge-below -40) +(setq gnus-score-interactive-default-score 100) + +;; These variables are local to each summary buffer and usually set by the +;; score file: gnus-summary-mark-below, gnus-summary-expunge-below, gnus-thread-expunge-below (setq gnus-use-adaptive-scoring t) ;; I use 100 for replay to me and 200 for essential mails, and -50 for bad mails. @@ -1687,6 +1687,21 @@ (add-hook 'message-sent-hook 'gnus-score-followup-thread) )) +(defvar my-gnus-summary-kill-same-subject-min-len 8 + "Minimal length of subject string to ignore this subject.") +(defun my-gnus-summary-kill-same-subject (&optional unmark) + "Add negative scores for all articles with same subject." + (interactive "P") + (when (or (not (integerp unmark)) (< 0 unmark)) + (let ( (subj (gnus-simplify-subject-fuzzy (gnus-summary-article-subject))) ) + (when (<= (length subj) my-gnus-summary-kill-same-subject-min-len) + (gnus-summary-score-entry + "subject" subj + 's (- gnus-score-interactive-default-score) (current-time-string))))) + (gnus-summary-kill-same-subject unmark)) +(eval-after-load 'gnus-sum + '(define-key gnus-summary-mode-map (kbd "C-k") #'my-gnus-summary-kill-same-subject)) + (defun my-gnus-thread-score-function (&rest scores) "If any followup have positive score assign greater available score to thread, else assign lesser available score." diff -r 63dd116e3153 -r 3fd11f075f60 all.SCORE --- a/all.SCORE Wed May 08 12:09:07 2013 +0300 +++ b/all.SCORE Tue May 14 19:44:11 2013 +0300 @@ -1,14 +1,14 @@ ;; -*- mode: emacs-lisp -*- ( ("from" - ("Oleksandr Gavenko" 200 nil s)) - ("from" - ("gavenkoa" 200 nil s)) - ("from" + ("Oleksandr Gavenko" 200 nil s) + ("gavenkoa" 200 nil s) ("Юрий Гавенко" 200 nil s)) + ("message-id" + ("@gavenkoa.example.com" 200 nil s)) ("references" - ("@gavenkoa.example.com" 100) - ("@desktop.home.int" 100)) - (mark-and-expunge -50) - (thread-mark-and-expunge -50) + ("@gavenkoa.example.com" 100 nil s) + ("@desktop.home.int" 100 nil s)) + (mark-and-expunge -20) + (thread-mark-and-expunge -20) )