annotate emacs/my-news.el @ 6:a01ff74f9fd7

fix accumulator bug in Lava.__init__
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 25 May 2021 17:20:04 -0400
parents f005daf4488a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 (load "gnus" nil t)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 (setq gnus-nntp-server nil ; override local default
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3 )
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 ;(gnus-server-deny-server "nntp:news") ; no news is good news :-)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6 (setq gnus-use-scoring nil ; not used yet
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 gnus-summary-gather-subject-limit nil
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8 gnus-thread-sort-functions
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 '(gnus-thread-sort-by-number gnus-thread-sort-by-simpl-subject)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10 gnus-article-sort-functions
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 '(gnus-article-sort-by-number
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12 gnus-article-sort-by-subject)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13 gnus-summary-line-format "%U%R%5N%I%(%[%4L: %-12,12A%]%) %s\n"
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 gnus-summary-make-false-root 'none
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15 gnus-simplify-subject-regexp "^\\(re[:;.]\\| \\|fwd:\\)*")
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17 (defsubst gnus-trim-simplify-subject (text)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
18 (if (string-match gnus-simplify-subject-regexp text)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
19 (substring text (match-end 0))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
20 text))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
21
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
22 (defun gnus-thread-sort-by-simpl-subject (h1 h2)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
23 "sort by slightly simplified subject"
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
24 ; (message (format "%s:%s %s:%s" (mail-header-number (gnus-thread-header h1))(mail-header-subject (gnus-thread-header h1))(mail-header-number (gnus-thread-header h2))(mail-header-subject (gnus-thread-header h2))))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
25 (let ((case-fold-search t))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
26 (let ((result
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
27 (string-lessp
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
28 (downcase (gnus-trim-simplify-subject (mail-header-subject
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
29 (gnus-thread-header h1))))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
30 (downcase (gnus-trim-simplify-subject (mail-header-subject
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
31 (gnus-thread-header h2)))))))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
32 ; (message (format " %s\n" result))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
33 result)))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
34
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
35 (defun mark-and-mark (n)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
36 (interactive "p")
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
37 (while (>= n 1)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
38 (gnus-summary-mark-as-read)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
39 (gnus-summary-mark-as-processable 1)
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
40 (setq n (- n 1))))
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
41
f005daf4488a local changes since 2007
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
42 (provide 'my-news)