+Wed Jun 7 15:04:20 1995 Lars Magne Ingebrigtsen <larsi@gymir.ifi.uio.no>
+
+ * gnus.el (gnus-select-newsgroup): Don't add an extra 1 if there
+ already is one.
+ (gnus-summary-reselect-current-group): Did not allow reselecting.
+
+ * nndoc.el (nndoc-retrieve-headers): Would fetch headers
+ strangely.
+
+ * gnus.el (gnus-summary-search-subject): Don't bug out on
+ psedu-articles.
+ (gnus-score-score-files): Use file-exists instead of
+ file-readable because of os/2 bug.
+ (gnus-select-newsgroup): Didn't remove the first fetched article
+ when not using nov.
+
+Wed Jun 7 12:59:46 1995 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.el (gnus-configure-windows): Also make the selected buffer
+ in the selected window the current buffer.
+
+Mon Jun 5 23:04:27 1995 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * nntp.el: Anchor all lines with \n instead of $.
+
+Sun Jun 4 17:03:38 1995 Lars Ingebrigtsen <lars@eyesore.no>
+
+ * gnus.el (gnus-summary-remove-lines-marked-with): Unbalanced
+ parens.
+
Sun Jun 4 00:48:38 1995 Lars Ingebrigtsen <lars@eyesore.no>
* gnus.el (gnus-group-catchup): Would not properly catchup all
* nndoc.el (nndoc-number-of-articles): Would totally bug out on
mbox types.
+ * gnus.el: 0.82 is released.
+
Sat Jun 3 00:27:41 1995 Lars Ingebrigtsen <lars@eyesore.no>
* gnus.el (gnus-summary-sort): Re-send async info after sorting.
(interactive)
(gnus-summary-mail-forward t))
+(defvar gnus-nastygram-message
+ "The following article was inappropriately posted to %s.\n"
+ "Format string to insert in nastygrams.
+The current group name will be inserted at \"%s\".")
+
+(defun gnus-summary-mail-nastygram (n)
+ "Send a nastygram to the author of the current article."
+ (interactive "P")
+ (if (or gnus-expert-user
+ (gnus-y-or-n-p
+ "Really send a nastygram to the author of the current article? "))
+ (let ((group gnus-newsgroup-name))
+ (gnus-summary-reply-with-original n)
+ (set-buffer "*mail*")
+ (insert (format gnus-nastygram-message group))
+ (gnus-mail-send-and-exit))))
+
(defun gnus-summary-mail-other-window ()
"Compose mail in other window.
Customize the variable `gnus-mail-other-window-method' to use another
(setq match (funcall (car (car elem)) headers))
(gnus-summary-score-entry
(nth 1 (car elem)) match
- ;; Whether we use regexp or exact matches are controlled
+ ;; Whether we use substring or exact matches are controlled
;; here.
(if (or (not gnus-score-exact-adapt-limit)
(< (length match) gnus-score-exact-adapt-limit))
(defvar gnus-have-read-active-file nil)
(defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
- "The mail address of the Gnus maintainer.")
+ "The mail address of the Gnus maintainers.")
-(defconst gnus-version "(ding) Gnus v0.82"
+(defconst gnus-version "(ding) Gnus v0.83"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(or jump-buffer (error "Missing `point' in spec for %s" setting))
(select-window (get-buffer-window jump-buffer))
- jump-buffer))
+ (set-buffer jump-buffer)))
(defun gnus-remove-some-windows ()
(let ((buffers gnus-window-to-buffer)
(let ((i 32))
(while (>= (setq i (1- i)) 0)
(aset gnus-summary-display-table i [??])))
- ;; ... but not newline, of course.
+ ;; ... but not newline and cr, of course. (cr is necessary for the
+ ;; selective display).
(aset gnus-summary-display-table ?\n nil)
+ (aset gnus-summary-display-table ?\r nil)
;; We nix out any glyphs over 126 that are not set already.
(let ((i 256))
(while (>= (setq i (1- i)) 127)
(setq gnus-newsgroup-headers
(if (eq 'nov (setq gnus-headers-retrieved-by
(gnus-retrieve-headers
- (if gnus-fetch-old-headers
- (cons 1 articles) articles)
+ (if (and gnus-fetch-old-headers
+ (not (eq 1 (car articles))))
+ (cons 1 articles)
+ articles)
gnus-newsgroup-name)))
(progn
(gnus-get-newsgroup-headers-xover articles))
gnus-fetch-old-headers
gnus-newsgroup-headers
(/= (header-number (car gnus-newsgroup-headers)) (car articles))
- (setq gnus-newsgroup-headers (cdr gnus-newsgroup-headers)))
+ (progn
+ (setcar (symbol-value
+ (intern (header-id (car gnus-newsgroup-headers))
+ gnus-newsgroup-dependencies)) nil)
+ (setq gnus-newsgroup-headers (cdr gnus-newsgroup-headers))))
;; Remove cancelled articles from the list of unread articles.
(setq gnus-newsgroup-unreads
(gnus-set-sorted-intersection
'next-single-property-change))
(beg (point))
(did t)
- pos)
+ pos psubject)
(beginning-of-line)
(and gnus-summary-check-current unread
(eq (get-text-property (point) 'gnus-mark) gnus-unread-mark)
(eq (get-text-property (point) 'gnus-mark)
gnus-unread-mark))
(or (not subject)
- (equal (gnus-simplify-subject-re subject)
- (gnus-simplify-subject-re
- (gnus-summary-subject-string)))))))
+ (and (setq psubject (gnus-summary-subject-string))
+ (equal (gnus-simplify-subject-re subject)
+ (gnus-simplify-subject-re
+ psubject)))))))
(if backward (if (bobp) nil (forward-char -1) t)
(if (eobp) nil (forward-char 1) t)))))
(if did
(gnus-set-global-variables)
(let ((current-subject (gnus-summary-article-number))
(group gnus-newsgroup-name))
- (setq gnus-newsgroup-threads nil)
+ (setq gnus-newsgroup-begin nil)
(gnus-summary-exit t)
;; We have to adjust the point of group mode buffer because the
;; current point was moved to the next unread newsgroup by
(gnus-summary-subject-string)))
()
(forward-line -1)
- (gnus-delete-line))))))
+ (gnus-delete-line)))))
(or (zerop (buffer-size))
(if (eobp)
(gnus-summary-prev-subject 1)
- (gnus-summary-position-cursor)))
+ (gnus-summary-position-cursor))))
(defun gnus-summary-expunge-below (score)
"Remove articles with score less than SCORE."
((eq do-sub 'ignore)
nil)
(t
- (setq groups (1+ groups))
+ (setq groups (1+ groups))
(gnus-sethash group group gnus-killed-hashtb)
(if gnus-subscribe-hierarchical-interactive
(setq new-newsgroups (cons group new-newsgroups))
;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb'
;; and compute how many unread articles there are in each group.
-(defun gnus-get-unread-articles (&optional level)
+(defun gnus-get-unread-articles (&optional level)
(let* ((newsrc (cdr gnus-newsrc-alist))
(conditional level)
(level (or level (1+ gnus-level-subscribed)))
(setq gnus-kill-files-directory
(file-name-as-directory
(or gnus-kill-files-directory "~/News/")))
- ;; If er can't read it, there's no score files.
- (if (not (file-readable-p (expand-file-name gnus-kill-files-directory)))
+ ;; If we can't read it, there are no score files.
+ (if (not (file-exists-p (expand-file-name gnus-kill-files-directory)))
(setq gnus-score-file-list nil)
(if (gnus-use-long-file-name 'not-score)
;; We want long file names.
"^------------------------------*[\n \t]+"
"^------------------------------[\n \t]+"
nil "^ ?$"
- "^------------------------------*[\n \t]+"
- "End of"))
+ "^-----------------------------------------*[\n \t]+"
+ "^End of"))
"Regular expressions for articles of the various types.")
\f
(save-excursion
(set-buffer nntp-server-buffer)
(erase-buffer)
- (let ((prev 1)
+ (let ((prev 2)
article p beg end lines)
(nndoc-possibly-change-buffer newsgroup server)
(if (stringp (car sequence))
(while sequence
(setq article (car sequence))
(set-buffer nndoc-current-buffer)
- (if (not (nndoc-forward-article (- article prev)))
+ (if (not (nndoc-forward-article (max 0 (- article prev))))
()
(setq p (point))
- (setq beg (or (re-search-backward nndoc-article-begin nil t)
+ (setq beg (or (and
+ (re-search-backward nndoc-article-begin nil t)
+ (match-end 0))
(point-min)))
(goto-char p)
(setq lines (count-lines
(set-buffer nntp-server-buffer)
(insert (format "221 %d Article retrieved.\n" article))
- (insert-buffer-substring nndoc-current-buffer beg end)
+ (insert-buffer-substring nndoc-current-buffer beg p)
(goto-char (point-max))
(insert (format "Lines: %d\n" lines))
(insert ".\n"))
(if (looking-at "^[23]")
(while (progn
(goto-char (- (point-max) 3))
- (not (looking-at "^\\.\r?$")))
+ (not (looking-at "^\\.\r?\n")))
(nntp-accept-response)))
(and (numberp nntp-large-newsgroup)
(> number nntp-large-newsgroup)
(if (looking-at "^[23]")
(while (progn
(goto-char (- (point-max) 3))
- (not (looking-at "^\\.\r?$")))
+ (not (looking-at "^\\.\r?\n")))
(nntp-accept-response)))))
;; Now all replies are received. We remove CRs.
(art (or (and (numberp id) (int-to-string id)) id)))
;; If NEmacs, end of message may look like: "\256\215" (".^M")
(prog1
- (nntp-send-command "^\\.\r?$" "ARTICLE" art)
+ (nntp-send-command "^\\.\r?\n" "ARTICLE" art)
(nntp-decode-text)
(and nntp-async-articles (nntp-async-fetch-articles id)))))
(if buffer (set-process-buffer
(prog1
;; If NEmacs, end of message may look like: "\256\215" (".^M")
(nntp-send-command
- "^\\.\r?$" "BODY" (or (and (numberp id) (int-to-string id)) id))
+ "^\\.\r?\n" "BODY" (or (and (numberp id) (int-to-string id)) id))
(nntp-decode-text)))
(defun nntp-request-head (id &optional newsgroup server)
(nntp-possibly-change-server newsgroup server)
(prog1
(nntp-send-command
- "^\\.\r?$" "HEAD" (or (and (numberp id) (int-to-string id)) id))
+ "^\\.\r?\n" "HEAD" (or (and (numberp id) (int-to-string id)) id))
(nntp-decode-text)))
(defun nntp-request-stat (id &optional newsgroup server)
"Request STAT of article ID (message-id or number)."
(nntp-possibly-change-server newsgroup server)
(nntp-send-command
- "^[23].*\r?$" "STAT" (or (and (numberp id) (int-to-string id)) id)))
+ "^[23].*\r?\n" "STAT" (or (and (numberp id) (int-to-string id)) id)))
(defun nntp-request-group (group &optional server dont-check)
"Select GROUP."
- (nntp-send-command "^.*\r?$" "GROUP" group)
+ (nntp-send-command "^.*\r?\n" "GROUP" group)
(save-excursion
(set-buffer nntp-server-buffer)
(goto-char (point-min))
t)))
(defun nntp-list-active-group (group &optional server)
- (nntp-send-command "^.*\r?$" "LIST ACTIVE" group))
+ (nntp-send-command "^.*\r?\n" "LIST ACTIVE" group))
(defun nntp-request-group-description (group &optional server)
"Get description of GROUP."
(if (nntp-possibly-change-server nil server)
(prog1
- (nntp-send-command "^.*\r?$" "XGTITLE" group)
+ (nntp-send-command "^.*\r?\n" "XGTITLE" group)
(nntp-decode-text))))
(defun nntp-close-group (group &optional server)
"List active groups."
(nntp-possibly-change-server nil server)
(prog1
- (nntp-send-command "^\\.\r?$" "LIST")
+ (nntp-send-command "^\\.\r?\n" "LIST")
(nntp-decode-text)))
(defun nntp-request-list-newsgroups (&optional server)
"List groups."
(nntp-possibly-change-server nil server)
(prog1
- (nntp-send-command "^\\.\r?$" "LIST NEWSGROUPS")
+ (nntp-send-command "^\\.\r?\n" "LIST NEWSGROUPS")
(nntp-decode-text)))
(defun nntp-request-newgroups (date &optional server)
(substring
(aref date 3) 3 5) (substring (aref date 3) 6 8))))
(prog1
- (nntp-send-command "^\\.\r?$" "NEWGROUPS" time-string)
+ (nntp-send-command "^\\.\r?\n" "NEWGROUPS" time-string)
(nntp-decode-text))))
(defun nntp-request-list-distributions (&optional server)
"List distributions."
(nntp-possibly-change-server nil server)
(prog1
- (nntp-send-command "^\\.\r?$" "LIST DISTRIBUTIONS")
+ (nntp-send-command "^\\.\r?\n" "LIST DISTRIBUTIONS")
(nntp-decode-text)))
(defun nntp-request-last (&optional newsgroup server)
"Decrease the current article pointer."
(nntp-possibly-change-server newsgroup server)
- (nntp-send-command "^[23].*\r?$" "LAST"))
+ (nntp-send-command "^[23].*\r?\n" "LAST"))
(defun nntp-request-next (&optional newsgroup server)
"Advance the current article pointer."
(nntp-possibly-change-server newsgroup server)
- (nntp-send-command "^[23].*\r?$" "NEXT"))
+ (nntp-send-command "^[23].*\r?\n" "NEXT"))
(defun nntp-request-post (&optional server)
"Post the current buffer."
(nntp-possibly-change-server nil server)
- (if (nntp-send-command "^[23].*\r?$" "POST")
+ (if (nntp-send-command "^[23].*\r?\n" "POST")
(progn
(nntp-encode-text)
(nntp-send-region-to-server (point-min) (point-max))
;; 1.2a NNTP's post command is buggy. "^M" (\r) is not
;; appended to end of the status message.
- (nntp-wait-for-response "^[23].*$"))))
+ (nntp-wait-for-response "^[23].*\n"))))
(defun nntp-request-post-buffer
(post group subject header article-buffer info follow-to respect-poster)
This function is supposed to be called from `nntp-server-opened-hook'.
It will make innd servers spawn an nnrpd process to allow actual article
reading."
- (nntp-send-command "^.*\r?$" "MODE READER"))
+ (nntp-send-command "^.*\r?\n" "MODE READER"))
(defun nntp-send-authinfo ()
"Send the AUTHINFO to the nntp server.
This function is supposed to be called from `nntp-server-opened-hook'.
It will prompt for a password."
- (nntp-send-command "^.*\r?$" "AUTHINFO USER" (user-login-name))
- (nntp-send-command "^.*\r?$" "AUTHINFO PASS" (read-string "NNTP password: ")))
+ (nntp-send-command "^.*\r?\n" "AUTHINFO USER" (user-login-name))
+ (nntp-send-command "^.*\r?\n" "AUTHINFO PASS" (read-string "NNTP password: ")))
(defun nntp-default-sentinel (proc status)
"Default sentinel function for NNTP server process."
;; Delete `.' at end of the buffer (end of text mark).
(goto-char (point-max))
(forward-line -1)
- (if (looking-at "^\\.$")
+ (if (looking-at "^\\.\n")
(delete-region (point) (progn (forward-line 1) (point))))
;; Replace `..' at beginning of line with `.'.
(goto-char (point-min))
(while (progn
(goto-char (point-max))
(forward-line -1)
- (not (looking-at "^\\.\r?$")))
+ (not (looking-at "^\\.\r?\n")))
(nntp-accept-response)))
;; We remove any "." lines and status lines.
(if (stringp nntp-server-xover)
;; If `nntp-server-xover' is a string, then we just send this
;; command. We do not wait for the reply.
- (progn
+ (progn
(nntp-send-strings-to-server nntp-server-xover range)
t)
(let ((commands nntp-xover-commands))
;; `nntp-xover-commands' is a list of possible XOVER commands.
;; We try them all until we get at positive response.
(while (and commands (eq nntp-server-xover 'try))
- (nntp-send-command "^\\.\r?$" (car commands) range)
+ (nntp-send-command "^\\.\r?\n" (car commands) range)
(save-excursion
(set-buffer nntp-server-buffer)
(goto-char (point-min))
(setq nntp-address server)
(setq status
(condition-case nil
- (nntp-wait-for-response "^[23].*\r?$" 'slow)
+ (nntp-wait-for-response "^[23].*\r?\n" 'slow)
(error nil)
(quit nil)))
(or status (nntp-close-server-internal server))