+Thu May 23 21:06:47 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no>
+
+ * gnus-soup.el (gnus-soup-add-article): Would remove Xrefs from
+ packet.
+
+ * gnus.el (gnus-summary-catchup-to-here): Don't show hidden
+ threads.
+
+ * nnmail.el (nnmail-moved-inboxes): New variable.
+ (nnmail-move-inbox): Use it.
+
+ * gnus-uu.el (gnus-uu-decode-uu): Optional argument.
+
+ * nnbabyl.el (nnbabyl-insert-lines): Don't insert negative Lines
+ headers.
+
+Thu May 23 19:28:15 1996 Lars Magne Ingebrigtsen <larsi@aegir.ifi.uio.no>
+
+ * gnus.el (gnus-summary-insert-pseudos): Would create contiguous
+ mouse-face areas.
+
+ * nnheader-ems.el: New file.
+ (nnheader-xmas-run-at-time): New function.
+ (nnheader-xmas-cancel-timer): Ditto.
+ (nnheader-xmas-insert-file-contents-literally): Moved here.
+
+ * gnus.el (gnus-read-move-group-name): Bind
+ minibuffer-confirm-incomplete.
+
+Thu May 23 15:20:47 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * nntp.el (nntp-request-close): Give the QUIT time to reach the
+ server before closing the connection.
+ (nntp-close-server): Ditto.
+
+ * gnus.el (gnus-summary-exit): Run the exit hook with point on the
+ group being exited.
+
+Thu May 23 15:03:16 1996 <morioka@jaist.ac.jp>
+
+ * gnus.el (gnus-narrow-to-signature): Mimeish new definition.
+
+Thu May 23 15:03:16 1996 Lars Magne Ingebrigtsen <lars@eyesore.no>
+
+ * nnfolder.el (nnfolder-close-group): Don't read the buffer when
+ closing down.
+
+ * gnus.el (gnus-group-exit): Prompt even when the server is down.
+
Wed May 22 21:56:56 1996 Lars Magne Ingebrigtsen <larsi@hler.ifi.uio.no>
+ * gnus.el: September Gnus v0.91 is released.
+
* gnus.el (gnus-setup-news): Slave Gnusii should clear the dribble
buffer.
(t
(setq byte-compile-warnings
'(free-vars unresolved callargs redefine obsolete))))
- (when (or (not (member file '("gnus-xmas.el" "x-easymenu.el"
- "gnus-picon.el" "message-xmas.el")))
+ (when (or (not (member file '("gnus-xmas.el" "gnus-picon.el"
+ "message-xmas.el" "nnheader-ems.el")))
xemacs)
(condition-case ()
(byte-compile-file file)
(when (gnus-request-article-this-buffer
(car articles) gnus-newsgroup-name)
(save-restriction
- (message-narrow-to-headers)
+ (message-narrow-to-head)
(message-remove-header gnus-soup-ignored-headers t))
(gnus-soup-store gnus-soup-directory prefix headers
gnus-soup-encoding-type
;; Commands.
-(defun gnus-uu-decode-uu (n)
+(defun gnus-uu-decode-uu (&optional n)
"Uudecodes the current article."
(interactive "P")
(gnus-uu-decode-with-method 'gnus-uu-uustrip-article n))
gnus-uu-default-dir t))))
(gnus-uu-decode-with-method 'gnus-uu-uustrip-article n dir nil nil t))
-(defun gnus-uu-decode-unshar (n)
+(defun gnus-uu-decode-unshar (&optional n)
"Unshars the current article."
(interactive "P")
(gnus-uu-decode-with-method 'gnus-uu-unshar-article n nil nil 'scan t))
(make-temp-name (concat gnus-uu-work-dir "binhex")))
(gnus-uu-decode-with-method 'gnus-uu-binhex-article n dir))
-(defun gnus-uu-decode-uu-view (n)
+(defun gnus-uu-decode-uu-view (&optional n)
"Uudecodes and views the current article."
(interactive "P")
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(gnus-uu-decode-uu-and-save n dir)))
-(defun gnus-uu-decode-unshar-view (n)
+(defun gnus-uu-decode-unshar-view (&optional n)
"Unshars and views the current article."
(interactive "P")
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
;; Digest and forward articles
-(defun gnus-uu-digest-mail-forward (n &optional post)
+(defun gnus-uu-digest-mail-forward (&optional n post)
"Digests and forwards all articles in this series."
(interactive "P")
(let ((gnus-uu-save-in-digest t)
(kill-buffer buf)
(setq gnus-uu-digest-from-subject nil)))
-(defun gnus-uu-digest-post-forward (n)
+(defun gnus-uu-digest-post-forward (&optional n)
"Digest and forward to a newsgroup."
(interactive "P")
(gnus-uu-digest-mail-forward n t))
(> (gnus-summary-thread-level) level))))
(gnus-summary-position-point))
-(defun gnus-uu-mark-over (score)
+(defun gnus-uu-mark-over (&optional score)
"Mark all articles with a score over SCORE (the prefix.)"
(interactive "P")
(let ((score (gnus-score-default score))
;; All PostScript functions written by Erik Selberg <speed@cs.washington.edu>.
-(defun gnus-uu-decode-postscript (n)
+(defun gnus-uu-decode-postscript (&optional n)
"Gets postscript of the current article."
(interactive "P")
(gnus-uu-decode-with-method 'gnus-uu-decode-postscript-article n))
-(defun gnus-uu-decode-postscript-view (n)
+(defun gnus-uu-decode-postscript-view (&optional n)
"Gets and views the current article."
(interactive "P")
(let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic)))
(if (< emacs-minor-version 14)
(fset 'gnus-set-text-properties 'gnus-xmas-set-text-properties))
- (fset 'nnheader-find-file-noselect 'gnus-xmas-find-file-noselect)
-
(or (boundp 'standard-display-table) (setq standard-display-table nil))
(defvar gnus-mouse-face-prop 'highlight)
`right-toolbar', and `left-toolbar'.")
(defvar gnus-group-toolbar
- '([gnus-group-exit gnus-group-exit t "Exit Gnus"]
- [gnus-group-kill-group gnus-group-kill-group t "Kill group"]
+ '(
[gnus-group-get-new-news gnus-group-get-new-news t "Get new news"]
[gnus-group-get-new-news-this-group
gnus-group-get-new-news-this-group t "Get new news in this group"]
[gnus-group-catchup-current
gnus-group-catchup-current t "Catchup group"]
[gnus-group-describe-group
- gnus-group-describe-group t "Describe group"])
+ gnus-group-describe-group t "Describe group"]
+ [gnus-group-kill-group gnus-group-kill-group t "Kill group"]
+ [gnus-group-exit gnus-group-exit t "Exit Gnus"]
+ )
"The group buffer toolbar.")
(defvar gnus-summary-toolbar
- '([gnus-summary-post-news
+ '(
+ [gnus-summary-post-news
gnus-summary-post-news t "Post an article"]
- [gnus-summary-save-article-file
- gnus-summary-save-article-file t "Save article in file"]
- [gnus-summary-save-article
- gnus-summary-save-article t "Save article"]
- [gnus-summary-reply
- gnus-summary-reply t "Mail a reply"]
- [gnus-summary-reply-with-original
- gnus-summary-reply-with-original t "Mail a reply and yank the original"]
- [gnus-summary-followup
- gnus-summary-followup t "Post a followup"]
[gnus-summary-followup-with-original
gnus-summary-followup-with-original t
"Post a followup and yank the original"]
+ [gnus-summary-followup
+ gnus-summary-followup t "Post a followup"]
+ [gnus-summary-reply-with-original
+ gnus-summary-reply-with-original t "Mail a reply and yank the original"]
+ [gnus-summary-reply
+ gnus-summary-reply t "Mail a reply"]
+ [gnus-summary-caesar-message
+ gnus-summary-caesar-message t "Rot 13"]
[gnus-uu-decode-uu
gnus-uu-decode-uu t "Decode uuencoded articles"]
+ [gnus-summary-save-article-file
+ gnus-summary-save-article-file t "Save article in file"]
+ [gnus-summary-save-article
+ gnus-summary-save-article t "Save article"]
[gnus-uu-post-news
gnus-uu-post-news t "Post an uuencoded article"]
- [gnus-summary-caesar-message
- gnus-summary-caesar-message t "Rot 13"]
[gnus-summary-cancel-article
- gnus-summary-cancel-article t "Cancel article"])
+ gnus-summary-cancel-article t "Cancel article"]
+ )
"The summary buffer toolbar.")
(defvar gnus-summary-mail-toolbar
(set-specifier (symbol-value gnus-use-toolbar)
(cons (current-buffer) bar)))))
-;; Written by Erik Naggum <erik@naggum.no>.
-;; Saved by Steve Baur <steve@miranova.com>.
-(or (fboundp 'insert-file-contents-literally)
-(defun insert-file-contents-literally (filename &optional visit beg end replace)
- "Like `insert-file-contents', q.v., but only reads in the file.
-A buffer may be modified in several ways after reading into the buffer due
-to advanced Emacs features, such as file-name-handlers, format decoding,
-find-file-hooks, etc.
- This function ensures that none of these modifications will take place."
- (let ( ; (file-name-handler-alist nil)
- (format-alist nil)
- (after-insert-file-functions nil)
- (find-buffer-file-type-function
- (if (fboundp 'find-buffer-file-type)
- (symbol-function 'find-buffer-file-type)
- nil)))
- (unwind-protect
- (progn
- (fset 'find-buffer-file-type (lambda (filename) t))
- (insert-file-contents filename visit beg end replace))
- (if find-buffer-file-type-function
- (fset 'find-buffer-file-type find-buffer-file-type-function)
- (fmakunbound 'find-buffer-file-type))))))
-
-(defun gnus-xmas-find-file-noselect (filename &optional nowarn rawfile)
- "Read file FILENAME into a buffer and return the buffer.
-If a buffer exists visiting FILENAME, return that one, but
-verify that the file has not changed since visited or saved.
-The buffer is not selected, just returned to the caller."
- (setq filename
- (abbreviate-file-name
- (expand-file-name filename)))
- (if (file-directory-p filename)
- (if find-file-run-dired
- (dired-noselect filename)
- (error "%s is a directory." filename))
- (let* ((buf (get-file-buffer filename))
- (truename (abbreviate-file-name (file-truename filename)))
- (number (nthcdr 10 (file-attributes truename)))
- ;; Find any buffer for a file which has same truename.
- (other (and (not buf)
- (if (fboundp 'find-buffer-visiting)
- (find-buffer-visiting filename)
- (get-file-buffer filename))))
- error)
- ;; Let user know if there is a buffer with the same truename.
- (if other
- (progn
- (or nowarn
- (string-equal filename (buffer-file-name other))
- (message "%s and %s are the same file"
- filename (buffer-file-name other)))
- ;; Optionally also find that buffer.
- (if (or (and (boundp 'find-file-existing-other-name)
- find-file-existing-other-name)
- find-file-visit-truename)
- (setq buf other))))
- (if buf
- (or nowarn
- (verify-visited-file-modtime buf)
- (cond ((not (file-exists-p filename))
- (error "File %s no longer exists!" filename))
- ((yes-or-no-p
- (if (string= (file-name-nondirectory filename)
- (buffer-name buf))
- (format
- (if (buffer-modified-p buf)
- "File %s changed on disk. Discard your edits? "
- "File %s changed on disk. Reread from disk? ")
- (file-name-nondirectory filename))
- (format
- (if (buffer-modified-p buf)
- "File %s changed on disk. Discard your edits in %s? "
- "File %s changed on disk. Reread from disk into %s? ")
- (file-name-nondirectory filename)
- (buffer-name buf))))
- (save-excursion
- (set-buffer buf)
- (revert-buffer t t)))))
- (save-excursion
-;;; The truename stuff makes this obsolete.
-;;; (let* ((link-name (car (file-attributes filename)))
-;;; (linked-buf (and (stringp link-name)
-;;; (get-file-buffer link-name))))
-;;; (if (bufferp linked-buf)
-;;; (message "Symbolic link to file in buffer %s"
-;;; (buffer-name linked-buf))))
- (setq buf (create-file-buffer filename))
- ;; (set-buffer-major-mode buf)
- (set-buffer buf)
- (erase-buffer)
- (if rawfile
- (condition-case ()
- (insert-file-contents-literally filename t)
- (file-error
- ;; Unconditionally set error
- (setq error t)))
- (condition-case ()
- (insert-file-contents filename t)
- (file-error
- ;; Run find-file-not-found-hooks until one returns non-nil.
- (or t ; (run-hook-with-args-until-success 'find-file-not-found-hooks)
- ;; If they fail too, set error.
- (setq error t)))))
- ;; Find the file's truename, and maybe use that as visited name.
- (setq buffer-file-truename truename)
- (setq buffer-file-number number)
- ;; On VMS, we may want to remember which directory in a search list
- ;; the file was found in.
- (and (eq system-type 'vax-vms)
- (let (logical)
- (if (string-match ":" (file-name-directory filename))
- (setq logical (substring (file-name-directory filename)
- 0 (match-beginning 0))))
- (not (member logical find-file-not-true-dirname-list)))
- (setq buffer-file-name buffer-file-truename))
- (if find-file-visit-truename
- (setq buffer-file-name
- (setq filename
- (expand-file-name buffer-file-truename))))
- ;; Set buffer's default directory to that of the file.
- (setq default-directory (file-name-directory filename))
- ;; Turn off backup files for certain file names. Since
- ;; this is a permanent local, the major mode won't eliminate it.
- (and (not (funcall backup-enable-predicate buffer-file-name))
- (progn
- (make-local-variable 'backup-inhibited)
- (setq backup-inhibited t)))
- (if rawfile
- nil
- (after-find-file error (not nowarn)))))
- buf)))
-
(defun gnus-xmas-mail-strip-quoted-names (address)
"Protect mail-strip-quoted-names from NIL input.
XEmacs compatibility workaround."
"gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
"The mail address of the Gnus maintainers.")
-(defconst gnus-version "September Gnus v0.91"
+(defconst gnus-version "September Gnus v0.92"
"Version number for this version of Gnus.")
(defvar gnus-info-nodes
(buffer-disable-undo (current-buffer))
(setq truncate-lines t)
(setq buffer-read-only t)
+ (make-local-hook 'post-command-hook)
+ (add-hook 'post-command-hook 'gnus-clear-inboxes-moved)
(run-hooks 'gnus-group-mode-hook))
+(defun gnus-clear-inboxes-moved ()
+ (setq nnmail-moved-inboxes nil))
+
(defun gnus-mouse-pick-group (e)
"Enter the group under the mouse pointer."
(interactive "e")
(interactive)
(when
(or noninteractive ;For gnus-batch-kill
- (not (gnus-server-opened gnus-select-method)) ;NNTP connection closed
(not gnus-interactive-exit) ;Without confirmation
gnus-expert-user
(gnus-y-or-n-p "Are you sure you want to quit reading news? "))
;; Make sure where I was, and go to next newsgroup.
(set-buffer gnus-group-buffer)
(unless quit-config
- (gnus-group-jump-to-group group)
- (gnus-group-next-unread-group 1))
+ (gnus-group-jump-to-group group))
(run-hooks 'gnus-summary-exit-hook)
+ (unless quit-config
+ (gnus-group-next-unread-group 1))
(if temporary
nil ;Nothing to do.
;; If we have several article buffers, we kill them at exit.
(interactive "P")
(gnus-set-global-variables)
(save-excursion
- (let ((beg (point)))
- ;; We check that there are unread articles.
- (when (or all (gnus-summary-find-prev))
- (gnus-summary-catchup all t beg))))
+ (gnus-save-hidden-threads
+ (let ((beg (point)))
+ ;; We check that there are unread articles.
+ (when (or all (gnus-summary-find-prev))
+ (gnus-summary-catchup all t beg)))))
(gnus-summary-position-point))
(defun gnus-summary-catchup-all (&optional quietly)
(defun gnus-read-move-group-name (prompt default articles prefix)
"Read a group name."
(let* ((split-name (gnus-get-split-value gnus-move-split-methods))
+ (minibuffer-confirm-incomplete nil) ; XEmacs
group-map
(dum (mapatoms
(lambda (g)
(setq e (point))
(forward-line -1) ; back to `b'
(gnus-add-text-properties
- b e (list 'gnus-number gnus-reffed-article-number
- gnus-mouse-face-prop gnus-mouse-face))
+ b (1- e) (list 'gnus-number gnus-reffed-article-number
+ gnus-mouse-face-prop gnus-mouse-face))
(gnus-data-enter
after-article gnus-reffed-article-number
gnus-unread-mark b (car pslist) 0 (- e b))
(while (looking-at "[ \t]$")
(gnus-delete-line))))))
+(defvar mime::preview/content-list)
+(defvar mime::preview-content-info/point-min)
(defun gnus-narrow-to-signature ()
"Narrow to the signature."
(widen)
- (goto-char (point-max))
- (when (re-search-backward gnus-signature-separator nil t)
- (forward-line 1)
- (when (or (null gnus-signature-limit)
- (and (numberp gnus-signature-limit)
- (< (- (point-max) (point)) gnus-signature-limit))
- (and (gnus-functionp gnus-signature-limit)
- (funcall gnus-signature-limit))
- (and (stringp gnus-signature-limit)
- (not (re-search-forward gnus-signature-limit nil t))))
- (narrow-to-region (point) (point-max))
- t)))
+ (if (and (boundp 'mime::preview/content-list)
+ mime::preview/content-list)
+ (let ((pcinfo (car (last mime::preview/content-list))))
+ (narrow-to-region
+ (funcall (intern "mime::preview-content-info/point-min") pcinfo)
+ (point-max))
+ t)
+ (goto-char (point-max))
+ (when (re-search-backward gnus-signature-separator nil t)
+ (forward-line 1)
+ (when (or (null gnus-signature-limit)
+ (and (numberp gnus-signature-limit)
+ (< (- (point-max) (point)) gnus-signature-limit))
+ (and (gnus-functionp gnus-signature-limit)
+ (funcall gnus-signature-limit))
+ (and (stringp gnus-signature-limit)
+ (not (re-search-forward gnus-signature-limit nil t))))
+ (narrow-to-region (point) (point-max))
+ t))))
(defun gnus-article-check-hidden-text (type arg)
"Return nil if hiding is necessary."
(let (lines chars)
(save-excursion
(goto-char (point-min))
- (if (search-forward "\n\n" nil t)
- (progn
- ;; There may be an EOOH line here...
- (if (looking-at "\\*\\*\\* EOOH \\*\\*\\*")
- (search-forward "\n\n" nil t))
- (setq chars (- (point-max) (point)))
- (setq lines (- (count-lines (point) (point-max)) 1))
- ;; Move back to the end of the headers.
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
- (forward-char -1)
- (save-excursion
- (if (re-search-backward "^Lines: " nil t)
- (delete-region (point) (progn (forward-line 1) (point)))))
- (insert (format "Lines: %d\n" lines))
- chars)))))
+ (when (search-forward "\n\n" nil t)
+ ;; There may be an EOOH line here...
+ (when (looking-at "\\*\\*\\* EOOH \\*\\*\\*")
+ (search-forward "\n\n" nil t))
+ (setq chars (- (point-max) (point))
+ lines (max (- (count-lines (point) (point-max)) 1) 0))
+ ;; Move back to the end of the headers.
+ (goto-char (point-min))
+ (search-forward "\n\n" nil t)
+ (forward-char -1)
+ (save-excursion
+ (when (re-search-backward "^Lines: " nil t)
+ (delete-region (point) (progn (forward-line 1) (point)))))
+ (insert (format "Lines: %d\n" lines))
+ chars))))
(defun nnbabyl-save-mail ()
;; Called narrowed to an article.
;; Author: Scott Byer <byer@mv.us.adobe.com>
;; Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
-;; Keywords: news, mail
+;; Keywords: mail
;; This file is part of GNU Emacs.
;; Make sure we _had_ the group open.
(when (or (assoc group nnfolder-buffer-alist)
(equal group nnfolder-current-group))
- (nnfolder-possibly-change-group group server)
+ (let ((inf (assoc group nnfolder-buffer-alist)))
+ (when inf
+ (when nnfolder-current-group
+ (push (list nnfolder-current-group nnfolder-current-buffer)
+ nnfolder-buffer-alist))
+ (setq nnfolder-buffer-alist
+ (delq inf nnfolder-buffer-alist))
+ (setq nnfolder-current-buffer (cadr inf)
+ nnfolder-current-group (car inf))))
(when (and nnfolder-current-buffer
(buffer-name nnfolder-current-buffer))
(save-excursion
"Concat DIR as directory to FILE."
(concat (file-name-as-directory dir) file))
-(fset 'nnheader-find-file-noselect 'find-file-noselect)
-(fset 'nnheader-insert-raw-file-contents 'insert-file-contents-literally)
-
-(provide 'nnheader)
+(require 'nnheader-ems)
(run-hooks 'nnheader-load-hook)
+(provide 'nnheader)
+
;;; nnheader.el ends here
(defvar nnmail-prepare-save-mail-hook nil
"Hook called before saving mail.")
+(defvar nnmail-moved-inboxes nil
+ "List of inboxes that have been moved.")
+
\f
(defconst nnmail-version "nnmail 1.0"
;; and the actual inbox is /usr/spool/mail/foo/foo.
(file-directory-p inbox))
(setq inbox (expand-file-name (user-login-name) inbox)))
- (if popmail
- (message "Getting mail from post office ...")
- (when (or (and (file-exists-p tofile)
- (/= 0 (nth 7 (file-attributes tofile))))
- (and (file-exists-p inbox)
- (/= 0 (nth 7 (file-attributes inbox)))))
- (message "Getting mail from %s..." inbox)))
- ;; Set TOFILE if have not already done so, and
- ;; rename or copy the file INBOX to TOFILE if and as appropriate.
- (cond ((file-exists-p tofile)
- ;; The crash box exists already.
- t)
- ((and (not popmail)
- (not (file-exists-p inbox)))
- ;; There is no inbox.
- (setq tofile nil))
- ((and (not movemail) (not popmail))
- ;; Try copying. If that fails (perhaps no space),
- ;; rename instead.
- (condition-case nil
- (copy-file inbox tofile nil)
- (error
- ;; Third arg is t so we can replace existing file TOFILE.
- (rename-file inbox tofile t)))
- ;; Make the real inbox file empty.
- ;; Leaving it deleted could cause lossage
- ;; because mailers often won't create the file.
- (condition-case ()
- (write-region (point) (point) inbox)
- (file-error nil)))
- (t
- (unwind-protect
- (save-excursion
- (setq errors (generate-new-buffer " *nnmail loss*"))
- (buffer-disable-undo errors)
- (let ((default-directory "/"))
- (call-process
- (expand-file-name nnmail-movemail-program exec-directory)
- nil errors nil inbox tofile))
- (if (not (buffer-modified-p errors))
- ;; No output => movemail won
- nil
- (set-buffer errors)
- (subst-char-in-region (point-min) (point-max) ?\n ?\ )
- (goto-char (point-max))
- (skip-chars-backward " \t")
- (delete-region (point) (point-max))
- (goto-char (point-min))
- (if (looking-at "movemail: ")
- (delete-region (point-min) (match-end 0)))
- (beep t)
- (message (concat "movemail: "
- (buffer-substring (point-min)
- (point-max))))
- (sit-for 3)
- (setq tofile nil))))))
- (and errors
- (buffer-name errors)
- (kill-buffer errors))
- tofile))
+ (if (member inbox nnmail-moved-inboxes)
+ nil
+ (if popmail
+ (message "Getting mail from post office ...")
+ (when (or (and (file-exists-p tofile)
+ (/= 0 (nth 7 (file-attributes tofile))))
+ (and (file-exists-p inbox)
+ (/= 0 (nth 7 (file-attributes inbox)))))
+ (message "Getting mail from %s..." inbox)))
+ ;; Set TOFILE if have not already done so, and
+ ;; rename or copy the file INBOX to TOFILE if and as appropriate.
+ (cond
+ ((file-exists-p tofile)
+ ;; The crash box exists already.
+ t)
+ ((and (not popmail)
+ (not (file-exists-p inbox)))
+ ;; There is no inbox.
+ (setq tofile nil))
+ ((and (not movemail) (not popmail))
+ ;; Try copying. If that fails (perhaps no space),
+ ;; rename instead.
+ (when (condition-case nil
+ (copy-file inbox tofile nil)
+ (error
+ ;; Third arg is t so we can replace existing file TOFILE.
+ (rename-file inbox tofile t)))
+ (push inbox nnmail-moved-inboxes))
+ ;; Make the real inbox file empty.
+ ;; Leaving it deleted could cause lossage
+ ;; because mailers often won't create the file.
+ (condition-case ()
+ (write-region (point) (point) inbox)
+ (file-error nil)))
+ (t
+ ;; Use movemail.
+ (unwind-protect
+ (save-excursion
+ (setq errors (generate-new-buffer " *nnmail loss*"))
+ (buffer-disable-undo errors)
+ (let ((default-directory "/"))
+ (call-process
+ (expand-file-name nnmail-movemail-program exec-directory)
+ nil errors nil inbox tofile))
+ (if (not (buffer-modified-p errors))
+ ;; No output => movemail won
+ (push tofile nnmail-moved-inboxes)
+ (set-buffer errors)
+ (subst-char-in-region (point-min) (point-max) ?\n ?\ )
+ (goto-char (point-max))
+ (skip-chars-backward " \t")
+ (delete-region (point) (point-max))
+ (goto-char (point-min))
+ (if (looking-at "movemail: ")
+ (delete-region (point-min) (match-end 0)))
+ (beep t)
+ (message (concat "movemail: "
+ (buffer-substring (point-min)
+ (point-max))))
+ (sit-for 3)
+ (setq tofile nil))))))
+ (and errors
+ (buffer-name errors)
+ (kill-buffer errors))
+ tofile)))
(defun nnmail-get-active ()
"Returns an assoc of group names and active ranges.
(goto-char (point-min))
(when (search-forward "\n\n" nil t)
(forward-char -1)
- (if (re-search-backward "^Xref: " nil t)
- (delete-region (match-beginning 0)
- (progn (forward-line 1) (point))))
+ (when (re-search-backward "^Xref: " nil t)
+ (delete-region (match-beginning 0)
+ (progn (forward-line 1) (point))))
(insert (format "Xref: %s" (system-name)))
(while group-alist
(insert (format " %s:%d" (caar group-alist) (cdar group-alist)))
(set-process-sentinel nntp-server-process nil))
;; We cannot send QUIT command unless the process is running.
(when (nntp-server-opened)
- (nntp-send-command nil "QUIT")))
+ (nntp-send-command nil "QUIT")
+ ;; Give the QUIT time to arrive.
+ (sleep-for 1)))
(nntp-close-server-internal server)))
(deffoo nntp-request-close ()
(condition-case ()
(process-send-string proc (concat "QUIT" nntp-end-of-line))
(error nil))
+ ;; Give the QUIT time to reach the server before we close
+ ;; down the process.
+ (sleep-for 1)
(delete-process proc)))
(and nntp-async-buffer
(buffer-name nntp-async-buffer)
"Wait for server RESPONSE after sending CMD and optional ARGS to server."
(let ((timer
(and nntp-command-timeout
- (cond
- ((fboundp 'run-at-time)
- (run-at-time nntp-command-timeout
- nil 'nntp-kill-command
- (nnoo-current-server 'nntp)))
- ((fboundp 'start-itimer)
- ;; Not sure if this will work or not, only one way to
- ;; find out
- (start-itimer "nntp-timeout"
- (lambda ()
- (nntp-kill-command
- (nnoo-current-server 'nntp)))
- nntp-command-timeout nil)))))
+ (nnheader-run-at-time
+ nntp-command-timeout nil 'nntp-kill-command
+ (nnoo-current-server 'nntp))))
(nntp-retry-command t)
result)
(unwind-protect
t))))
result)
(when timer
- (if (fboundp 'run-at-time)
- (cancel-timer timer)
- (delete-itimer timer))))))
+ (nnheader-cancel-timer timer)))))
(defun nntp-kill-command (server)
"Kill and restart the connection to SERVER."
(status nil)
(timer
(and nntp-connection-timeout
- (cond
- ((fboundp 'run-at-time)
- (run-at-time nntp-connection-timeout
- nil 'nntp-kill-connection server))
- ((fboundp 'start-itimer)
- ;; Not sure if this will work or not, only one way to
- ;; find out
- (eval '(start-itimer "nntp-timeout"
- (lambda ()
- (nntp-kill-connection server))
- nntp-connection-timeout nil)))))))
+ (nnheader-run-at-time nntp-connection-timeout
+ nil 'nntp-kill-connection server))))
(save-excursion
(set-buffer nntp-server-buffer)
(setq nntp-status-string "")
(nnheader-report
'nntp (buffer-substring (point-min) (point-max)))))
(when timer
- (if (fboundp 'run-at-time)
- (cancel-timer timer)
- (delete-itimer timer)))
+ (nnheader-cancel-timer timer))
(message "")
(unless status
(nnoo-close-server 'nntp server)
@item gnus-summary-grouplens-line-format
The summary line format used in summary buffers that are GroupLens
enhanced. It accepts the same specs as the normal summary line format
-(@pxref{ Summary Buffer Lines}). The default is
+(@pxref{Summary Buffer Lines}). The default is
@samp{%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n}.
@item grouplens-bbb-host