*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 2 Apr 1997 12:15:31 +0000 (12:15 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 2 Apr 1997 12:15:31 +0000 (12:15 +0000)
14 files changed:
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-score.el
lisp/gnus-start.el
lisp/gnus-sum.el
lisp/gnus-topic.el
lisp/gnus-xmas.el
lisp/gnus.el
lisp/message.el
lisp/nnmh.el
texi/ChangeLog
texi/gnus.texi
texi/message.texi
todo

index 8166183..a890992 100644 (file)
@@ -1,3 +1,36 @@
+Wed Apr  2 14:12:45 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+       * gnus.el: Gnus v5.4.40 is released.
+
+Wed Apr  2 13:17:16 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * gnus-start.el (gnus-check-bogus-newsgroups): Supply a help
+       param. 
+       
+       * message.el (message-bounce): Remove the right portion of
+       "simple" bounces.
+
+       * gnus-art.el (gnus-read-save-file-name): Would bug out when
+       saving multiple articles.
+
+       * gnus-sum.el (gnus-summary-update-article-line): Insert the
+       correct subject.
+
+Tue Apr  1 11:21:48 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * gnus-score.el (gnus-score-find-hierarchical): Translate file
+       chars. 
+
+       * gnus-topic.el (gnus-topic-goto-missing-topic): Bugola.
+       (gnus-topic-forward-topic): New function.
+       (gnus-topic-goto-missing-topic): Use it.
+
+       * nnmh.el (nnmh-active-number): Make sure the directory exist.
+       (nnmh-request-accept-article): Bizarre problem.
+
+       * gnus-topic.el (gnus-topic-goto-missing-group): Don't double
+       topics. 
+
 Mon Mar 31 17:30:10 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
        * gnus.el: Gnus v5.4.39 is released.
index 75bf8b0..2826fbb 100644 (file)
@@ -1398,14 +1398,16 @@ This format is defined by the `gnus-article-time-format' variable."
 
 (defun gnus-read-save-file-name (prompt &optional filename
                                        function group headers variable)
-  (let ((default-name (funcall function group headers
-                              (symbol-value variable)))
+  (let ((default-name
+         (funcall function group headers (symbol-value variable)))
        result)
     (setq
      result
      (cond
       ((eq filename 'default)
        default-name)
+      ((eq filename t)
+       default-name)
       (filename filename)
       (t
        (let* ((split-name (gnus-get-split-value gnus-split-methods))
index bfa4f40..73e84c4 100644 (file)
@@ -2502,8 +2502,9 @@ This includes the score file for the group and all its parents."
        all
       (mapcar
        (lambda (file)
-        (concat (file-name-directory file) prefix
-                (file-name-nondirectory file)))
+        (nnheader-translate-file-chars
+         (concat (file-name-directory file) prefix
+                 (file-name-nondirectory file))))
        all))))
 
 (defun gnus-score-file-rank (file)
index c679ff5..312c19d 100644 (file)
@@ -1243,7 +1243,7 @@ newsgroup."
             (when (setq entry (gnus-gethash group gnus-newsrc-hashtb))
               (gnus-group-change-level entry gnus-level-killed)
               (setq gnus-killed-list (delete group gnus-killed-list))))
-          bogus)
+          bogus '("group" "groups" "remove"))
        (while (setq group (pop bogus))
          ;; Remove all bogus subscribed groups by first killing them, and
          ;; then removing them from the list of killed groups.
index 3f62f31..193a62d 100644 (file)
@@ -2193,8 +2193,8 @@ This is all marks except unread, ticked, dormant, and expirable."
   ;; We start from the standard display table, if any.
   (let ((table (or (copy-sequence standard-display-table)
                   (make-display-table)))
-       ;; Nix out all the control chars...
        (i 32))
+    ;; Nix out all the control chars...
     (while (>= (setq i (1- i)) 0)
       (aset table i [??]))
     ;; ... but not newline and cr, of course.  (cr is necessary for the
@@ -2205,8 +2205,8 @@ This is all marks except unread, ticked, dormant, and expirable."
     (let ((i 256))
       (while (>= (setq i (1- i)) 127)
        ;; Only modify if the entry is nil.
-       (or (aref table i)
-           (aset table i [??]))))
+       (unless (aref table i)
+         (aset table i [??]))))
     (setq buffer-display-table table)))
 
 (defun gnus-summary-setup-buffer (group)
@@ -2948,7 +2948,8 @@ If NO-DISPLAY, don't generate a summary buffer."
                   (gnus-data-find-list
                    article
                    (gnus-data-list t)))))
-             (error ""))
+             ;; Error on the side of excessive subjects.
+             (error (mail-header-subject header)))
            (mail-header-subject header))
           (mail-header-subject header)
         "")
index 27a93dc..de5f453 100644 (file)
@@ -254,6 +254,20 @@ with some simple extensions.
        prev
       (caaadr parentt))))
 
+(defun gnus-topic-forward-topic (num)
+  "Go to the next topic on the same level as the current one."
+  (let* ((topic (gnus-current-topic))
+        (way (if (< num 0) 'gnus-topic-previous-topic
+               'gnus-topic-next-topic))
+        (num (abs num)))
+    (while (and (not (zerop num))
+               (setq topic (funcall way topic)))
+      (when (gnus-topic-goto-topic topic)
+       (decf num)))
+    (unless (zerop num)
+      (goto-char (point-max)))
+    num))
+
 (defun gnus-topic-find-topology (topic &optional topology level remove)
   "Return the topology of TOPIC."
   (unless topology
@@ -557,8 +571,8 @@ articles in the topic and its subtopics."
        (when (gnus-group-goto-group (pop g) t)
          (forward-line 1)
          (setq unfound nil)))
-      (when unfound
-       (gnus-topic-goto-missing-topic topic)
+      (when (and unfound
+                (not (gnus-topic-goto-missing-topic topic)))
        (gnus-topic-insert-topic-line
         topic t t (car (gnus-topic-find-topology topic)) nil 0)))))
 
@@ -571,10 +585,14 @@ articles in the topic and its subtopics."
           (tp (reverse (cddr top))))
       (while (not (equal (caaar tp) topic))
        (setq tp (cdr tp)))
+      (pop tp)
       (while (and tp
-                 (not (gnus-topic-goto-topic (caar (pop tp))))))
-      (unless tp
-       (gnus-topic-goto-missing-topic (cadr top))))))
+                 (not (gnus-topic-goto-topic (caaar tp))))
+       (pop tp))
+      (if tp
+         (gnus-topic-forward-topic 1)
+       (gnus-topic-goto-missing-topic (caadr top))))
+    nil))
 
 (defun gnus-topic-update-topic-line (topic-name &optional reads)
   (let* ((top (gnus-topic-find-topology topic-name))
index 6a26ca6..5e81e6f 100644 (file)
@@ -185,8 +185,8 @@ displayed, no centering will be performed."
   ;; Setup the display table -- like gnus-summary-setup-display-table,
   ;; but done in an XEmacsish way.
   (let ((table (make-display-table))
-       ;; Nix out all the control chars...
        (i 32))
+    ;; Nix out all the control chars...
     (while (>= (setq i (1- i)) 0)
       (aset table i [??]))
     ;; ... but not newline and cr, of course.  (cr is necessary for the
@@ -197,8 +197,8 @@ displayed, no centering will be performed."
     (let ((i 256))
       (while (>= (setq i (1- i)) 127)
        ;; Only modify if the entry is nil.
-       (or (aref table i)
-           (aset table i [??]))))
+       (unless (aref table i)
+         (aset table i [??]))))
     (add-spec-to-specifier current-display-table table (current-buffer) nil)))
 
 (defun gnus-xmas-add-hook (hook function &optional append local)
index 5093a2c..88c68c1 100644 (file)
@@ -226,7 +226,7 @@ is restarted, and sometimes reloaded."
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "5.4.39"
+(defconst gnus-version-number "5.4.40"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
index f24ec5c..f896d01 100644 (file)
@@ -3392,8 +3392,7 @@ you."
             (forward-line 2))
        (and (re-search-forward message-unsent-separator nil t)
             (forward-line 1))
-       (and (search-forward "\n\n" nil t)
-            (re-search-forward "^Return-Path:.*\n" nil t)))
+       (re-search-forward "^Return-Path:.*\n" nil t))
     ;; We remove everything before the bounced mail.
     (delete-region
      (point-min)
index 1023506..608f540 100644 (file)
                 noinsert)))
        (and
         (nnmail-activate 'nnmh)
-        (let ((resu|t (nnmail-article-group 'nnmh-active-number)))
-          (if (and (null result)
+        (let ((res (nnmail-article-group 'nnmh-active-number)))
+          (if (and (null res)
                    (yes-or-no-p "Moved to `junk' group; delete article? "))
               'junk
-            (car (nnmh-save-mail result noinsert))))))
+            (car (nnmh-save-mail res noinsert))))))
     (when (and last nnmail-cache-accepted-message-ids)
       (nnmail-cache-close))))
 
 
 (defun nnmh-active-number (group)
   "Compute the next article number in GROUP."
-  (let ((active (cadr (assoc group nnmh-group-alist))))
+  (let ((active (cadr (assoc group nnmh-group-alist)))
+       (dir (nnmail-group-pathname group nnmh-directory)))
     (unless active
       ;; The group wasn't known to nnmh, so we just create an active
       ;; entry for it.
       (setq active (cons 1 0))
       (push (list group active) nnmh-group-alist)
+      (unless (file-exists-p dir)
+       (make-directory dir))
       ;; Find the highest number in the group.
       (let ((files (sort
                    (mapcar
                     (lambda (f)
                       (string-to-int f))
-                    (directory-files
-                     (nnmail-group-pathname group nnmh-directory)
-                     nil "^[0-9]+$"))
-                    '>)))
+                    (directory-files dir nil "^[0-9]+$"))
+                   '>)))
        (when files
          (setcdr active (car files)))))
     (setcdr active (1+ (cdr active)))
index 003a1c1..735b53b 100644 (file)
@@ -1,3 +1,14 @@
+Wed Apr  2 11:48:44 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * gnus.texi (Sorting): Use total score.
+
+Tue Apr  1 11:44:57 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * gnus.texi (Subscription Methods): Addition.
+       (Group Info): Addition.
+       (Gnus Utility Functions): New.
+       (Thwarting Email Spam): Addition.
+
 Mon Mar 31 16:15:54 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
 
        * message.texi (Various Message Variables): Addition.
index 5d699ff..e0f976a 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Gnus 5.4.39 Manual
+@settitle Gnus 5.4.40 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -287,7 +287,7 @@ into another language, under the above conditions for modified versions.
 @tex
 
 @titlepage
-@title Gnus 5.4.39 Manual
+@title Gnus 5.4.40 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -323,7 +323,7 @@ can be gotten by any nefarious means you can think of---@sc{nntp}, local
 spool or your mbox file.  All at the same time, if you want to push your
 luck.
 
-This manual corresponds to Gnus 5.4.39.
+This manual corresponds to Gnus 5.4.40.
 
 @end ifinfo
 
@@ -641,8 +641,10 @@ Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
 What Gnus does when it encounters a new group is determined by the
 @code{gnus-subscribe-newsgroup-method} variable.
 
-This variable should contain a function.  Some handy pre-fab values
-are:
+This variable should contain a function.  This function will be called
+with the name of the new group as the only parameter.
+
+Some handy pre-fab functions are:
 
 @table @code
 
@@ -4727,7 +4729,7 @@ number, you could do something like:
 (setq gnus-thread-sort-functions 
       '(gnus-thread-sort-by-number
         gnus-thread-sort-by-subject
-        gnus-thread-sort-by-score))
+        gnus-thread-sort-by-total-score))
 @end lisp
 
 The threads that have highest score will be displayed first in the
@@ -13437,7 +13439,7 @@ The biggest problem I have with email spam is that it comes in under
 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and selects the
 mail group, only to find two pyramid schemes, seven advertisements
-``New!  Miracle tonic for growing full, lustrouos hair on your toes!''
+(``New!  Miracle tonic for growing full, lustrouos hair on your toes!'')
 and one mail asking me to repent and find some god.
 
 This is annoying.
@@ -13473,6 +13475,20 @@ This says that all mail to this address is suspect, but if it has a
 header, it's probably ok.  All the rest goes to the @samp{spam} group.
 (This idea probably comes from Tim Pierce.)
 
+In addition, many mail spammers talk directly to your @code{smtp} server
+and do not include your email address explicitly in the @code{To}
+header.  Why they do this is unknown---perhaps it's to thwart this
+twarting scheme?  In any case, this is trivial to deal with---you just
+put anything not addressed to you in the @samp{spam} group by ending
+your fancy split rule in this way:
+
+@lisp
+(
+ ...
+ (to "larsi" "misc")
+ "spam")
+@end lisp
+
 In my experience, this will sort virtually everything into the right
 group.  You still have to check the @samp{spam} group from time to time to
 check for legitimate mail, though.  If you feel like being a good net
@@ -13969,6 +13985,7 @@ Andre Deparade,
 Ulrik Dickow,
 Dave Disser,
 Joev Dubach,
+Michael Welsh Duggan,
 Paul Eggert,
 Michael Ernst,
 Luc Van Eycken,
@@ -14021,6 +14038,7 @@ John McClary Prevost,
 Colin Rafferty,
 Bart Robinson,
 Jason Rumney,
+Dewey M. Sasser,
 Loren Schall,
 Dan Schmidt,
 Ralph Schleicher,
@@ -14029,6 +14047,7 @@ Randal L. Schwartz,
 Danny Siu, 
 Paul D. Smith,
 Jeff Sparkes,
+Toby Speight,
 Michael Sperber,
 Richard Stallman,
 Greg Stark, 
@@ -15035,6 +15054,7 @@ backends (this is written in stone), the format of the score files
 and general method of operations.
 
 @menu 
+* Gnus Utility Functions::   Common functions and variable to use.
 * Backend Interface::        How Gnus communicates with the servers.
 * Score File Syntax::        A BNF definition of the score file standard.
 * Headers::                  How Gnus stores headers internally.
@@ -15045,6 +15065,114 @@ and general method of operations.
 @end menu
 
 
+@node Gnus Utility Functions
+@subsection Gnus Utility Functions
+@cindex Gnus utility functions
+@cindex utility functions
+@cindex functions
+@cindex internal variables
+
+When writing small functions to be run from hooks (and stuff), it's
+vital to have access to the Gnus internal functions and variables.
+Below is a list of the most common ones.
+
+@table @code
+
+@item gnus-newsgroup-name
+@vindex gnus-newsgroup-name
+This variable holds the name of the current newsgroup.
+
+@item gnus-find-method-for-group
+@findex gnus-find-method-for-group
+A function that returns the select method for @var{group}.
+
+@item gnus-group-real-name
+@findex gnus-group-real-name
+Takes a full (prefixed) Gnus group name, and returns the unprefixed
+name.
+
+@item gnus-group-prefixed-name
+@findex gnus-group-prefixed-name
+Takes an unprefixed group name and a select method, and returns the full
+(prefixed) Gnus group name.
+
+@item gnus-get-info
+@findex gnus-get-info
+Return the group info list for @var{group}.
+
+@item gnus-add-current-to-buffer-list
+@findex gnus-add-current-to-buffer-list
+Add the current buffer to the list of buffers to be killed on Gnus
+exit.
+
+@item gnus-continuum-version
+@findex gnus-continuum-version
+Take a Gnus version string as a parameter and returns a floating point
+number.  Earlier versions will always get a lower number than later
+versions.
+
+@item gnus-group-read-only-p
+@findex gnus-group-read-only-p
+Say whether @var{group} is read-only or not.
+
+@item gnus-news-group-p
+@findex gnus-news-group-p
+Say whether @var{group} came from a news backend.
+
+@item gnus-ephemeral-group-p
+@findex gnus-ephemeral-group-p
+Say whether @var{group} is ephemeral or not.
+
+@item gnus-server-to-method
+@findex gnus-server-to-method
+Return the select method corresponding to @var{server}.
+
+@item gnus-server-equal
+@findex gnus-server-equal
+Say whether two virtual servers are equal.
+
+@item gnus-group-native-p
+@findex gnus-group-native-p
+Say whether @var{group} is native or not.
+
+@item gnus-group-secondary-p
+@findex gnus-group-secondary-p
+Say whether @var{group} is secondary or not.
+
+@item gnus-group-foreign-p
+@findex gnus-group-foreign-p
+Say whether @var{group} is foreign or not.
+
+@item group-group-find-parameter
+@findex group-group-find-parameter
+Return the parameter list of @var{group}.  If given a second parameter,
+return the value of that parameter for @var{group}.
+
+@item gnus-group-set-parameter
+@findex gnus-group-set-parameter
+Takes three parameters; @var{group}, @var{parameter} and @var{value}.
+
+@item gnus-narrow-to-body
+@findex gnus-narrow-to-body
+Narrow the current buffer to the body of the article.
+
+@item gnus-check-backend-function
+@findex gnus-check-backend-function
+Takes two parameters, @var{function} and @var{group}.  If the backend
+@var{group} comes from supports @var{function}, return non-@code{nil}.
+
+@lisp
+(gnus-check-backend-function "request-scan" "nnml:misc")
+=> t
+@end lisp
+
+@item gnus-read-method
+@findex gnus-read-method
+Prompt the user for a select method.
+
+@end table
+
+
 @node Backend Interface
 @subsection Backend Interface
 
@@ -16042,6 +16170,67 @@ Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
 in pseudo-BNF.
 
+If you have a Gnus info and want to access the elements, Gnus offers a
+series of macros for getting/setting these elements.
+
+@table @code
+@item gnus-info-group
+@itemx gnus-info-set-group
+@findex gnus-info-group
+@findex gnus-info-set-group
+Get/set the group name.
+
+@item gnus-info-rank
+@itemx gnus-info-set-rank
+@findex gnus-info-rank
+@findex gnus-info-set-rank
+Get/set the group rank.
+
+@item gnus-info-level
+@itemx gnus-info-set-level
+@findex gnus-info-level
+@findex gnus-info-set-level
+Get/set the group level.
+
+@item gnus-info-score
+@itemx gnus-info-set-score
+@findex gnus-info-score
+@findex gnus-info-set-score
+Get/set the group score.
+
+@item gnus-info-read
+@itemx gnus-info-set-read
+@findex gnus-info-read
+@findex gnus-info-set-read
+Get/set the ranges of read articles.
+
+@item gnus-info-marks
+@itemx gnus-info-set-marks
+@findex gnus-info-marks
+@findex gnus-info-set-marks
+Get/set the lists of ranges of marked articles.
+
+@item gnus-info-method
+@itemx gnus-info-set-method
+@findex gnus-info-method
+@findex gnus-info-set-method
+Get/set the group select method.
+
+@item gnus-info-params
+@itemx gnus-info-set-params
+@findex gnus-info-params
+@findex gnus-info-set-params
+Get/set the group parameters.
+@end table
+
+All the getter functions take one parameter---the info list.  The setter
+functions take two parameters---the info list and the new value.
+
+The last three elements in the group info aren't mandatory, so it may be
+necessary to extend the group info before setting the element.  If this
+is necessary, you can just pass on a non-@code{nil} third parameter to
+the three final setter functions to have this happen automatically.
+
 
 @node Emacs/XEmacs Code
 @subsection Emacs/XEmacs Code
index 118b671..5789e2c 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
-@settitle Message 5.4.39 Manual
+@settitle Message 5.4.40 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -39,7 +39,7 @@ into another language, under the above conditions for modified versions.
 @tex
 
 @titlepage
-@title Message 5.4.39 Manual
+@title Message 5.4.40 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -79,7 +79,7 @@ buffers.
 * Key Index::         List of Message mode keys.
 @end menu
 
-This manual corresponds to Message 5.4.39.  Message is distributed with
+This manual corresponds to Message 5.4.40.  Message is distributed with
 the Gnus distribution bearing the same version number as this manual
 has. 
 
diff --git a/todo b/todo
index 0f21cbe..062d96e 100644 (file)
--- a/todo
+++ b/todo
@@ -623,3 +623,6 @@ article numerical order.
 bind to a key.
 
 * sorting by score is wrong when using sparse threads.
+
+* a command to fetch an arbitrary article -- without having to be
+in the summary buffer.