;;; gnus-sum.el --- summary mode commands for Gnus ;; Copyright (C) 1996 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;;; Code: (require 'gnus-load) (require 'gnus-group) (require 'gnus-spec) (require 'gnus-range) (require 'gnus-int) (require 'gnus-undo) (require 'gnus) (defvar gnus-kill-summary-on-exit t "*If non-nil, kill the summary buffer when you exit from it. If nil, the summary will become a \"*Dead Summary*\" buffer, and it will be killed sometime later.") (defvar gnus-fetch-old-headers nil "*Non-nil means that Gnus will try to build threads by grabbing old headers. If an unread article in the group refers to an older, already read (or just marked as read) article, the old article will not normally be displayed in the Summary buffer. If this variable is non-nil, Gnus will attempt to grab the headers to the old articles, and thereby build complete threads. If it has the value `some', only enough headers to connect otherwise loose threads will be displayed. This variable can also be a number. In that case, no more than that number of old headers will be fetched. The server has to support NOV for any of this to work.") (defvar gnus-summary-make-false-root 'adopt "*nil means that Gnus won't gather loose threads. If the root of a thread has expired or been read in a previous session, the information necessary to build a complete thread has been lost. Instead of having many small sub-threads from this original thread scattered all over the summary buffer, Gnus can gather them. If non-nil, Gnus will try to gather all loose sub-threads from an original thread into one large thread. If this variable is non-nil, it should be one of `none', `adopt', `dummy' or `empty'. If this variable is `none', Gnus will not make a false root, but just present the sub-threads after another. If this variable is `dummy', Gnus will create a dummy root that will have all the sub-threads as children. If this variable is `adopt', Gnus will make one of the \"children\" the parent and mark all the step-children as such. If this variable is `empty', the \"children\" are printed with empty subject fields. (Or rather, they will be printed with a string given by the `gnus-summary-same-subject' variable.)") (defvar gnus-summary-gather-exclude-subject "^ *$\\|^(none)$" "*A regexp to match subjects to be excluded from loose thread gathering. As loose thread gathering is done on subjects only, that means that there can be many false gatherings performed. By rooting out certain common subjects, gathering might become saner.") (defvar gnus-summary-gather-subject-limit nil "*Maximum length of subject comparisons when gathering loose threads. Use nil to compare full subjects. Setting this variable to a low number will help gather threads that have been corrupted by newsreaders chopping off subject lines, but it might also mean that unrelated articles that have subject that happen to begin with the same few characters will be incorrectly gathered. If this variable is `fuzzy', Gnus will use a fuzzy algorithm when comparing subjects.") (defvar gnus-simplify-ignored-prefixes nil "*Regexp, matches for which are removed from subject lines when simplifying fuzzily.") (defvar gnus-build-sparse-threads nil "*If non-nil, fill in the gaps in threads. If `some', only fill in the gaps that are needed to tie loose threads together. If `more', fill in all leaf nodes that Gnus can find. If non-nil and non-`some', fill in all gaps that Gnus manages to guess.") (defvar gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject "Function used for gathering loose threads. There are two pre-defined functions: `gnus-gather-threads-by-subject', which only takes Subjects into consideration; and `gnus-gather-threads-by-references', which compared the References headers of the articles to find matches.") ;; Added by Per Abrahamsen . (defvar gnus-summary-same-subject "" "*String indicating that the current article has the same subject as the previous. This variable will only be used if the value of `gnus-summary-make-false-root' is `empty'.") (defvar gnus-summary-goto-unread t "*If non-nil, marking commands will go to the next unread article. If `never', \\\\[gnus-summary-next-page] will go to the next article, whether it is read or not.") (defvar gnus-summary-default-score 0 "*Default article score level. If this variable is nil, scoring will be disabled.") (defvar gnus-summary-zcore-fuzz 0 "*Fuzziness factor for the zcore in the summary buffer. Articles with scores closer than this to `gnus-summary-default-score' will not be marked.") (defvar gnus-simplify-subject-fuzzy-regexp nil "*Strings to be removed when doing fuzzy matches. This can either be a regular expression or list of regular expressions that will be removed from subject strings if fuzzy subject simplification is selected.") (defvar gnus-show-threads t "*If non-nil, display threads in summary mode.") (defvar gnus-thread-hide-subtree nil "*If non-nil, hide all threads initially. If threads are hidden, you have to run the command `gnus-summary-show-thread' by hand or use `gnus-select-article-hook' to expose hidden threads.") (defvar gnus-thread-hide-killed t "*If non-nil, hide killed threads automatically.") (defvar gnus-thread-ignore-subject nil "*If non-nil, ignore subjects and do all threading based on the Reference header. If nil, which is the default, articles that have different subjects from their parents will start separate threads.") (defvar gnus-thread-operation-ignore-subject t "*If non-nil, subjects will be ignored when doing thread commands. This affects commands like `gnus-summary-kill-thread' and `gnus-summary-lower-thread'. If this variable is nil, articles in the same thread with different subjects will not be included in the operation in question. If this variable is `fuzzy', only articles that have subjects that are fuzzily equal will be included.") (defvar gnus-thread-indent-level 4 "*Number that says how much each sub-thread should be indented.") (defvar gnus-auto-extend-newsgroup t "*If non-nil, extend newsgroup forward and backward when requested.") (defvar gnus-auto-select-first t "*If nil, don't select the first unread article when entering a group. If this variable is `best', select the highest-scored unread article in the group. If neither nil nor `best', select the first unread article. If you want to prevent automatic selection of the first unread article in some newsgroups, set the variable to nil in `gnus-select-group-hook'.") (defvar gnus-auto-select-next t "*If non-nil, offer to go to the next group from the end of the previous. If the value is t and the next newsgroup is empty, Gnus will exit summary mode and go back to group mode. If the value is neither nil nor t, Gnus will select the following unread newsgroup. In particular, if the value is the symbol `quietly', the next unread newsgroup will be selected without any confirmation, and if it is `almost-quietly', the next group will be selected without any confirmation if you are located on the last article in the group. Finally, if this variable is `slightly-quietly', the `Z n' command will go to the next group without confirmation.") (defvar gnus-auto-select-same nil "*If non-nil, select the next art