Mercurial > hg > xemacs
comparison gnus-init.el @ 46:40e245d3d1b3
try to improve use of ht-gnus-just-read
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Wed, 20 Dec 2023 18:00:34 +0000 |
parents | eee08de75336 |
children | 67c04dbeb162 |
comparison
equal
deleted
inserted
replaced
45:65ea96008fe0 | 46:40e245d3d1b3 |
---|---|
126 | 126 |
127 (add-hook 'message-mode-hook 'message-mode-fun1) | 127 (add-hook 'message-mode-hook 'message-mode-fun1) |
128 | 128 |
129 (add-hook 'message-sent-hook (function whiten-recip)) | 129 (add-hook 'message-sent-hook (function whiten-recip)) |
130 | 130 |
131 (defun ht-gnus-pers-refresh (n) | |
132 (interactive "p") | |
133 (let ((gn (concat "nnml+ht:pers-" | |
134 (format-time-string "%Y-%m" (current-time))))) | |
135 (gnus-group-goto-group gn) | |
136 (gnus-group-get-new-news-this-group n) | |
137 (gnus-group-goto-group gn) | |
138 (gnus-group-read-group)) | |
139 ) | |
140 | |
141 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1) | 131 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1) |
142 | 132 |
143 | 133 |
144 (defun gnus-regen-group () | 134 (defun gnus-regen-group () |
145 (nnml-generate-nov-databases-1 (concat | 135 (nnml-generate-nov-databases-1 (concat |
167 (goto-char beg) | 157 (goto-char beg) |
168 (message-fetch-field "To")))))))) | 158 (message-fetch-field "To")))))))) |
169 | 159 |
170 (make-variable-buffer-local 'gnus-extra-headers) | 160 (make-variable-buffer-local 'gnus-extra-headers) |
171 (make-variable-buffer-local 'nnmail-extra-headers) | 161 (make-variable-buffer-local 'nnmail-extra-headers) |
162 | |
172 (add-hook 'gnus-parse-headers-hook | 163 (add-hook 'gnus-parse-headers-hook |
173 '(lambda () | 164 '(lambda () |
174 (gnus-summary-set-local-parameters gnus-newsgroup-name))) | 165 (gnus-summary-set-local-parameters gnus-newsgroup-name))) |
175 | 166 |
167 (defvar ht-gnus-just-read nil) | |
168 | |
176 (add-hook 'gnus-get-new-news-hook (lambda () (setq ht-gnus-just-read nil))) | 169 (add-hook 'gnus-get-new-news-hook (lambda () (setq ht-gnus-just-read nil))) |
177 | 170 |
178 (add-hook 'gnus-after-getting-new-news-hook | 171 (add-hook 'gnus-after-getting-new-news-hook |
179 (lambda () (message "%s" ht-gnus-just-read))) | 172 (lambda () (message "%s" ht-gnus-just-read))) |
180 | |
181 (defvar ht-gnus-just-read nil) | |
182 | 173 |
183 (defun ht-gnus-note-save-to-group () | 174 (defun ht-gnus-note-save-to-group () |
184 (let ((g (caar group-art))) | 175 (let ((g (caar group-art))) |
185 (if (not (member g ht-gnus-just-read)) | 176 (if (not (member g ht-gnus-just-read)) |
186 (setq ht-gnus-just-read (cons g ht-gnus-just-read))))) | 177 (setq ht-gnus-just-read (cons g ht-gnus-just-read))))) |