--- a/.emacs-my Tue Mar 26 11:25:33 2013 +0200
+++ b/.emacs-my Sun Apr 21 16:32:08 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"
))
@@ -1416,8 +1416,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.
@@ -1473,10 +1473,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
@@ -1572,7 +1569,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)
@@ -1636,6 +1633,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
@@ -1645,15 +1646,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.
@@ -1676,6 +1676,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."