Function: gnus-score-customize
gnus-score-customize is an autoloaded, interactive and byte-compiled
function defined in gnus-cus.el.gz.
Signature
(gnus-score-customize FILE)
Documentation
Customize score file FILE.
When called interactively, FILE defaults to the current score file.
This can be changed using the M-x gnus-score-change-score-file (gnus-score-change-score-file) command.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-cus.el.gz
(defun gnus-score-customize (file)
"Customize score file FILE.
When called interactively, FILE defaults to the current score file.
This can be changed using the `\\[gnus-score-change-score-file]' command."
(interactive (list gnus-current-score-file) gnus-summary-mode)
(unless file
(error "No score file for %s" gnus-newsgroup-name))
(let ((scores (gnus-score-load file))
(types (mapcar (lambda (entry)
`(group :format "%v%h\n"
:doc ,(nth 2 entry)
(const :format "" ,(nth 0 entry))
,(nth 1 entry)))
gnus-score-parameters)))
;; Ready.
(kill-buffer (gnus-get-buffer-create "*Gnus Customize*"))
(switch-to-buffer (gnus-get-buffer-create "*Gnus Customize*"))
(gnus-custom-mode)
(setq-local gnus-custom-score-alist scores)
(widget-insert "Customize the ")
(widget-create 'info-link
:help-echo "Push me to learn more."
:tag "score entries"
"(gnus)Score File Format")
(widget-insert " for\n\t")
(widget-insert file)
(widget-insert "\nand press ")
(widget-create 'push-button
:tag "done"
:help-echo "Push me when done customizing."
:action 'gnus-score-customize-done)
(widget-insert ".\n
Check the [ ] for the entries you want to apply to this score file, then
edit the value to suit your taste. Don't forget to mark the checkbox,
if you do all your changes will be lost. ")
(widget-insert "\n\n")
(setq-local gnus-custom-scores
(widget-create 'group
:value scores
`(checklist :inline t
:greedy t
(gnus-score-string :tag "From")
(gnus-score-string :tag "Subject")
(gnus-score-string :tag "References")
(gnus-score-string :tag "Xref")
(gnus-score-extra :tag "Extra")
(gnus-score-string :tag "Message-ID")
(gnus-score-integer :tag "Lines")
(gnus-score-integer :tag "Chars")
(gnus-score-date :tag "Date")
(gnus-score-string :tag "Head"
:doc "\
Match all headers in the article.
Using one of `Head', `Body', `All' will slow down scoring considerable.
")
(gnus-score-string :tag "Body"
:doc "\
Match the body sans header of the article.
Using one of `Head', `Body', `All' will slow down scoring considerable.
")
(gnus-score-string :tag "All"
:doc "\
Match the entire article, including both headers and body.
Using one of `Head', `Body', `All' will slow down scoring
considerable.
")
(gnus-score-string :tag
"Followup"
:doc "\
Score all followups to the specified authors.
This entry is somewhat special, in that it will match the `From:'
header, and affect the score of not only the matching articles, but
also all followups to the matching articles. This allows you
e.g. increase the score of followups to your own articles, or decrease
the score of followups to the articles of some known trouble-maker.
")
(gnus-score-string :tag "Thread"
:doc "\
Add a score entry on all articles that are part of a thread.
This match key works along the same lines as the `Followup' match key.
If you say that you want to score on a (sub-)thread that is started by
an article with a `Message-ID' X, then you add a `thread' match. This
will add a new `thread' match for each article that has X in its
`References' header. (These new `thread' matches will use the
`Message-ID's of these matching articles.) This will ensure that you
can raise/lower the score of an entire thread, even though some
articles in the thread may not have complete `References' headers.
Note that using this may lead to nondeterministic scores of the
articles in the thread.
")
,@types)
'(repeat :inline t
:tag "Unknown entries"
sexp)))
(use-local-map widget-keymap)
(widget-setup)))