comparison lisp/gnus/gnus-sum.el @ 34:d620409f5eb8 r19-15b100

Import from CVS: tag r19-15b100
author cvs
date Mon, 13 Aug 2007 08:53:20 +0200
parents e04119814345
children c53a95d3c46d
comparison
equal deleted inserted replaced
33:9ee3cade837d 34:d620409f5eb8
124 :type '(choice (const :tag "off" nil) 124 :type '(choice (const :tag "off" nil)
125 (const some) 125 (const some)
126 (const more) 126 (const more)
127 (sexp :menu-tag "all" t))) 127 (sexp :menu-tag "all" t)))
128 128
129 (defcustom gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject 129 (defcustom gnus-summary-thread-gathering-function
130 'gnus-gather-threads-by-subject
130 "Function used for gathering loose threads. 131 "Function used for gathering loose threads.
131 There are two pre-defined functions: `gnus-gather-threads-by-subject', 132 There are two pre-defined functions: `gnus-gather-threads-by-subject',
132 which only takes Subjects into consideration; and 133 which only takes Subjects into consideration; and
133 `gnus-gather-threads-by-references', which compared the References 134 `gnus-gather-threads-by-references', which compared the References
134 headers of the articles to find matches." 135 headers of the articles to find matches."
3817 (info (gnus-get-info gnus-newsgroup-name)) 3818 (info (gnus-get-info gnus-newsgroup-name))
3818 (uncompressed '(score bookmark killed)) 3819 (uncompressed '(score bookmark killed))
3819 type list newmarked symbol) 3820 type list newmarked symbol)
3820 (when info 3821 (when info
3821 ;; Add all marks lists that are non-nil to the list of marks lists. 3822 ;; Add all marks lists that are non-nil to the list of marks lists.
3822 (while types 3823 (while (setq type (pop types))
3823 (setq type (pop types))
3824 (when (setq list (symbol-value 3824 (when (setq list (symbol-value
3825 (setq symbol 3825 (setq symbol
3826 (intern (format "gnus-newsgroup-%s" 3826 (intern (format "gnus-newsgroup-%s"
3827 (car type)))))) 3827 (car type))))))
3828
3829 ;; Get rid of the entries of the articles that have the
3830 ;; default score.
3831 (when (and (eq (cdr type) 'score)
3832 gnus-save-score
3833 list)
3834 (let* ((arts list)
3835 (prev (cons nil articles))
3836 (all prev))
3837 (while arts
3838 (if (or (not (consp (car arts)))
3839 (= (cdar arts) gnus-summary-default-score))
3840 (setcdr prev (cdr arts))
3841 (setq prev arts))
3842 (setq arts (cdr arts)))
3843 (setq list (cdr all))))
3844
3828 (push (cons (cdr type) 3845 (push (cons (cdr type)
3829 (if (memq (cdr type) uncompressed) list 3846 (if (memq (cdr type) uncompressed) list
3830 (gnus-compress-sequence 3847 (gnus-compress-sequence
3831 (set symbol (sort list '<)) t))) 3848 (set symbol (sort list '<)) t)))
3832 newmarked))) 3849 newmarked)))
3970 (<= (gnus-info-level info) gnus-level-subscribed)) 3987 (<= (gnus-info-level info) gnus-level-subscribed))
3971 (gnus-group-make-articles-read name idlist)))) 3988 (gnus-group-make-articles-read name idlist))))
3972 xref-hashtb))))) 3989 xref-hashtb)))))
3973 3990
3974 (defun gnus-group-make-articles-read (group articles) 3991 (defun gnus-group-make-articles-read (group articles)
3975 "Update the info of GROUP to say that only ARTICLES are unread." 3992 "Update the info of GROUP to say that ARTICLES are read."
3976 (let* ((num 0) 3993 (let* ((num 0)
3977 (entry (gnus-gethash group gnus-newsrc-hashtb)) 3994 (entry (gnus-gethash group gnus-newsrc-hashtb))
3978 (info (nth 2 entry)) 3995 (info (nth 2 entry))
3979 (active (gnus-active group)) 3996 (active (gnus-active group))
3980 range) 3997 range)
4102 (if (search-forward "\ndate: " nil t) 4119 (if (search-forward "\ndate: " nil t)
4103 (nnheader-header-value) "")) 4120 (nnheader-header-value) ""))
4104 ;; Message-ID. 4121 ;; Message-ID.
4105 (progn 4122 (progn
4106 (goto-char p) 4123 (goto-char p)
4107 (setq id (if (search-forward "\nmessage-id: " nil t) 4124 (setq id (if (search-forward "\nmessage-id:" nil t)
4108 (nnheader-header-value) 4125 (buffer-substring
4126 (1- (or (search-forward "<" nil t) (point)))
4127 (or (search-forward ">" nil t) (point)))
4109 ;; If there was no message-id, we just fake one 4128 ;; If there was no message-id, we just fake one
4110 ;; to make subsequent routines simpler. 4129 ;; to make subsequent routines simpler.
4111 (nnheader-generate-fake-message-id)))) 4130 (nnheader-generate-fake-message-id))))
4112 ;; References. 4131 ;; References.
4113 (progn 4132 (progn
8342 (defun gnus-execute-command (command &optional automatic) 8361 (defun gnus-execute-command (command &optional automatic)
8343 (save-excursion 8362 (save-excursion
8344 (gnus-article-setup-buffer) 8363 (gnus-article-setup-buffer)
8345 (set-buffer gnus-article-buffer) 8364 (set-buffer gnus-article-buffer)
8346 (setq buffer-read-only nil) 8365 (setq buffer-read-only nil)
8347 (let ((command (if automatic command (read-string "Command: " command))) 8366 (let ((command (if automatic command (read-string "Command: " command))))
8348 ;; Just binding this here doesn't help, because there might
8349 ;; be output from the process after exiting the scope of
8350 ;; this `let'.
8351 ;; (buffer-read-only nil)
8352 )
8353 (erase-buffer) 8367 (erase-buffer)
8354 (insert "$ " command "\n\n") 8368 (insert "$ " command "\n\n")
8355 (if gnus-view-pseudo-asynchronously 8369 (if gnus-view-pseudo-asynchronously
8356 (start-process "gnus-execute" nil shell-file-name 8370 (start-process "gnus-execute" (current-buffer) shell-file-name
8357 shell-command-switch command) 8371 shell-command-switch command)
8358 (call-process shell-file-name nil t nil 8372 (call-process shell-file-name nil t nil
8359 shell-command-switch command))))) 8373 shell-command-switch command)))))
8360 8374
8361 ;; Summary kill commands. 8375 ;; Summary kill commands.