+1999-12-04 01:14:55 YAMAMOTO Kouji <kouji@pobox.com>
+
+ * nnmail.el (nnmail-split-it): I redefined nnmail-split-fancy's
+ value to divide received mails into my favorite groups and I met
+ an error. It takes place if the length of a element "VALUE" in
+ nnmail-split-fancy is less than two.
+
+1999-10-10 Robert Bihlmeyer <robbe@orcus.priv.at>
+
+ * mml.el (mml-insert-part): New function.
+
+1999-09-29 04:48:14 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lpath.el: Add `sc-cite-regexp'.
+
+1999-12-02 Dave Love <fx@gnu.org>
+
+ * mm-decode.el: Customize.
+
+1999-12-03 Dave Love <fx@gnu.org>
+
+ * nnslashdot.el, nnultimate.el: Don't lose at compile time when
+ the W3 stuff isn't available.
+
+1999-12-03 Dave Love <fx@gnu.org>
+
+ * imap.el, mailcap.el, nnvirtual.el, rfc2104.el: Don't require cl
+ at runtime.
+
+1999-12-04 00:47:35 Dan Christensen <jdc@jhu.edu>
+
+ * gnus-score.el (gnus-score-headers): Fix orphan scoring.
+
+1999-12-01 Andrew Innes <andrewi@gnu.org>
+
+ * nnmbox.el (nnmbox-read-mbox): Count messages correctly, and
+ don't be fooled by "From nobody" lines added by respooling.
+
+ * pop3.el (pop3-movemail): Write crashbox in binary.
+ (pop3-get-message-count): New function.
+
+ * mail-source.el (mail-source-primary-source): New variable.
+ (mail-source-report-new-mail-interval): New variable.
+ (mail-source-idle-time-delay): New variable.
+ (mail-source-new-mail-available): New internal variable.
+ (mail-source-fetch-pop): Clear new mail flag, when mail from
+ primary source has been fetched.
+ (mail-source-check-pop): New function.
+ (mail-source-new-mail-p): New function.
+ (mail-source-start-idle-timer): New function.
+ (mail-source-report-new-mail): New function.
+ (mail-source-report-new-mail): New internal variable.
+ (mail-source-report-new-mail-timer): New internal variable.
+ (mail-source-report-new-mail-idle-timer): New internal variables.
+
+1999-12-04 00:39:34 Andreas Schwab <schwab@suse.de>
+
+ * gnus-cus.el (gnus-group-customize): Customize fix.
+
+1999-12-04 00:38:24 Andrea Arcangeli <andrea@suse.de>
+
+ * message.el (message-send-mail-with-sendmail): Use
+ message-make-address.
+
Fri Dec 3 20:34:11 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v5.8.2 is released.
* message.el (message-send): More helpful error message if sending
fails
+1999-09-06 Robert Bihlmeyer <robbe@orcus.priv.at>
+
+ * gnus-score.el (gnus-summary-increase-score): "Lars" was broken
+ in newer emacsen, where ?r isn't equal 114.
+
Fri Aug 27 13:17:48 1999 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.96 is released.
put something like `(dummy-variable (ding))' in the parameters of that
group. `dummy-variable' will be set to the result of the `(ding)'
form, but who cares?"
- (cons :format "%v" :value (nil . nil)
+ (list :format "%v" :value (nil nil)
(symbol :tag "Variable")
(sexp :tag
"Value")))
;; Deal with der(r)ided superannuated paradigms.
(when (and (eq (1+ prefix) 77)
(eq (+ hchar 12) 109)
- (eq tchar 114)
+ (eq (1- tchar) 113)
(eq (- pchar 4) 111))
(error "You rang?"))
(if mimic
(gnus-message 5 "Scoring...done"))))))
+(defun gnus-score-lower-thread (thread score-adjust)
+ "Lower the socre on THREAD with SCORE-ADJUST.
+THREAD is expected to contain a list of the form `(PARENT [CHILD1
+CHILD2 ...])' where PARENT is a header array and each CHILD is a list
+of the same form as THREAD. The empty list `nil' is valid. For each
+article in the tree, the score of the corresponding entry in
+GNUS-NEWSGROUP-SCORED is adjusted by SCORE-ADJUST."
+ (while thread
+ (let ((head (car thread)))
+ (if (listp head)
+ ;; handle a child and its descendants
+ (gnus-score-lower-thread head score-adjust)
+ ;; handle the parent
+ (let* ((article (mail-header-number head))
+ (score (assq article gnus-newsgroup-scored)))
+ (if score (setcdr score (+ (cdr score) score-adjust))
+ (push (cons article score-adjust) gnus-newsgroup-scored)))))
+ (setq thread (cdr thread))))
-(defun gnus-get-new-thread-ids (articles)
- (let ((index (nth 1 (assoc "message-id" gnus-header-index)))
- (refind gnus-score-index)
- id-list art this tref)
- (while articles
- (setq art (car articles)
- this (aref (car art) index)
- tref (aref (car art) refind)
- articles (cdr articles))
- (when (string-equal tref "") ;no references line
- (push this id-list)))
- id-list))
-
-;; Orphan functions written by plm@atcmp.nl (Peter Mutsaers).
(defun gnus-score-orphans (score)
- (let ((new-thread-ids (gnus-get-new-thread-ids gnus-scores-articles))
- alike articles art arts this last this-id)
-
- (setq gnus-scores-articles (sort gnus-scores-articles 'gnus-score-string<)
- articles gnus-scores-articles)
-
- ;;more or less the same as in gnus-score-string
- (erase-buffer)
- (while articles
- (setq art (car articles)
- this (aref (car art) gnus-score-index)
- articles (cdr articles))
- ;;completely skip if this is empty (not a child, so not an orphan)
- (when (not (string= this ""))
- (if (equal last this)
- ;; O(N*H) cons-cells used here, where H is the number of
- ;; headers.
- (push art alike)
- (when last
- ;; Insert the line, with a text property on the
- ;; terminating newline referring to the articles with
- ;; this line.
- (insert last ?\n)
- (put-text-property (1- (point)) (point) 'articles alike))
- (setq alike (list art)
- last this))))
- (when last ; Bwadr, duplicate code.
- (insert last ?\n)
- (put-text-property (1- (point)) (point) 'articles alike))
-
- ;; PLM: now delete those lines that contain an entry from new-thread-ids
- (while new-thread-ids
- (setq this-id (car new-thread-ids)
- new-thread-ids (cdr new-thread-ids))
- (goto-char (point-min))
- (while (search-forward this-id nil t)
- ;; found a match. remove this line
- (beginning-of-line)
- (kill-line 1)))
-
- ;; now for each line: update its articles with score by moving to
- ;; every end-of-line in the buffer and read the articles property
- (goto-char (point-min))
- (while (eq 0 (progn
- (end-of-line)
- (setq arts (get-text-property (point) 'articles))
- (while arts
- (setq art (car arts)
- arts (cdr arts))
- (setcdr art (+ score (cdr art))))
- (forward-line))))))
-
+ "Score orphans.
+A root is an article with no references. An orphan is an article
+which has references, but is not connected via its references to a
+root article. This function finds all the orphans, and adjusts their
+score in GNUS-NEWSGROUP-SCORED by SCORE."
+ (let ((threads (gnus-make-threads)))
+ ;; gnus-make-threads produces a list, where each entry is a "thread"
+ ;; as described in the gnus-score-lower-thread docs. This function
+ ;; will be called again (after limiting has been done) if the display
+ ;; is threaded. It would be nice to somehow save this info and use
+ ;; it later.
+ (while threads
+ (let* ((thread (car threads))
+ (id (aref (car thread) gnus-score-index)))
+ ;; If the parent of the thread is not a root, lower the score of
+ ;; it and its descendants. Note that some roots seem to satisfy
+ ;; (eq id nil) and some (eq id ""); not sure why.
+ (if (and id (not (string= id "")))
+ (gnus-score-lower-thread thread score)))
+ (setq threads (cdr threads)))))
(defun gnus-score-integer (scores header now expire &optional trace)
(let ((gnus-score-index (nth 1 (assoc header gnus-header-index)))
entries alist)
-
;; Find matches.
(while scores
(setq alist (car scores)
(defun gnus-score-date (scores header now expire &optional trace)
(let ((gnus-score-index (nth 1 (assoc header gnus-header-index)))
entries alist match match-func article)
-
;; Find matches.
(while scores
(setq alist (car scores)
:link '(custom-manual "(gnus)Exiting Gnus")
:group 'gnus)
-(defconst gnus-version-number "5.8.2"
+(defconst gnus-version-number "5.8.3"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Gnus v%s" gnus-version-number)
;;; Code:
+(eval-when-compile (require 'cl))
(eval-and-compile
- (require 'cl)
(autoload 'open-ssl-stream "ssl")
(autoload 'base64-decode-string "base64")
(autoload 'base64-encode-string "base64")
(with-current-buffer (get-buffer-create buffer)
(if (imap-opened buffer)
(imap-close buffer))
- (mapc 'make-variable-buffer-local imap-local-variables)
+ (mapcar 'make-variable-buffer-local imap-local-variables)
(imap-disable-multibyte)
(buffer-disable-undo)
(setq imap-server (or server imap-server))
(when imap-debug ; (untrace-all)
(require 'trace)
(buffer-disable-undo (get-buffer-create imap-debug))
- (mapc (lambda (f) (trace-function-background f imap-debug))
+ (mapcar (lambda (f) (trace-function-background f imap-debug))
'(
imap-read-passwd
imap-utf7-encode
rmail-summary-exists rmail-select-summary
rmail-update-summary url-retrieve
temp-directory babel-fetch babel-wash
- find-coding-systems-for-charsets
- ))
+ find-coding-systems-for-charsets sc-cite-regexp
+ pop3-get-message-count))
(maybe-bind '(global-face-data
mark-active transient-mark-mode mouse-selection-click-count
mouse-selection-click-count-buffer buffer-display-table
w3-meta-charset-content-type-regexp
url-current-callback-func url-current-callback-data
url-be-asynchronous temporary-file-directory
- babel-translations babel-history)))
+ babel-translations babel-history
+ display-time-mail-function)))
(maybe-bind '(mail-mode-hook
enable-multibyte-characters browse-url-browser-function
adaptive-fill-first-line-regexp adaptive-fill-regexp
url-current-mime-headers help-echo-owns-message
w3-meta-content-type-charset-regexp
w3-meta-charset-content-type-regexp
- babel-translations babel-history))
+ babel-translations babel-history
+ display-time-mail-function))
(maybe-fbind '(color-instance-rgb-components temp-directory
glyph-width annotation-glyph window-pixel-width glyph-height
window-pixel-height map-extents
w3-coding-system-for-mime-charset
rmail-summary-exists rmail-select-summary rmail-update-summary
url-generic-parse-url valid-image-instantiator-format-p
- babel-fetch babel-wash babel-as-string)))
+ babel-fetch babel-wash babel-as-string sc-cite-regexp
+ pop3-get-message-count)))
(setq load-path (cons "." load-path))
(require 'custom)
:group 'mail-source
:type 'sexp)
+(defcustom mail-source-primary-source nil
+ "*Primary source for incoming mail.
+If non-nil, this maildrop will be checked periodically for new mail."
+ :group 'mail-source
+ :type 'sexp)
+
(defcustom mail-source-crash-box "~/.emacs-mail-crash-box"
"File where mail will be stored while processing it."
:group 'mail-source
:group 'mail-source
:type 'boolean)
+(defcustom mail-source-report-new-mail-interval 5
+ "Interval in minutes between checks for new mail."
+ :group 'mail-source
+ :type 'number)
+
+(defcustom mail-source-idle-time-delay 5
+ "Number of idle seconds to wait before checking for new mail."
+ :group 'mail-source
+ :type 'number)
+
;;; Internal variables.
(defvar mail-source-string ""
"A dynamically bound string that says what the current mail source is.")
+(defvar mail-source-new-mail-available nil
+ "Flag indicating when new mail is available.")
+
(eval-and-compile
(defvar mail-source-common-keyword-map
'((:plugged))
(push (cons from password) mail-source-password-cache)))
(prog1
(mail-source-callback callback server)
+ ;; Update display-time's mail flag, if relevant.
+ (if (equal source mail-source-primary-source)
+ (setq mail-source-new-mail-available nil))
(mail-source-run-script
postscript
(format-spec-make ?p password ?t mail-source-crash-box
mail-source-password-cache))
0))))
+(defun mail-source-check-pop (source)
+ "Check whether there is new mail."
+ (mail-source-bind (pop source)
+ (let ((from (format "%s:%s:%s" server user port))
+ (mail-source-string (format "pop:%s@%s" user server))
+ result)
+ (when (eq authentication 'password)
+ (setq password
+ (or password
+ (cdr (assoc from mail-source-password-cache))
+ (mail-source-read-passwd
+ (format "Password for %s at %s: " user server))))
+ (unless (assoc from mail-source-password-cache)
+ (push (cons from password) mail-source-password-cache)))
+ (when server
+ (setenv "MAILHOST" server))
+ (setq result
+ (cond
+ ;; No easy way to check whether mail is waiting for these.
+ (program)
+ (function)
+ ;; The default is to use pop3.el.
+ (t
+ (let ((pop3-password password)
+ (pop3-maildrop user)
+ (pop3-mailhost server)
+ (pop3-port port)
+ (pop3-authentication-scheme
+ (if (eq authentication 'apop) 'apop 'pass)))
+ (save-excursion (pop3-get-message-count))))))
+ (if result
+ ;; Inform display-time that we have new mail.
+ (setq mail-source-new-mail-available (> result 0))
+ ;; We nix out the password in case the error
+ ;; was because of a wrong password being given.
+ (setq mail-source-password-cache
+ (delq (assoc from mail-source-password-cache)
+ mail-source-password-cache)))
+ result)))
+
+(defun mail-source-new-mail-p ()
+ "Handler for `display-time' to indicate when new mail is available."
+ ;; Only report flag setting; flag is updated on a different schedule.
+ mail-source-new-mail-available)
+
+
+(defvar mail-source-report-new-mail nil)
+(defvar mail-source-report-new-mail-timer nil)
+(defvar mail-source-report-new-mail-idle-timer nil)
+
+(eval-when-compile (require 'timer))
+
+(defun mail-source-start-idle-timer ()
+ ;; Start our idle timer if necessary, so we delay the check until the
+ ;; user isn't typing.
+ (unless mail-source-report-new-mail-idle-timer
+ (setq mail-source-report-new-mail-idle-timer
+ (run-with-idle-timer
+ mail-source-idle-time-delay
+ nil
+ (lambda ()
+ (setq mail-source-report-new-mail-idle-timer nil)
+ (mail-source-check-pop mail-source-primary-source))))
+ ;; Since idle timers created when Emacs is already in the idle
+ ;; state don't get activated until Emacs _next_ becomes idle, we
+ ;; need to force our timer to be considered active now. We do
+ ;; this by being naughty and poking the timer internals directly
+ ;; (element 0 of the vector is nil if the timer is active).
+ (aset mail-source-report-new-mail-idle-timer 0 nil)))
+
+(defun mail-source-report-new-mail (arg)
+ "Toggle whether to report when new mail is available.
+This only works when `display-time' is enabled."
+ (interactive "P")
+ (if (not mail-source-primary-source)
+ (error "Need to set `mail-source-primary-source' to check for new mail."))
+ (let ((on (if (null arg)
+ (not mail-source-report-new-mail)
+ (> (prefix-numeric-value arg) 0))))
+ (setq mail-source-report-new-mail on)
+ (and mail-source-report-new-mail-timer
+ (cancel-timer mail-source-report-new-mail-timer))
+ (and mail-source-report-new-mail-idle-timer
+ (cancel-timer mail-source-report-new-mail-idle-timer))
+ (setq mail-source-report-new-mail-timer nil)
+ (setq mail-source-report-new-mail-idle-timer nil)
+ (if on
+ (progn
+ (require 'time)
+ (setq display-time-mail-function #'mail-source-new-mail-p)
+ ;; Set up the main timer.
+ (setq mail-source-report-new-mail-timer
+ (run-at-time t (* 60 mail-source-report-new-mail-interval)
+ #'mail-source-start-idle-timer))
+ ;; When you get new mail, clear "Mail" from the mode line.
+ (add-hook 'nnmail-post-get-new-mail-hook
+ 'display-time-event-handler)
+ (message "Mail check enabled"))
+ (setq display-time-mail-function nil)
+ (remove-hook 'nnmail-post-get-new-mail-hook
+ 'display-time-event-handler)
+ (message "Mail check disabled"))))
+
(defun mail-source-fetch-maildir (source callback)
"Fetcher for maildir sources."
(mail-source-bind (maildir source)
;;; Code:
-(eval-and-compile
- (require 'cl))
+(eval-when-compile (require 'cl))
(require 'mail-parse)
(defvar mailcap-parse-args-syntax-table
passed)
(t
;; MUST make a copy *sigh*, else we modify mailcap-mime-data
- (setq viewer (copy-tree viewer))
+ (setq viewer (copy-sequence viewer))
(let ((view (assq 'viewer viewer))
(test (assq 'test viewer)))
(if view (setcdr view (mailcap-unescape-mime-test (cdr view) info)))
;; But some systems are more broken with -f, so
;; we'll let users override this.
(if (null message-sendmail-f-is-evil)
- (list "-f"
- (if (null user-mail-address)
- (user-login-name)
- user-mail-address)))
+ (list "-f" (message-make-address)))
;; These mean "report errors by mail"
;; and "deliver in background".
(if (null message-interactive) '("-oem" "-odb"))
(require 'mailcap)
(require 'mm-bodies)
+(defgroup mime-display ()
+ "Display of MIME in mail and news articles."
+ :link '(custom-manual "(emacs-mime)Customization")
+ :group 'mail
+ :group 'news)
+
;;; Convenience macros.
(defmacro mm-handle-buffer (handle)
`(list ,buffer ,type ,encoding ,undisplayer
,disposition ,description ,cache ,id))
-(defvar mm-inline-media-tests
+(defcustom mm-inline-media-tests
'(("image/jpeg"
mm-inline-image
(lambda (handle)
("multipart/alternative" ignore identity)
("multipart/mixed" ignore identity)
("multipart/related" ignore identity))
- "Alist of media types/test that say whether the media types can be displayed inline.")
+ "Alist of media types/tests saying whether types can be displayed inline."
+ :type '(repeat (list (string :tag "MIME type")
+ (function :tag "Display function")
+ (function :tag "Display test")))
+ :group 'mime-display)
-(defvar mm-inlined-types
+(defcustom mm-inlined-types
'("image/.*" "text/.*" "message/delivery-status" "message/rfc822"
"application/pgp-signature")
- "List of media types that are to be displayed inline.")
+ "List of media types that are to be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
-(defvar mm-automatic-display
+(defcustom mm-automatic-display
'("text/plain" "text/enriched" "text/richtext" "text/html"
"text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
"message/rfc822" "text/x-patch" "application/pgp-signature")
- "A list of MIME types to be displayed automatically.")
-
-(defvar mm-attachment-override-types '("text/x-vcard")
- "Types that should have \"attachment\" ignored if they can be displayed inline.")
-
-(defvar mm-inline-override-types nil
- "Types that should be treated as attachments even if they can be displayed inline.")
-
-(defvar mm-inline-override-types nil
- "Types that should be treated as attachments even if they can be displayed inline.")
-
-(defvar mm-automatic-external-display nil
- "List of MIME type regexps that will be displayed externally automatically.")
-
-(defvar mm-discouraged-alternatives nil
+ "A list of MIME types to be displayed automatically."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-attachment-override-types '("text/x-vcard")
+ "Types to have \"attachment\" ignored if they can be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-inline-override-types nil
+ "Types to be treated as attachments even if they can be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-inline-override-types nil
+ "Types to be treated as attachments even if they can be displayed inline."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-automatic-external-display nil
+ "List of MIME type regexps that will be displayed externally automatically."
+ :type '(repeat string)
+ :group 'mime-display)
+
+(defcustom mm-discouraged-alternatives nil
"List of MIME types that are discouraged when viewing multipart/alternative.
Viewing agents are supposed to view the last possible part of a message,
as that is supposed to be the richest. However, users may prefer other
somewhat unwanted, then the value of this variable should be set
to:
- (\"text/html\" \"text/richtext\")")
+ (\"text/html\" \"text/richtext\")"
+ :type '(repeat string)
+ :group 'mime-display)
(defvar mm-tmp-directory
(cond ((fboundp 'temp-directory) (temp-directory))
("/tmp/"))
"Where mm will store its temporary files.")
-(defvar mm-inline-large-images nil
- "If non-nil, then all images fit in the buffer.")
+(defcustom mm-inline-large-images nil
+ "If non-nil, then all images fit in the buffer."
+ :type 'boolean
+ :group 'mime-display)
;;; Internal variables.
(mml-insert-empty-tag "multipart" 'type type)
(forward-line -1))
+(defun mml-insert-part (&optional type)
+ (interactive
+ (list (mml-minibuffer-read-type "")))
+ (mml-insert-tag 'part 'type type 'disposition "inline")
+ (forward-line -1))
+
(defun mml-preview (&optional raw)
"Display current buffer with Gnus, in a new buffer.
If RAW, don't highlight the article."
partial regexp)
(if (symbolp value)
(setq value (cdr (assq value nnmail-split-abbrev-alist))))
- (if (string= ".*" (substring value 0 2))
+ (if (and (>= (length value) 2)
+ (string= ".*" (substring value 0 2)))
(setq value (substring value 2)
partial ""))
(setq regexp (concat "^\\(\\("
(when (and (re-search-backward
(format "^X-Gnus-Newsgroup: %s:\\([0-9]+\\) "
(caar alist)) nil t)
- (>= (setq number
- (string-to-number
- (buffer-substring
- (match-beginning 1) (match-end 1))))
- (cdadar alist)))
- (setcdr (cadar alist) (1+ number)))
+ (> (setq number
+ (string-to-number
+ (buffer-substring
+ (match-beginning 1) (match-end 1))))
+ (cdadar alist)))
+ (setcdr (cadar alist) number))
(setq alist (cdr alist)))
(goto-char (point-min))
(while (re-search-forward delim nil t)
(setq start (match-beginning 0))
- (when (not (search-forward "\nX-Gnus-Newsgroup: "
- (save-excursion
- (setq end
- (or
- (and
- (re-search-forward delim nil t)
- (match-beginning 0))
- (point-max))))
- t))
+ (unless (search-forward
+ "\nX-Gnus-Newsgroup: "
+ (save-excursion
+ (setq end
+ (or
+ (and
+ ;; skip to end of headers first, since mail
+ ;; which has been respooled has additional
+ ;; "From nobody" lines.
+ (search-forward "\n\n" nil t)
+ (re-search-forward delim nil t)
+ (match-beginning 0))
+ (point-max))))
+ t)
(save-excursion
(save-restriction
(narrow-to-region start end)
(require 'gnus)
(require 'nnmail)
(require 'mm-util)
-(require 'nnweb)
(eval-when-compile
(ignore-errors
- (require 'w3)
- (require 'url)
- (require 'w3-forms)))
+ (require 'nnweb)))
;; Report failure to find w3 at load time if appropriate.
-(eval '(progn
- (require 'w3)
- (require 'url)
- (require 'w3-forms)))
+(eval '(require 'nnweb))
(nnoo-declare nnslashdot)
(require 'gnus)
(require 'nnmail)
(require 'mm-util)
-(require 'nnweb)
(eval-when-compile
(ignore-errors
- (require 'w3)
- (require 'url)
- (require 'w3-forms)))
+ (require 'nnweb)))
;; Report failure to find w3 at load time if appropriate.
-(eval '(progn
- (require 'w3)
- (require 'url)
- (require 'w3-forms)))
+(eval '(require 'nnweb))
(nnoo-declare nnultimate)
(require 'gnus-start)
(require 'gnus-sum)
(require 'gnus-msg)
-(require 'cl)
+(eval-when-compile (require 'cl))
(nnoo-declare nnvirtual)
;; Into all-unreads we put (g unreads).
;; Into all-marks we put (g marks).
;; We also increment cnt and tot here, and compute M (max of sizes).
- (mapc (lambda (g)
+ (mapcar (lambda (g)
(setq active (gnus-activate-group g)
min (car active)
max (cdr active))
(n 1)
message-count
(pop3-password pop3-password)
+ ;; use Unix line endings for crashbox
+ (coding-system-for-write 'binary)
)
;; for debugging only
(if pop3-debug (switch-to-buffer (process-buffer process)))
)
t)
+(defun pop3-get-message-count ()
+ "Return the number of messages in the maildrop."
+ (let* ((process (pop3-open-server pop3-mailhost pop3-port))
+ message-count
+ (pop3-password pop3-password)
+ )
+ ;; for debugging only
+ (if pop3-debug (switch-to-buffer (process-buffer process)))
+ ;; query for password
+ (if (and pop3-password-required (not pop3-password))
+ (setq pop3-password
+ (pop3-read-passwd (format "Password for %s: " pop3-maildrop))))
+ (cond ((equal 'apop pop3-authentication-scheme)
+ (pop3-apop process pop3-maildrop))
+ ((equal 'pass pop3-authentication-scheme)
+ (pop3-user process pop3-maildrop)
+ (pop3-pass process))
+ (t (error "Invalid POP3 authentication scheme.")))
+ (setq message-count (car (pop3-stat process)))
+ (pop3-quit process)
+ message-count))
+
(defun pop3-open-server (mailhost port)
"Open TCP connection to MAILHOST.
Returns the process associated with the connection."
;;; 1998-09-25 renamed from hmac.el to rfc2104.el, also renamed functions
;;; 1999-10-23 included in pgnus
-(require 'cl)
+(eval-when-compile (require 'cl))
;; Magic character for inner HMAC round. 0x36 == 54 == '6'
(defconst rfc2104-ipad ?\x36)