annotate my-news.el @ 9:78b62941da11

*** empty log message ***
author ht
date Sun, 06 May 2007 14:22:37 +0100
parents 5f3a215f12eb
children 7b2c4ed36302
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
1 ;; Last edited: Wed Aug 25 14:10:36 1999
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
2
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
3 ;(site-caseq (edin (require 'ccs-gnus)))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
4
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
5 ; mix-spool stuff
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
6
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
7 (load "gnus" nil t)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
8 ; (debug-on-entry 'gnus-start-news-server)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
9 (setq gnus-nntp-server nil)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
10 ;
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
11
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
12
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
13 (setq gnus-article-save-directory "d:/mail")
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
14
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
15 ;;; fixup clarinews
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
16 ;(autoload 'gnus-clarinews-fun "clari-clean" "Clean ClariNews articles" t)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
17 ;(add-hook 'gnus-article-prepare-hook 'gnus-clarinews-fun)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
18
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
19
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
20 (defun gnus-Subject-sort-by-subject-and-date (reverse)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
21 "Sort subject display buffer by subject alphabetically. `Re:'s are ignored.
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
22 If case-fold-search is non-nil, case of letters is ignored. Date is used
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
23 if subjects are equal
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
24 Argument REVERSE means reverse order."
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
25 (interactive "P")
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
26 (gnus-summary-sort-summary
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
27 (function
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
28 (lambda (a b)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
29 (let ((s-a (gnus-trim-simplify-subject (nntp-header-subject a)))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
30 (s-b (gnus-trim-simplify-subject (nntp-header-subject b)))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
31 )
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
32 (or (gnus-string-lessp s-a s-b)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
33 (and (gnus-string-equal s-a s-b)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
34 (gnus-date-lessp (nntp-header-date a)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
35 (nntp-header-date b)))))))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
36 reverse
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
37 ))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
38
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
39 ;(require 'util-mde) ; for string-replace-regexp-2
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
40 (defun gnus-trim-simplify-subject (text)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
41 "call gnus-simplify-subject and remove leading blanks"
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
42 (if text
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
43 (gnus-simplify-subject
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
44 (string-replace-regexp-2
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
45 (gnus-simplify-subject text t)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
46 "^\\s-+"
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
47 "")
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
48 t)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
49 ""))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
50
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
51 (defun gnus-string-equal (a b)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
52 "Return T if first arg string is equal than second in lexicographic order.
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
53 If case-fold-search is non-nil, case of letters is ignored."
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
54 (if case-fold-search
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
55 (string-equal (downcase a) (downcase b)) (string-equal a b)))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
56
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
57 (defun gnus-Group-update-and-vanish ()
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
58 "update newsrc and restore config pre-group selection"
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
59 (interactive)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
60 (gnus-group-force-update)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
61 (if gnus-pre-config
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
62 (set-window-configuration gnus-pre-config))
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
63 ; (setq gnus-pre-config nil)
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
64 )
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
65
5f3a215f12eb *** empty log message ***
ht
parents:
diff changeset
66 (provide 'my-news)