;; gnus-ja.texi: The node `Agent and IMAP' has not been translated yet.
+2000-10-01 17:08:50 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mailcap.el (mailcap-mime-types): Use mailcap-mime-data.
+ * mml.el (mml-minibuffer-read-type): Use mailcap-mime-types.
+
+2000-10-01 13:07:21 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * webmail.el (webmail-netscape-open, webmail-hotmail-article,
+ webmail-hotmail-list): Update.
+
+2000-10-01 08:36:09 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mail-source.el (mail-source-report-new-mail): Use
+ nnheader-cancel-timer.
+
+2000-10-01 08:35:38 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * lpath.el (overlay-*): Shut up.
+ * dgnushack.el: Two implementations of smiley.
+
+2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-ml.el: Usage.
+ (gnus-mailing-list-archive, gnus-mailing-list-owner,
+ gnus-mailing-list-post, gnus-mailing-list-unsubscribe,
+ gnus-mailing-list-subscribe, gnus-mailing-list-help): Bind list-*.
+ (gnus-mailing-list-menu): Define it.
+ (turn-on-gnus-mailing-list-mode, gnus-mailing-list-mode): Autoload.
+
+ * gnus-xmas.el (gnus-xmas-mailing-list-menu-add): Move here.
+
+2000-09-30 18:52:51 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * webmail.el (webmail-my-deja-*): Rewrite.
+
+2000-09-30 Simon Josefsson <simon@josefsson.org>
+
+ * nnimap.el (nnimap-request-accept-article): Remove \n's from
+ From_ lines.
+
+2000-08-05 Simon Josefsson <simon@josefsson.org>
+
+ Make GCC to remote groups work when unplugged
+ (postpone GCC until message is actually sent).
+
+ * gnus-draft.el (gnus-draft-send): Call `gnus-agent-restore-gcc'.
+
+ * gnus-agent.el (gnus-agent-possibly-do-gcc):
+ (gnus-agent-restore-gcc):
+ (gnus-agent-possibly-save-gcc): New functions.
+
+ * gnus-msg.el (gnus-inews-add-send-actions): Use
+ `gnus-agent-possibly-do-gcc' if Agentized.
+ (gnus-inews-add-send-actions): Add `gnus-agent-possibly-save-gcc'
+ to `message-header-hook'.
+
+ * gnus.el (gnus-agent-gcc-header): New variable.
+
+2000-07-13 Simon Josefsson <simon@josefsson.org>
+
+ Asks the user to synch flags with server when you plug in.
+
+ * gnus-agent.el (gnus-agent-synchronize-flags): New variable.
+ (gnus-agent-possibly-synchronize-flags-server): New function, use it.
+ (gnus-agent-toggle-plugged): Call it.
+ (gnus-agent-synchronize-flags): Renamed from `gnus-agent-synchronize'.
+ (gnus-agent-group-mode-map): `g-a-s' -> `g-a-s-flags'.
+ (gnus-agent-possibly-synchronize-flags): New function.
+ (gnus-agent-possibly-synchronize-flags-server): New function.
+
+2000-09-30 Simon Josefsson <simon@josefsson.org>
+
+ * starttls.el: New file, by Daiki Ueno.
+
+2000-08-02 Stanislav Shalunov <shalunov@internet2.edu>
+
+ * message.el (message-make-in-reply-to): In-Reply-To is message-id
+ (see DRUMS).
+
+2000-09-29 Simon Josefsson <simon@josefsson.org>
+
+ * nntp.el (nntp-async-trigger): Fix authinfo in asynchronous
+ prefetch.
+
+2000-08-09 10:21:20 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nntp.el (nntp-open-telnet): Wait for the telnet prompt before
+ sending a command; allow the rtelnet prompt as well.
+
+2000-09-29 Simon Josefsson <simon@josefsson.org>
+
+ * message.el (message-send): Make sure error is signalled if no
+ send method is specified.
+
+2000-09-29 Florian Weimer <fw@deneb.enyo.de>
+
+ * qp.el (quoted-printable-encode-region): Wrap with
+ `mm-with-unibyte-current-buffer'.
+
+2000-09-29 12:12:49 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-agent.el (gnus-agent-fetch-group-1): Reimplement Mike
+ McEwan's proposal.
+
+2000-09-29 12:06:40 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-agent.el: Revoke Mike McEwan's 1998-09-05 patch due to
+ the GNU assignment issue.
+
+2000-09-29 09:56:34 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * nndoc.el (nndoc-dissect-mime-parts-sub): Correctly mark body-begin.
+
+2000-09-29 09:14:08 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-summary-enter-digest-group): Decode to-address.
+
2000-09-28 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* gnus-art.el (article-strip-banner): elkin@tverd.astro.spbu.ru:
(cond ((and (featurep 'xemacs) (featurep 'mule))
(if (memq 'shift-jis (coding-priority-list))
(set-coding-priority-list
- (nconc (delq 'shift-jis (coding-priority-list)) '(shift-jis)))))
+ (append (delq 'shift-jis (coding-priority-list)) '(shift-jis)))))
((boundp 'MULE)
(put '*coding-category-sjis* 'priority (length *predefined-category*)))
((featurep 'mule)
(if (memq 'coding-category-sjis coding-category-list)
(set-coding-priority
- (nconc (delq 'coding-category-sjis coding-category-list)
- '(coding-category-sjis))))))
+ (append (delq 'coding-category-sjis
+ (copy-sequence coding-category-list))
+ '(coding-category-sjis))))))
(fset 'facep 'ignore)
file elc)
(mapcar
(lambda (el) (setq files (delete el files)))
- (nconc
+ (append
dgnushack-tool-files
(condition-case nil
(progn (require 'w3-forms) nil)
(condition-case nil
(progn (require 'bbdb) nil)
(error '("gnus-bbdb.el")))
- (unless (featurep 'xemacs)
+ (if (featurep 'xemacs)
+ '("smiley-ems.el")
'("gnus-xmas.el" "gnus-picon.el" "messagexmas.el"
- "nnheaderxm.el" "gnus-ml.el"))
+ "nnheaderxm.el" "smiley.el"))
(when (and (fboundp 'md5) (subrp (symbol-function 'md5)))
'("md5.el"))))
(while (setq file (pop files))
(require 'gnus-cache)
(require 'nnvirtual)
(require 'gnus-sum)
+(require 'gnus-score)
(eval-when-compile
(if (featurep 'xemacs)
(require 'itimer)
(require 'timer))
- (require 'gnus-score)
(require 'gnus-group))
(defcustom gnus-agent-directory (nnheader-concat gnus-directory "agent/")
:type '(choice (const nil)
(integer :tag "Number")))
+(defcustom gnus-agent-synchronize-flags 'ask
+ "Indicate if flags are synchronized when you plug in.
+If this is `ask' the hook will query the user."
+ :type '(choice (const :tag "Always" t)
+ (const :tag "Never" nil)
+ (const :tag "Ask" ask))
+ :group 'gnus-agent)
+
;;; Internal variables
(defvar gnus-agent-history-buffers nil)
(defvar gnus-agent-send-mail-function nil)
(defvar gnus-agent-file-coding-system 'raw-text)
-(defconst gnus-agent-scoreable-headers
- '("subject" "from" "date" "message-id" "references" "chars" "lines" "xref")
- "Headers that are considered when scoring articles for download via the Agent.")
-
;; Dynamic variables
(defvar gnus-headers)
(defvar gnus-score)
"Jc" gnus-enter-category-buffer
"Jj" gnus-agent-toggle-plugged
"Js" gnus-agent-fetch-session
- "JY" gnus-agent-synchronize
+ "JY" gnus-agent-synchronize-flags
"JS" gnus-group-send-drafts
"Ja" gnus-agent-add-group
"Jr" gnus-agent-remove-group)
(if plugged
(progn
(setq gnus-plugged plugged)
+ (gnus-agent-possibly-synchronize-flags)
(gnus-run-hooks 'gnus-agent-plugged-hook)
(setcar (cdr gnus-agent-mode-status) " Plugged"))
(gnus-agent-close-connections)
(while (search-backward "\n" nil t)
(replace-match "\\n" t t))))
+(defun gnus-agent-restore-gcc ()
+ "Restore GCC field from saved header."
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward (concat gnus-agent-gcc-header ":") nil t)
+ (replace-match "Gcc:" 'fixedcase))))
+
+(defun gnus-agent-possibly-save-gcc ()
+ "Save GCC if Gnus is unplugged."
+ (unless gnus-plugged
+ (save-excursion
+ (goto-char (point-min))
+ (let ((case-fold-search t))
+ (while (re-search-forward "^gcc:" nil t)
+ (replace-match (concat gnus-agent-gcc-header ":") 'fixedcase))))))
+
+(defun gnus-agent-possibly-do-gcc ()
+ "Do GCC if Gnus is plugged."
+ (when gnus-plugged
+ (gnus-inews-do-gcc)))
+
;;;
;;; Group mode commands
;;;
(setf (cadddr c) (delete group (cadddr c))))))
(gnus-category-write)))
-(defun gnus-agent-synchronize ()
- "Synchronize local, unplugged, data with backend.
-Currently sends flag setting requests, if any."
+(defun gnus-agent-synchronize-flags ()
+ "Synchronize unplugged flags with servers."
(interactive)
(save-excursion
(dolist (gnus-command-method gnus-agent-covered-methods)
(when (file-exists-p (gnus-agent-lib-file "flags"))
- (set-buffer (get-buffer-create " *Gnus Agent flag synchronize*"))
- (erase-buffer)
- (nnheader-insert-file-contents (gnus-agent-lib-file "flags"))
- (if (null (gnus-check-server gnus-command-method))
- (message "Couldn't open server %s" (nth 1 gnus-command-method))
- (while (not (eobp))
- (if (null (eval (read (current-buffer))))
- (progn (forward-line)
- (kill-line -1))
- (write-file (gnus-agent-lib-file "flags"))
- (error "Couldn't set flags from file %s"
- (gnus-agent-lib-file "flags"))))
- (write-file (gnus-agent-lib-file "flags")))
- (kill-buffer nil)))))
+ (gnus-agent-synchronize-flags-server gnus-command-method)))))
+
+(defun gnus-agent-possibly-synchronize-flags ()
+ "Synchronize flags according to `gnus-agent-synchronize-flags'."
+ (interactive)
+ (save-excursion
+ (dolist (gnus-command-method gnus-agent-covered-methods)
+ (when (file-exists-p (gnus-agent-lib-file "flags"))
+ (gnus-agent-possibly-synchronize-flags-server gnus-command-method)))))
+
+(defun gnus-agent-synchronize-flags-server (method)
+ "Synchronize flags set when unplugged for server."
+ (let ((gnus-command-method method))
+ (when (file-exists-p (gnus-agent-lib-file "flags"))
+ (set-buffer (get-buffer-create " *Gnus Agent flag synchronize*"))
+ (erase-buffer)
+ (nnheader-insert-file-contents (gnus-agent-lib-file "flags"))
+ (if (null (gnus-check-server gnus-command-method))
+ (message "Couldn't open server %s" (nth 1 gnus-command-method))
+ (while (not (eobp))
+ (if (null (eval (read (current-buffer))))
+ (progn (forward-line)
+ (kill-line -1))
+ (write-file (gnus-agent-lib-file "flags"))
+ (error "Couldn't set flags from file %s"
+ (gnus-agent-lib-file "flags"))))
+ (delete-file (gnus-agent-lib-file "flags")))
+ (kill-buffer nil))))
+
+(defun gnus-agent-possibly-synchronize-flags-server (method)
+ "Synchronize flags for server according to `gnus-agent-synchronize-flags'."
+ (when (or (and gnus-agent-synchronize-flags
+ (not (eq gnus-agent-synchronize-flags 'ask)))
+ (and (eq gnus-agent-synchronize-flags 'ask)
+ (gnus-y-or-n-p (format "Synchronize flags on server `%s'? "
+ (cadr method)))))
+ (gnus-agent-synchronize-flags-server method)))
;;;
;;; Server mode commands
(nnheader-translate-file-chars
(nnheader-replace-chars-in-string
(nnheader-replace-duplicate-chars-in-string
- (nnheader-replace-chars-in-string
+ (nnheader-replace-chars-in-string
(gnus-group-real-name group)
?/ ?_)
?. ?_)
(with-temp-buffer
(let (article)
(while (setq article (pop articles))
- (when (or
- (gnus-backlog-request-article group article
+ (when (or
+ (gnus-backlog-request-article group article
nntp-server-buffer)
(gnus-request-article article group))
(goto-char (point-max))
(while (setq group (pop groups))
(when (<= (gnus-group-level group) gnus-agent-handle-level)
(gnus-agent-fetch-group-1 group gnus-command-method))))))
- (error
+ (error
(unless (funcall gnus-agent-confirmation-function
(format "Error (%s). Continue? " err))
(error "Cannot fetch articles into the Gnus agent."))))
;; Fetch headers.
(when (and (or (gnus-active group) (gnus-activate-group group))
(setq articles (gnus-agent-fetch-headers group))
- (progn
+ (let ((nntp-server-buffer gnus-agent-overview-buffer))
;; Parse them and see which articles we want to fetch.
(setq gnus-newsgroup-dependencies
(make-vector (length articles) 0))
- ;; No need to call `gnus-get-newsgroup-headers-xover' with
- ;; the entire .overview for group as we still have the just
- ;; downloaded headers in `gnus-agent-overview-buffer'.
- (let ((nntp-server-buffer gnus-agent-overview-buffer))
- (setq gnus-newsgroup-headers
- (gnus-get-newsgroup-headers-xover articles nil nil
- group)))
+ (setq gnus-newsgroup-headers
+ (gnus-get-newsgroup-headers-xover articles nil nil
+ group))
;; `gnus-agent-overview-buffer' may be killed for
;; timeout reason. If so, recreate it.
(gnus-agent-create-buffer)))
(gnus-get-predicate
(or (gnus-group-find-parameter group 'agent-predicate t)
(cadr category))))
- ;; Do we want to download everything, or nothing?
- (if (or (eq (caaddr predicate) 'gnus-agent-true)
- (eq (caaddr predicate) 'gnus-agent-false))
- ;; Yes.
- (setq arts (symbol-value
- (cadr (assoc (caaddr predicate)
- '((gnus-agent-true articles)
- (gnus-agent-false nil))))))
- ;; No, we need to decide what we want.
+ (if (memq (caaddr predicate) '(gnus-agent-true gnus-agent-false))
+ ;; Simple implementation
+ (setq arts
+ (and (eq (caaddr predicate) 'gnus-agent-true) articles))
+ (setq arts nil)
(setq score-param
- (let ((score-method
- (or
- (gnus-group-find-parameter group 'agent-score t)
- (caddr category))))
- (when score-method
- (require 'gnus-score)
- (if (eq score-method 'file)
- (let ((entries
- (gnus-score-load-files
- (gnus-all-score-files group)))
- list score-file)
- (while (setq list (car entries))
- (push (car list) score-file)
- (setq list (cdr list))
- (while list
- (when (member (caar list)
- gnus-agent-scoreable-headers)
- (push (car list) score-file))
- (setq list (cdr list)))
- (setq score-param
- (append score-param (list (nreverse score-file)))
- score-file nil entries (cdr entries)))
- (list score-param))
- (if (stringp (car score-method))
- score-method
- (list (list score-method)))))))
+ (or (gnus-group-get-parameter group 'agent-score t)
+ (caddr category)))
+ ;; Translate score-param into real one
+ (cond
+ ((eq score-param 'file)
+ (setq score-param (gnus-all-score-files group)))
+ ((stringp (car score-param)))
+ (t
+ (setq score-param (list (list score-param)))))
(when score-param
(gnus-score-headers score-param))
- (setq arts nil)
(while (setq gnus-headers (pop gnus-newsgroup-headers))
(setq gnus-score
(or (cdr (assq (mail-header-number gnus-headers)
(require 'message)
(require 'gnus-msg)
(require 'nndraft)
+(require 'gnus-agent)
(eval-when-compile (require 'cl))
;;; Draft minor mode
(setq type (ignore-errors (read (current-buffer)))
method (ignore-errors (read (current-buffer))))
(message-remove-header gnus-agent-meta-information-header)))
+ ;; Let Agent restore any GCC lines and have message.el perform them.
+ (gnus-agent-restore-gcc)
;; Then we send it. If we have no meta-information, we just send
;; it and let Message figure out how.
(when (let ((mail-header-separator ""))
(defun mailcap-mime-types ()
"Return a list of MIME media types."
(mailcap-parse-mimetypes)
- (mm-delete-duplicates (mapcar 'cdr mailcap-mime-extensions)))
+ (mm-delete-duplicates
+ (nconc
+ (mapcar 'cdr mailcap-mime-extensions)
+ (apply
+ 'nconc
+ (mapcar
+ (lambda (l)
+ (delq nil
+ (mapcar
+ (lambda (m)
+ (let ((type (cdr (assq 'type (cdr m)))))
+ (if (equal (cadr (split-string type "/"))
+ "*")
+ nil
+ type)))
+ (cdr l))))
+ mailcap-mime-data)))))
(provide 'gnus-mailcap)
;; implement (small subset of) RFC 2369
+;;; Usage:
+
+;; (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
+
;;; Code:
(require 'gnus)
+(require 'gnus-msg)
(eval-when-compile (require 'cl))
-(defvar group)
-(defvar list-help)
-(defvar list-subscribe)
-(defvar list-unsubscribe)
-(defvar list-post)
-(defvar list-owner)
-(defvar list-archive)
-
;;; Mailing list minor mode
(defvar gnus-mailing-list-mode nil
(defvar gnus-mailing-list-mode-map nil)
+(defvar gnus-mailing-list-menu)
+
(unless gnus-mailing-list-mode-map
(setq gnus-mailing-list-mode-map (make-sparse-keymap))
["Mail to owner" gnus-mailing-list-owner t]
["Browse archive" gnus-mailing-list-archive t]))))
+;;;###autoload
(defun turn-on-gnus-mailing-list-mode ()
- (when (gnus-group-get-parameter group 'to-list)
+ (when (gnus-group-get-parameter gnus-newsgroup-name 'to-list)
(gnus-mailing-list-mode 1)))
+;;;###autoload
(defun gnus-mailing-list-mode (&optional arg)
"Minor mode for providing mailing-list commands.
(defun gnus-mailing-list-help ()
"Get help from mailing list server."
(interactive)
- (cond (list-help (gnus-mailing-list-message list-help))
- (t (display-message 'no-log "no list-help in this group"))))
+ (let ((list-help
+ (with-current-buffer gnus-original-article-buffer
+ (gnus-fetch-field "list-help"))))
+ (cond (list-help (gnus-mailing-list-message list-help))
+ (t (gnus-message 1 "no list-help in this group")))))
(defun gnus-mailing-list-subscribe ()
"Subscribe"
(interactive)
- (cond (list-subscribe (gnus-mailing-list-message list-subscribe))
- (t (display-message 'no-log "no list-subscribe in this group"))))
-
+ (let ((list-subscribe
+ (with-current-buffer gnus-original-article-buffer
+ (gnus-fetch-field "list-subscribe"))))
+ (cond (list-subscribe (gnus-mailing-list-message list-subscribe))
+ (t (gnus-message 1 "no list-subscribe in this group")))))
(defun gnus-mailing-list-unsubscribe ()
"Unsubscribe"
(interactive)
- (cond (list-unsubscribe (gnus-mailing-list-message list-unsubscribe))
- (t (display-message 'no-log "no list-unsubscribe in this group"))))
+ (let ((list-unsubscribe
+ (with-current-buffer gnus-original-article-buffer
+ (gnus-fetch-field "list-unsubscribe"))))
+ (cond (list-unsubscribe (gnus-mailing-list-message list-unsubscribe))
+ (t (gnus-message 1 "no list-unsubscribe in this group")))))
(defun gnus-mailing-list-post ()
"Post message (really useful ?)"
(interactive)
- (cond (list-post (gnus-mailing-list-message list-post))
- (t (display-message 'no-log "no list-post in this group")))
- )
+ (let ((list-post
+ (with-current-buffer gnus-original-article-buffer
+ (gnus-fetch-field "list-post"))))
+ (cond (list-post (gnus-mailing-list-message list-post))
+ (t (gnus-message 1 "no list-post in this group")))))
(defun gnus-mailing-list-owner ()
"Mail to the owner"
(interactive)
- (cond (list-owner (gnus-mailing-list-message list-owner))
- (t (display-message 'no-log "no list-owner in this group")))
- )
+ (let ((list-owner
+ (with-current-buffer gnus-original-article-buffer
+ (gnus-fetch-field "list-owner"))))
+ (cond (list-owner (gnus-mailing-list-message list-owner))
+ (t (gnus-message 1 "no list-owner in this group")))))
(defun gnus-mailing-list-archive ()
"Browse archive"
(interactive)
- (cond (list-archive (gnus-mailing-list-message list-archive))
- (t (display-message 'no-log "no list-owner in this group")))
- )
+ (let ((list-archive
+ (with-current-buffer gnus-original-article-buffer
+ (gnus-fetch-field "list-archive"))))
+ (cond (list-archive (gnus-mailing-list-message list-archive))
+ (t (gnus-message 1 "no list-owner in this group")))))
;;; Utility functions
-(defun gnus-xmas-mailing-list-menu-add ()
- (gnus-xmas-menu-add mailing-list
- gnus-mailing-list-menu))
-
-(add-hook 'gnus-mailing-list-mode-hook 'gnus-xmas-mailing-list-menu-add)
-
(defun gnus-mailing-list-message (address)
""
(let ((mailto "")
(defun gnus-inews-add-send-actions (winconf buffer article)
(make-local-hook 'message-sent-hook)
- (add-hook 'message-sent-hook 'gnus-inews-do-gcc nil t)
+ (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc
+ 'gnus-inews-do-gcc) nil t)
+ (when gnus-agent
+ (make-local-hook 'message-header-hook)
+ (add-hook 'message-header-hook 'gnus-agent-possibly-save-gcc nil t))
(setq message-post-method
`(lambda (arg)
(gnus-post-method arg ,gnus-newsgroup-name)))
;; the parent article.
(when (setq to-address (or (message-fetch-field "reply-to")
(message-fetch-field "from")))
- (setq params (append (list (cons 'to-address to-address)))))
+ (setq params (append
+ (list (cons 'to-address
+ (funcall gnus-decode-encoded-word-function
+ to-address))))))
(setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
(insert-buffer-substring gnus-original-article-buffer)
;; Remove lines that may lead nndoc to misinterpret the
(set-glyph-face glyph 'default)
glyph)))
+(defun gnus-xmas-mailing-list-menu-add ()
+ (gnus-xmas-menu-add mailing-list
+ gnus-mailing-list-menu))
+
+(add-hook 'gnus-mailing-list-mode-hook 'gnus-xmas-mailing-list-menu-add)
+
(provide 'gnus-xmas)
;;; gnus-xmas.el ends here
\f
;;; Internal variables
+(defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
(defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
(defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
(defvar gnus-original-article-buffer " *Original Article*")
(defun maybe-bind (args)
(mapcar (lambda (var) (unless (boundp var) (set var nil))) args))
-(if (string-match "XEmacs" emacs-version)
+(if (featurep 'xemacs)
(progn
(defvar track-mouse nil)
(maybe-fbind '(posn-point
vcard-pretty-print image-type-available-p
put-image create-image display-graphic-p
find-image insert-image image-size
- make-overlay overlay-put make-symbolic-link))
+ make-overlay overlay-put overlay-buffer overlay-start
+ overlay-get overlay-end make-symbolic-link))
(maybe-bind '(global-face-data
mark-active transient-mark-mode mouse-selection-click-count
mouse-selection-click-count-buffer buffer-display-table
(> (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))
+ (nnheader-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))
+ (nnheader-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
:type '(choice (const :tag "unique" unique)
(const :tag "unsent" unsent)))
-(defcustom message-default-charset
+(defcustom message-default-charset
(and (featurep 'xemacs) (not (featurep 'mule)) 'iso-8859-1)
"Default charset used in non-MULE XEmacsen."
:group 'message
:type 'symbol)
-(defcustom message-dont-reply-to-names
+(defcustom message-dont-reply-to-names
(and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names)
"*A regexp specifying names to prune when doing wide replies.
A value of nil means exclude your own name only."
(defcustom message-send-mail-partially-limit 1000000
"The limitation of messages sent as message/partial.
-The lower bound of message size in characters, beyond which the message
+The lower bound of message size in characters, beyond which the message
should be sent in several parts. If it is nil, the size is unlimited."
:group 'message-buffers
:type '(choice (const :tag "unlimited" nil)
"Remove double quotes (\") from strings in list."
(mapcar (lambda (item)
(while (string-match "^\\(.*\\)\"\\(.*\\)$" item)
- (setq item (concat (match-string 1 item)
+ (setq item (concat (match-string 1 item)
(match-string 2 item))))
item)
elems))
(let ((regexp (if (stringp gnus-list-identifiers)
gnus-list-identifiers
(mapconcat 'identity gnus-list-identifiers " *\\|"))))
- (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
+ (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
" *\\)\\)+\\(Re: +\\)?\\)") subject)
(concat (substring subject 0 (match-beginning 1))
(or (match-string 3 subject)
(funcall message-encode-function)
(while (and success
(setq elem (pop alist)))
- (when (or (not (funcall (cadr elem)))
- (and (or (not (memq (car elem)
- message-sent-message-via))
- (y-or-n-p
- (format
- "Already sent message via %s; resend? "
- (car elem))))
- (setq success (funcall (caddr elem) arg))))
- (setq sent t))))
+ (when (funcall (cadr elem))
+ (when (and (or (not (memq (car elem)
+ message-sent-message-via))
+ (y-or-n-p
+ (format
+ "Already sent message via %s; resend? "
+ (car elem))))
+ (setq success (funcall (caddr elem) arg)))
+ (setq sent t)))))
(unless (or sent (not success))
(error "No methods specified to send by"))
(prog1
"application/octet-stream"))
(string (completing-read
(format "Content type (default %s): " default)
- (mapcar
- 'list
- (mm-delete-duplicates
- (nconc
- (mapcar 'cdr mailcap-mime-extensions)
- (apply
- 'nconc
- (mapcar
- (lambda (l)
- (delq nil
- (mapcar
- (lambda (m)
- (let ((type (cdr (assq 'type (cdr m)))))
- (if (equal (cadr (split-string type "/"))
- "*")
- nil
- type)))
- (cdr l))))
- mailcap-mime-data))))))))
+ (mapcar 'list (mailcap-mime-types)))))
(if (not (equal string ""))
string
default)))
subject content-type type subtype boundary-regexp)
;; Gracefully handle a missing body.
(goto-char head-begin)
- (if (search-forward "\n\n" body-end t)
+ (if (or (and (eq (char-after) ?\n) (or (forward-char 1) t))
+ (search-forward "\n\n" body-end t))
(setq head-end (1- (point))
body-begin (point))
(setq head-end body-end
;; remove any 'From blabla' lines, some IMAP servers
;; reject the entire message otherwise.
(when (looking-at "^From[^:]")
- (kill-region (gnus-point-at-bol) (gnus-point-at-eol)))
+ (kill-region (point) (progn (forward-line) (point))))
;; turn into rfc822 format (\r\n eol's)
(while (search-forward "\n" nil t)
(replace-match "\r\n")))
(if (memq (following-char) '(?4 ?5))
;; wants credentials?
(if (looking-at "480")
- (nntp-handle-authinfo nntp-process-to-buffer)
+ (nntp-handle-authinfo process)
;; report error message.
(nntp-snarf-error-message)
(nntp-do-callback nil))
encode lines starting with \"From\"."
(interactive "r")
(save-excursion
- (save-restriction
- (narrow-to-region from to)
- ;; (mm-encode-body)
- ;; Encode all the non-ascii and control characters.
- (goto-char (point-min))
- (while (and (skip-chars-forward
- ;; Avoid using 8bit characters. = is \075.
- ;; Equivalent to "^\000-\007\013\015-\037\200-\377="
- (or class "\010-\012\014\040-\074\076-\177"))
- (not (eobp)))
- (insert
- (prog1
- (upcase (format "=%02x" (char-after)))
- (delete-char 1))))
- ;; Encode white space at the end of lines.
- (goto-char (point-min))
- (while (re-search-forward "[ \t]+$" nil t)
- (goto-char (match-beginning 0))
- (while (not (eolp))
+ (mm-with-unibyte-current-buffer
+ (save-restriction
+ (narrow-to-region from to)
+ ;; (mm-encode-body)
+ ;; Encode all the non-ascii and control characters.
+ (goto-char (point-min))
+ (while (and (skip-chars-forward
+ ;; Avoid using 8bit characters. = is \075.
+ ;; Equivalent to "^\000-\007\013\015-\037\200-\377="
+ (or class "\010-\012\014\040-\074\076-\177"))
+ (not (eobp)))
(insert
(prog1
(upcase (format "=%02x" (char-after)))
- (delete-char 1)))))
- (when (or fold mm-use-ultra-safe-encoding)
- ;; Fold long lines.
- (let ((tab-width 1)) ;; HTAB is one character.
- (goto-char (point-min))
- (while (not (eobp))
- ;; In ultra-safe mode, encode "From " at the beginning of a
- ;; line.
- (when mm-use-ultra-safe-encoding
- (beginning-of-line)
- (when (looking-at "From ")
- (replace-match "From=20" nil t)))
- (end-of-line)
- (while (> (current-column) 76) ;; tab-width must be 1.
- (beginning-of-line)
- (forward-char 75);; 75 chars plus an "="
- (search-backward "=" (- (point) 2) t)
- (insert "=\n")
- (end-of-line))
- (unless (eobp)
- (forward-line))))))))
+ (delete-char 1))))
+ ;; Encode white space at the end of lines.
+ (goto-char (point-min))
+ (while (re-search-forward "[ \t]+$" nil t)
+ (goto-char (match-beginning 0))
+ (while (not (eolp))
+ (insert
+ (prog1
+ (upcase (format "=%02x" (char-after)))
+ (delete-char 1)))))
+ (when (or fold mm-use-ultra-safe-encoding)
+ ;; Fold long lines.
+ (let ((tab-width 1));; HTAB is one character.
+ (goto-char (point-min))
+ (while (not (eobp))
+ ;; In ultra-safe mode, encode "From " at the beginning of a
+ ;; line.
+ (when mm-use-ultra-safe-encoding
+ (beginning-of-line)
+ (when (looking-at "From ")
+ (replace-match "From=20" nil t)))
+ (end-of-line)
+ (while (> (current-column) 76);; tab-width must be 1.
+ (beginning-of-line)
+ (forward-char 75);; 75 chars plus an "="
+ (search-backward "=" (- (point) 2) t)
+ (insert "=\n")
+ (end-of-line))
+ (unless (eobp)
+ (forward-line)))))))))
(defun quoted-printable-encode-string (string)
"QP-encode STRING and return the results."
--- /dev/null
+;;; starttls.el --- TLSv1 functions
+
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+;; Created: 1999/11/20
+;; Keywords: TLS, SSL, OpenSSL
+
+;; This file is not part of any package.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This module defines some utility functions for TLSv1 functions.
+
+;; [RFC 2246] "The TLS Protocol Version 1.0"
+;; by Christopher Allen <callen@certicom.com> and
+;; Tim Dierks <tdierks@certicom.com> (1999/01)
+
+;; [RFC 2595] "Using TLS with IMAP, POP3 and ACAP"
+;; by Chris Newman <chris.newman@innosoft.com> (1999/06)
+
+;;; Code:
+
+(defgroup starttls nil
+ "Support for `Transport Layer Security' protocol."
+ :group 'ssl)
+
+(defcustom starttls-program "starttls"
+ "The program to run in a subprocess to open an TLSv1 connection."
+ :group 'starttls)
+
+(defcustom starttls-extra-args nil
+ "Extra arguments to `starttls-program'"
+ :group 'starttls)
+
+(defun starttls-negotiate (process)
+ (signal-process (process-id process) 'SIGALRM))
+
+(defun starttls-open-stream (name buffer host service)
+ "Open a TLS connection for a service to a host.
+Returns a subprocess-object to represent the connection.
+Input and output work as for subprocesses; `delete-process' closes it.
+Args are NAME BUFFER HOST SERVICE.
+NAME is name for process. It is modified if necessary to make it unique.
+BUFFER is the buffer (or `buffer-name') to associate with the process.
+ Process output goes at end of that buffer, unless you specify
+ an output stream or filter function to handle the output.
+ BUFFER may be also nil, meaning that this process is not associated
+ with any buffer
+Third arg is name of the host to connect to, or its IP address.
+Fourth arg SERVICE is name of the service desired, or an integer
+specifying a port number to connect to."
+
+ (let* ((process-connection-type nil)
+ (process (apply #'start-process
+ name buffer starttls-program
+ host (format "%s" service)
+ starttls-extra-args)))
+ (process-kill-without-query process)
+ process))
+
+(provide 'starttls)
+
+;;; starttls.el ends here
(login-url
content
("http://ureg.netscape.com/iiop/UReg2/login/loginform")
- "%s&U2_USERNAME=%s&U2_PASSWORD=%s"
- webmail-aux user password)
+ "U2_USERNAME=%s&U2_PASSWORD=%s%s"
+ user password webmail-aux)
(login-snarf . webmail-netaddress-login)
(list-url
"http://webmail.netscape.com/tpl/Mail/%s/List?FolderID=-4&SortUseCase=True"
(list-url "http://www.deja.com/rg_gotomail.xp")
(list-snarf . webmail-my-deja-list)
(article-snarf . webmail-my-deja-article)
- (trash-url
- "%s/gmm_multiplex.femail?%%2Fgmm_domovemesg_top.femail=Move+to%%3A&folder_top=%s%%3Azzz%%3A%%7E6trash%%3AF%%3A0&docid=%s"
- webmail-aux user id))))
+ (trash-url webmail-aux id))))
(defvar webmail-variables
'(address article-snarf article-url list-snarf list-url
(defun webmail-error (str)
(if webmail-error-function
(funcall webmail-error-function str))
- (message "%s HTML has changed; please get a new version of webmail (%s)"
+ (message "%s HTML has changed or your w3 package is too old.(%s)"
webmail-type str)
- (error "%s HTML has changed; please get a new version of webmail (%s)"
+ (error "%s HTML has changed or your w3 package is too old.(%s)"
webmail-type str))
(defun webmail-setdefault (type)
(webmail-error "login@2"))))
(defun webmail-hotmail-list ()
- (let (site url newp)
- (goto-char (point-min))
- (if (re-search-forward "[0-9]+ new" nil t)
- (message "Found %s" (match-string 0))
- (webmail-error "maybe your w3 version is too old"))
- (goto-char (point-min))
- (if (re-search-forward
+ (goto-char (point-min))
+ (skip-chars-forward " \t\n\r")
+ (let (site url newp (total "0"))
+ (if (eobp)
+ (setq total "0"))
+ (if (re-search-forward "\\([0-9]+\\) *<b>(\\([0-9]+\\) new)" nil t)
+ (message "Found %s (%s new)" (setq total (match-string 1))
+ (match-string 2))
+ (if (re-search-forward "\\([0-9]+\\) new" nil t)
+ (message "Found %s new" (setq total (match-string 1)))
+ (webmail-error "list@0")))
+ (unless (equal total "0")
+ (goto-char (point-min))
+ (if (re-search-forward
"https?://\\([^/]+hotmail\\.msn\\.com\\)/cgi-bin/" nil t)
- (setq site (match-string 1))
- (webmail-error "list@1"))
- (goto-char (point-min))
- (if (re-search-forward "disk=\\([^&]+\\)&" nil t)
- (setq webmail-aux
- (concat "http://" site "/cgi-bin/HoTMaiL?disk="
- (match-string 1)))
- (webmail-error "list@2"))
- (goto-char (point-max))
- (while (re-search-backward
- "newmail\\.gif\\|href=\"\\(/cgi-bin/getmsg\\?[^\"]+\\)\""
- nil t)
- (if (setq url (match-string 1))
- (progn
- (if (or newp (not webmail-newmail-only))
- (let (id)
- (if (string-match "msg=\\([^&]+\\)" url)
- (setq id (match-string 1 url)))
- (push (cons id (concat "http://" site url "&raw=0"))
- webmail-articles)))
- (setq newp nil))
- (setq newp t)))))
+ (setq site (match-string 1))
+ (webmail-error "list@1"))
+ (goto-char (point-min))
+ (if (re-search-forward "disk=\\([^&]+\\)&" nil t)
+ (setq webmail-aux
+ (concat "http://" site "/cgi-bin/HoTMaiL?disk="
+ (match-string 1)))
+ (webmail-error "list@2"))
+ (goto-char (point-max))
+ (while (re-search-backward
+ "newmail\\.gif\\|href=\"\\(/cgi-bin/getmsg\\?[^\"]+\\)\""
+ nil t)
+ (if (setq url (match-string 1))
+ (progn
+ (if (or newp (not webmail-newmail-only))
+ (let (id)
+ (if (string-match "msg=\\([^&]+\\)" url)
+ (setq id (match-string 1 url)))
+ (push (cons id (concat "http://" site url "&raw=0"))
+ webmail-articles)))
+ (setq newp nil))
+ (setq newp t))))))
;; Thank victor@idaccr.org (Victor S. Miller) for raw=0
(defun webmail-hotmail-article (file id)
(goto-char (point-min))
- (if (not (search-forward "<pre>" nil t))
- (webmail-error "article@3"))
- (skip-chars-forward "\n\r\t ")
- (delete-region (point-min) (point))
- (if (not (search-forward "</pre>" nil t))
- (webmail-error "article@3.1"))
- (delete-region (match-beginning 0) (point-max))
- (nnweb-remove-markup)
- (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
- (nnweb-decode-entities))
- (goto-char (point-min))
- (while (re-search-forward "\r\n?" nil t)
- (replace-match "\n"))
- (goto-char (point-min))
- (insert "\n\n")
- (if (not (looking-at "\n*From "))
- (insert "From nobody " (current-time-string) "\n")
- (forward-line))
- (insert "X-Gnus-Webmail: " (symbol-value 'user)
- "@" (symbol-name webmail-type) "\n")
- (mm-append-to-file (point-min) (point-max) file))
+ (skip-chars-forward " \t\n\r")
+ (unless (eobp)
+ (if (not (search-forward "<pre>" nil t))
+ (webmail-error "article@3"))
+ (skip-chars-forward "\n\r\t ")
+ (delete-region (point-min) (point))
+ (if (not (search-forward "</pre>" nil t))
+ (webmail-error "article@3.1"))
+ (delete-region (match-beginning 0) (point-max))
+ (nnweb-remove-markup)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
+ (goto-char (point-min))
+ (while (re-search-forward "\r\n?" nil t)
+ (replace-match "\n"))
+ (goto-char (point-min))
+ (insert "\n\n")
+ (if (not (looking-at "\n*From "))
+ (insert "From nobody " (current-time-string) "\n")
+ (forward-line))
+ (insert "X-Gnus-Webmail: " (symbol-value 'user)
+ "@" (symbol-name webmail-type) "\n")
+ (mm-append-to-file (point-min) (point-max) file)))
(defun webmail-hotmail-article-old (file id)
(let (p attachment count mime hotmail-direct)
(defun webmail-netscape-open ()
(goto-char (point-min))
- (if (re-search-forward "login/hint\\?\\([^\"]+\\)\"" nil t)
- (setq webmail-aux (match-string 1))
- (webmail-error "open@1")))
+ (setq webmail-aux "")
+ (while (re-search-forward
+ "TYPE=hidden *NAME=\\([^ ]+\\) *VALUE=\"\\([^\"]+\\)"
+ nil t)
+ (setq webmail-aux (concat webmail-aux "&" (match-string 1) "="
+ (match-string 2)))))
(defun webmail-netaddress-open ()
(goto-char (point-min))
(webmail-error "open@1")))
(defun webmail-my-deja-list ()
- (let (item id newp)
+ (let (item id newp base)
+ (goto-char (point-min))
+ (when (re-search-forward "href=\"\\(\\([^\"]*\\)/mailnf\\.[^\"]*\\)\""
+ nil t)
+ (let ((url (match-string 1)))
+ (setq base (match-string 2))
+ (erase-buffer)
+ (nnweb-insert url)))
(goto-char (point-min))
(when (re-search-forward
- "(\\([0-9]+\\) message(s), \\([0-9]+\\) new, \\([0-9]+\\) k )"
+ "(\\([0-9]+\\) Message.?-[^>]*\\([0-9]+\\) New"
nil t)
- (message "Found %s mail(s), %s unread, total size %s K"
- (match-string 1) (match-string 2) (match-string 3)))
+ (message "Found %s mail(s), %s unread"
+ (match-string 1) (match-string 2)))
(goto-char (point-min))
(while (re-search-forward
- "• \\|\\(http:[^\"]+\\)/display_seemesg\\.femail\\?docid=\\([^&\"]+\\)"
+ "newmail\\.gif\\|href=\"[^\"]*\\(mailnf\\.[^\"]+act=view[^\"]+mid=\\([^\"&]+\\)[^\"]+\\)\""
nil t)
(if (setq id (match-string 2))
- (when (or newp (not webmail-newmail-only))
- (push
- (cons id (format "%s/gmm_multiplex.femail?docid=%s&femail_page_name=display_page&bool_next_on_disp_pg=true&bool_prev_on_disp_pg=false&display_all_headers=false&%%2Fgmm_save.femail=Download&femail_page_name=display_page&bool_next_on_disp_pg=true&bool_prev_on_disp_pg=false&display_all_headers=false"
- (match-string 1) id))
- webmail-articles)
- (setq webmail-aux (match-string 1))
+ (when (and (or newp (not webmail-newmail-only))
+ (not (assoc id webmail-articles)))
+ (push (cons id (setq webmail-aux
+ (concat base "/" (match-string 1))))
+ webmail-articles)
(setq newp nil))
(setq newp t)))
(setq webmail-articles (nreverse webmail-articles))))
+(defun webmail-my-deja-article-part (base)
+ (let (p)
+ (cond
+ ((looking-at "[\t\040\r\n]*<!--[^>]*>")
+ (replace-match ""))
+ ((looking-at "[\t\040\r\n]*</PRE>")
+ (replace-match ""))
+ ((looking-at "[\t\040\r\n]*<PRE>")
+ ;; text/plain
+ (replace-match "")
+ (save-restriction
+ (narrow-to-region (point)
+ (if (re-search-forward "</?PRE>" nil t)
+ (match-beginning 0)
+ (point-max)))
+ (goto-char (point-min))
+ (nnweb-remove-markup)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
+ (goto-char (point-max))))
+ ((looking-at "[\t\040\r\n]*<TABLE")
+ (save-restriction
+ (narrow-to-region (point)
+ (if (search-forward "</TABLE>" nil t 2)
+ (point)
+ (point-max)))
+ (goto-char (point-min))
+ (let (name type url bufname)
+ (if (and (search-forward "File Name:" nil t)
+ (re-search-forward "<FONT[^>]+>\\([^<]+\\)" nil t))
+ (setq name (match-string 1)))
+ (if (and (search-forward "File Type:" nil t)
+ (re-search-forward "<FONT[^>]+>\\([^<]+\\)" nil t))
+ (setq type (match-string 1)))
+ (unless (re-search-forward "action=\"getattach\\.cgi/\\([^\"]+\\)"
+ nil t)
+ (webmail-error "article@5"))
+ (setq url (concat base "/getattach.cgi/" (match-string 1)
+ "?sm=Download"))
+ (while (re-search-forward
+ "type=hidden name=\"\\([^\"]+\\)\" value=\"\\([^\"]+\\)"
+ nil t)
+ (setq url (concat url "&" (match-string 1) "="
+ (match-string 2))))
+ (delete-region (point-min) (point-max))
+ (save-excursion
+ (set-buffer (generate-new-buffer " *webmail-att*"))
+ (nnweb-insert url)
+ (push (current-buffer) webmail-buffer-list)
+ (setq bufname (buffer-name)))
+ (insert "<#part type=\"" type "\"")
+ (if name (insert " filename=\"" name "\""))
+ (insert " buffer=\"" bufname "\"")
+ (insert " disposition=inline><#/part>"))))
+ (t
+ (insert "<#part type=\"text/html\" disposition=inline>")
+ (goto-char (point-max))
+ (insert "<#/part>")))))
+
(defun webmail-my-deja-article (file id)
- (let (url)
+ (let (base)
(goto-char (point-min))
- (unless (re-search-forward "\\(http:[^\"]+/attachment/entire_message.txt[^\"]+\\)" nil t)
+ (unless (string-match "\\([^\"]+\\)/mail" webmail-aux)
+ (webmail-error "article@0"))
+ (setq base (match-string 1 webmail-aux))
+ (when (re-search-forward
+ "href=\"[^\"]*\\(mailnf\\.[^\"]+act=move[^\"]+mid=\\([^\"&]+\\)[^\"]+\\)\""
+ nil t)
+ (setq webmail-aux (concat base "/" (match-string 1)))
+ (string-match "mid=[^\"&]+" webmail-aux)
+ (setq webmail-aux (replace-match "mid=%s" nil nil webmail-aux)))
+ (unless (search-forward "<HR noshade>" nil t)
(webmail-error "article@1"))
- (setq url (match-string 1))
- (erase-buffer)
- (mm-with-unibyte-current-buffer
- (nnweb-insert url))
- (goto-char (point-min))
- (while (search-forward "\r\n" nil t)
- (replace-match "\n"))
+ (delete-region (point-min) (point))
+ (unless (search-forward "<HR noshade>" nil t)
+ (webmail-error "article@2"))
+ (save-restriction
+ (narrow-to-region (point-min) (point))
+ (while (search-forward "\r\n" nil t)
+ (replace-match "\n"))
+ (nnweb-remove-markup)
+ (let ((w3-html-entities (cons '(nbsp . 32) w3-html-entities)))
+ (nnweb-decode-entities))
+ (goto-char (point-min))
+ (while (re-search-forward "\n\n+" nil t)
+ (replace-match "\n"))
+ (goto-char (point-max)))
+ (save-restriction
+ (narrow-to-region (point) (point-max))
+ (goto-char (point-max))
+ (unless (search-backward "<HR noshade>" nil t)
+ (webmail-error "article@3"))
+ (unless (search-backward "</TT>" nil t)
+ (webmail-error "article@4"))
+ (delete-region (point) (point-max))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (webmail-my-deja-article-part base))
+ (insert "MIME-Version: 1.0\n"
+ (prog1
+ (mml-generate-mime)
+ (delete-region (point-min) (point-max)))))
(goto-char (point-min))
(insert "\n\nFrom nobody " (current-time-string) "\n")
(insert "X-Gnus-Webmail: " (symbol-value 'user)
"@" (symbol-name webmail-type) "\n")
+ (if (eq (char-after) ?\n)
+ (delete-char 1))
(mm-append-to-file (point-min) (point-max) file)))
(provide 'webmail)
+2000-09-30 Simon Josefsson <simon@josefsson.org>
+
+ * gnus.texi (Agent and IMAP): Add.
+ (Splitting in IMAP): Fix.
+
+2000-09-29 Simon Josefsson <simon@josefsson.org>
+
+ * gnus.texi (Converting Kill Files): Fix URL.
+ (Posting Styles): Fix regexp.
+ (Mail Source Specifiers): Fix.
+
+2000-09-29 12:53:27 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * Makefile.in: A workaround for @ifnottex.
+
+2000-09-29 12:36:13 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus.texi: Remove @c lines in the directory due to a bug in
+ makeinfo 1.68 (GNU texinfo 3.12).
+
2000-09-22 Dave Love <fx@gnu.org>
* message.texi, gnus.texi, emacs-mime.texi: Convert to GFDL.
EMACSINFO=$(EMACS) -batch -q -no-site-file
INFOSWI=-l ./dgnushack.el -f dgnushack-texi-format
XINFOSWI=-l ./dgnushack.el -f dgnushack-texi-add-suffix-and-format
+EMACSINFOHACK=-eval '(while (re-search-forward "@\\(end \\)?ifnottex" nil t) (replace-match ""))'
PDFLATEX=pdflatex
LATEX=latex
DVIPS=dvips
%.info: %.texi
if test $(MAKEINFO) = no; then \
- cd ../lisp && $(EMACSINFO) $(XINFOSWI) ../texi/$<; \
+ cd ../lisp && $(EMACSINFO) -eval '(find-file "$<")' \
+ $(EMACSINFOHACK) $(XINFOSWI) ../texi/$<; \
else \
makeinfo -o $@ $<; \
fi
if test "x$(MAKEINFO)" != "xno" ; then \
makeinfo -o $* $<; \
else \
- cd ../lisp && $(EMACSINFO) $(INFOSWI) ../texi/$<; \
+ cd ../lisp && $(EMACSINFO) -eval '(find-file "$<")' \
+ $(EMACSINFOHACK) $(INFOSWI) ../texi/$<; \
fi
dvi: gnus.dvi message.dvi refcard.dvi emacs-mime.dvi
* Agent Categories:: \e$B2?$r%@%&%s%m!<%I$9$k$+$r\e(B gnus \e$B%(!<%8%'%s%H$K65$($kJ}K!\e(B
* Agent Commands:: \e$B3F%P%C%U%!!<$G$N?7$7$$L?Na\e(B
* Agent Expiry:: \e$B8E$$5-;v$r>C$9J}K!\e(B
+* Agent and IMAP:: \e$B%(!<%8%'%s%H$r\e(B IMAP \e$B$G;H$&J}K!\e(B
* Outgoing Messages:: \e$BEj9F!"%a!<%k$r=P$9$H$-$K$J$K$,5/$3$k$N$+\e(B?
* Agent Variables:: \e$B%+%9%?%^%$%:$O3Z$7\e(B
* Example Setup:: \e$B%*%U%i%$%s?M4V$N$?$a$N\e(B @file{.gnus.el} \e$B$NNc\e(B
* Reverse Scoring:: \e$B8E$$$b$N$N;R$G$"$k$H$$$&LdBj$OLdBj$G$O$J$$\e(B
* Global Score Files:: \e$BCO$r$D$+$_!"<*$r@Z$jNv$/%9%3%"%U%!%$%k\e(B
* Kill Files:: \e$B$=$l$i$O$^$@$3$3$K$"$j$^$9$,!"L5;k$9$k;v$,$G$-$k\e(B
-@c * Converting Kill Files:: \e$B:o=|%U%!%$%k$r%9%3%"%U%!%$%k$KJQ49$9$k\e(B
* GroupLens:: \e$B$I$l$rFI$`$N$,9%$-$+$NM=8@$rF@$k\e(B
* Advanced Scoring:: \e$B%9%3%"$NK!B'$r:n$k$?$a$KO@M}I=8=$r;H$&\e(B
* Score Decays:: \e$B%9%3%"$r8O$l$F$$$+$;$k$N$OLr$KN)$D;v$b$"$k\e(B
(signature my-quote-randomizer))
((message-news-p)
(signature my-news-signature))
- (header "From.*To" "larsi.*org"
+ (header "From\\|To" "larsi.*org"
(Organization "Somewhere, Inc."))
((posting-from-work-p)
(signature-file "~/.work-signature")
\e$B$^$9!#=R8l$N40A4$J0lMw$O!"\e(BRFC2060 \e.A\eN'6.4.4 \e$B$rFI$s$G$/$@$5$$!#\e(B
@item :fetchflag
-\e$B%5!<%P!<$G!"<hF@$7$?5-;v$K0u$rIU$1$kJ}K!!#=i4|CM$N\e(B @samp{Deleted} \e$B$O$=$l\e(B
-\e$B$i$K>C5n$N0u$rIU$1$^$9$,!"B>$K\e(B @samp{Seen} \e$B$G$OC1$K4{FI$N0u$rIU$1$^$9!#\e(B
+\e$B%5!<%P!<$G!"<hF@$7$?5-;v$K0u$rIU$1$kJ}K!!#=i4|CM$N\e(B @samp{\Deleted} \e$B$O$=\e(B
+\e$B$l$i$K>C5n$N0u$rIU$1$^$9$,!"B>$K\e(B @samp{\Seen} \e$B$G$OC1$K4{FI$N0u$rIU$1$^$9!#\e(B
\e$B$3$l$i$O:G$b$"$j$=$&$JFs$D$NA*Br$G$9$,!"B>$N0u$b\e(B RFC2060 \e.A\eN'2.3.2 \e$B$GDj5A$5\e(B
\e$B$l$F$$$^$9!#\e(B
\e$B%H$G$9!#=i4|CM$O\e(B @code{nil} \e$B$G!"J,3d$O;HMQ$7$J$$$h$&$K$J$C$F$$$^$9\e(B!
@lisp
-(setq nnimap-split-inbox '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
+(setq nnimap-split-inbox
+ '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
@end lisp
Nnmail \e$B$KBP1~$9$k$b$N$O$"$j$^$;$s!#\e(B
@lisp
(setq nnimap-split-rule
- '(("INBOX.nnimap" "^Sender: owner-nnimap@@vic20.globalcom.se")
- ("INBOX.junk" "^Subject:.*MAKE MONEY")
- ("INBOX.private" "")))
+ '(("INBOX.nnimap" "^Sender: owner-nnimap@@vic20.globalcom.se")
+ ("INBOX.junk" "^Subject:.*MAKE MONEY")
+ ("INBOX.private" "")))
@end lisp
\e$B$3$l$O\e(B nnimap \e$B%a!<%j%s%0%j%9%H$+$i$NA4$F$N5-;v$r%a!<%k%\%C%/\e(B
* Agent Categories:: \e$B2?$r%@%&%s%m!<%I$9$k$+$r\e(B gnus \e$B%(!<%8%'%s%H$K65$($kJ}K!\e(B
* Agent Commands:: \e$B3F%P%C%U%!!<$G$N?7$7$$L?Na\e(B
* Agent Expiry:: \e$B8E$$5-;v$r>C$9J}K!\e(B
+* Agent and IMAP:: \e$B%(!<%8%'%s%H$r\e(B IMAP \e$B$G;H$&J}K!\e(B
* Outgoing Messages:: \e$BEj9F!"%a!<%k$r=P$9$H$-$K$J$K$,5/$3$k$N$+\e(B?
* Agent Variables:: \e$B%+%9%?%^%$%:$O3Z$7\e(B
* Example Setup:: \e$B%*%U%i%$%s?M4V$N$?$a$N\e(B @file{.gnus.el} \e$B$NNc\e(B
\e$B$9\e(B (@code{gnus-agent-remove-group})\e$B!#$3$NL?Na$O%W%m%;%9\e(B/\e$B@\F,<-$N=,47$rM}\e(B
\e$B2r$7$^$9!#\e(B(@pxref{Process/Prefix})\e$B!#\e(B
+@item J Y
+@kindex J Y (Agent Group)
+@findex gnus-agent-synchronize-flags
+Synchronize flags changed while unplugged with remote server, if any.
+
@end table
@node Summary Agent Commands
\e$B=i4|@_DjCM\e(B) \e$B$G$"$l$P!"4{FI5-;v$N$_$,>C5n$NBP>]$H$J$j!"L$FI!"2D;k!"J]N15-\e(B
\e$B;v$O$5$i$KL54|8B$KJ];}$7$^$9!#\e(B
+@node Agent and IMAP
+@subsection Agent and IMAP
+
+The Agent work with any Gnus backend, including nnimap. However, since
+there are some conceptual differences between NNTP and IMAP, this
+section (should) provide you with some information to make Gnus Agent
+work smoother as a IMAP Disconnected Mode client.
+
+The first thing to keep in mind is that all flags (read, ticked, etc)
+are kept on the IMAP server, rather than in @code{.newsrc} as is the
+case for nntp. Thus Gnus need to remember flag changes when
+disconnected, and synchronize these flags when you plug back in.
+
+Gnus keep track of flag changes when reading nnimap groups under the
+Agent by default. When you plug back in, by default Gnus will check if
+you have any changed any flags and ask if you wish to synchronize theese
+with the server. This behaviour is customizable with
+@code{gnus-agent-synchronize-flags}.
+
+@vindex gnus-agent-synchronize-flags
+If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
+never automatically synchronize flags. If it is @code{ask}, the
+default, the Agent will check if you made any changes and if so ask if
+you wish to synchronize these when you re-connect. If it has any other
+value, all flags will be synchronized automatically.
+
+If you do not wish to automatically synchronize flags when you
+re-connect, this can be done manually with the
+@code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
+in the group buffer by default.
+
+Some things are currently not implemented in the Agent that you'd might
+expect from a disconnected IMAP client, including:
+
+@itemize @bullet
+
+@item
+Copying/moving articles into nnimap groups when unplugged.
+
+@item
+Creating/deleting nnimap groups when unplugged.
+
+@end itemize
+
+Technical note: the synchronization algorithm does not work by "pushing"
+all local flags to the server, but rather incrementally update the
+server view of flags by changing only those flags that were changed by
+the user. Thus, if you set one flag on a article, quit the group and
+re-select the group and remove the flag; the flag will be set and
+removed from the server when you "synchronize". The queued flag
+operations can be found in the per-server @code{flags} file in the Agent
+directory. It's emptied when you synchronize flags.
+
@node Outgoing Messages
@subsection \e$B:9=PMQ%a%C%;!<%8\e(B
* Reverse Scoring:: \e$B8E$$$b$N$N;R$G$"$k$H$$$&LdBj$OLdBj$G$O$J$$\e(B
* Global Score Files:: \e$BCO$r$D$+$_!"<*$r@Z$jNv$/%9%3%"%U%!%$%k\e(B
* Kill Files:: \e$B$=$l$i$O$^$@$3$3$K$"$j$^$9$,!"L5;k$9$k;v$,$G$-$k\e(B
-@c * Converting Kill Files:: \e$B:o=|%U%!%$%k$r%9%3%"%U%!%$%k$KJQ49$9$k\e(B
* GroupLens:: \e$B$I$l$rFI$`$N$,9%$-$+$NM=8@$rF@$k\e(B
* Advanced Scoring:: \e$B%9%3%"$NK!B'$r:n$k$?$a$KO@M}I=8=$r;H$&\e(B
* Score Decays:: \e$B%9%3%"$r8O$l$F$$$+$;$k$N$OLr$KN)$D;v$b$"$k\e(B
\e$B>C5n%U%!%$%k$+$i%9%3%"%U%!%$%k$X$NJQ49%Q%C%1!<%8$O!"I8=`$G$O\e(Bgnus \e$B$K$O4^\e(B
\e$B$^$l$^$;$s!#\e(B
-@file{http://www.stud.ifi.uio.no/~larsi/ding-other/gnus-kill-to-score} \e$B$+\e(B
+@file{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el} \e$B$+\e(B
\e$B$iF~<j$9$k$3$H$,$G$-$^$9!#\e(B
\e$B$b$7$"$J$?$N>C5n%U%!%$%k$,Hs>o$KJ#;($J$b$N$G$"$l$P\e(B --- \e$B$=$l\e(B
* Agent Categories:: How to tell the Gnus Agent what to download.
* Agent Commands:: New commands for all the buffers.
* Agent Expiry:: How to make old articles go away.
+* Agent and IMAP:: How to use the Agent with IMAP.
* Outgoing Messages:: What happens when you post/mail something?
* Agent Variables:: Customizing is fun.
* Example Setup:: An example @file{.gnus.el} file for offline people.
* Reverse Scoring:: That problem child of old is not problem.
* Global Score Files:: Earth-spanning, ear-splitting score files.
* Kill Files:: They are still here, but they can be ignored.
-@c * Converting Kill Files:: Translating kill files to score files.
* GroupLens:: Getting predictions on what you like to read.
* Advanced Scoring:: Using logical expressions to build score rules.
* Score Decays:: It can be useful to let scores wither away.
(signature my-quote-randomizer))
((message-news-p)
(signature my-news-signature))
- (header "From.*To" "larsi.*org"
+ (header "From\\|To" "larsi.*org"
(Organization "Somewhere, Inc."))
((posting-from-work-p)
(signature-file "~/.work-signature")
complete list of predicates, see RFC 2060 §6.4.4.
@item :fetchflag
-How to flag fetched articles on the server, the default @samp{Deleted}
-will mark them as deleted, an alternative would be @samp{Seen} which
+How to flag fetched articles on the server, the default @samp{\Deleted}
+will mark them as deleted, an alternative would be @samp{\Seen} which
would simply mark them as read. These are the two most likely choices,
but more flags are defined in RFC 2060 §2.3.2.
disabled!
@lisp
-(setq nnimap-split-inbox '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
+(setq nnimap-split-inbox
+ '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
@end lisp
No nnmail equivalent.
@lisp
(setq nnimap-split-rule
- '(("INBOX.nnimap" "^Sender: owner-nnimap@@vic20.globalcom.se")
- ("INBOX.junk" "^Subject:.*MAKE MONEY")
- ("INBOX.private" "")))
+ '(("INBOX.nnimap" "^Sender: owner-nnimap@@vic20.globalcom.se")
+ ("INBOX.junk" "^Subject:.*MAKE MONEY")
+ ("INBOX.private" "")))
@end lisp
This will put all articles from the nnimap mailing list into mailbox
* Agent Categories:: How to tell the Gnus Agent what to download.
* Agent Commands:: New commands for all the buffers.
* Agent Expiry:: How to make old articles go away.
+* Agent and IMAP:: How to use the Agent with IMAP.
* Outgoing Messages:: What happens when you post/mail something?
* Agent Variables:: Customizing is fun.
* Example Setup:: An example @file{.gnus.el} file for offline people.
(@code{gnus-agent-remove-group}). This command understands the
process/prefix convention (@pxref{Process/Prefix}).
+@item J Y
+@kindex J Y (Agent Group)
+@findex gnus-agent-synchronize-flags
+Synchronize flags changed while unplugged with remote server, if any.
+
+
@end table
unread, ticked and dormant articles will be kept indefinitely.
+@node Agent and IMAP
+@subsection Agent and IMAP
+
+The Agent work with any Gnus backend, including nnimap. However, since
+there are some conceptual differences between NNTP and IMAP, this
+section (should) provide you with some information to make Gnus Agent
+work smoother as a IMAP Disconnected Mode client.
+
+The first thing to keep in mind is that all flags (read, ticked, etc)
+are kept on the IMAP server, rather than in @code{.newsrc} as is the
+case for nntp. Thus Gnus need to remember flag changes when
+disconnected, and synchronize these flags when you plug back in.
+
+Gnus keep track of flag changes when reading nnimap groups under the
+Agent by default. When you plug back in, by default Gnus will check if
+you have any changed any flags and ask if you wish to synchronize theese
+with the server. This behaviour is customizable with
+@code{gnus-agent-synchronize-flags}.
+
+@vindex gnus-agent-synchronize-flags
+If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
+never automatically synchronize flags. If it is @code{ask}, the
+default, the Agent will check if you made any changes and if so ask if
+you wish to synchronize these when you re-connect. If it has any other
+value, all flags will be synchronized automatically.
+
+If you do not wish to automatically synchronize flags when you
+re-connect, this can be done manually with the
+@code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
+in the group buffer by default.
+
+Some things are currently not implemented in the Agent that you'd might
+expect from a disconnected IMAP client, including:
+
+@itemize @bullet
+
+@item
+Copying/moving articles into nnimap groups when unplugged.
+
+@item
+Creating/deleting nnimap groups when unplugged.
+
+@end itemize
+
+Technical note: the synchronization algorithm does not work by "pushing"
+all local flags to the server, but rather incrementally update the
+server view of flags by changing only those flags that were changed by
+the user. Thus, if you set one flag on a article, quit the group and
+re-select the group and remove the flag; the flag will be set and
+removed from the server when you "synchronize". The queued flag
+operations can be found in the per-server @code{flags} file in the Agent
+directory. It's emptied when you synchronize flags.
+
+
@node Outgoing Messages
@subsection Outgoing Messages
* Reverse Scoring:: That problem child of old is not problem.
* Global Score Files:: Earth-spanning, ear-splitting score files.
* Kill Files:: They are still here, but they can be ignored.
-@c * Converting Kill Files:: Translating kill files to score files.
* GroupLens:: Getting predictions on what you like to read.
* Advanced Scoring:: Using logical expressions to build score rules.
* Score Decays:: It can be useful to let scores wither away.
The kill to score conversion package isn't included in Gnus by default.
You can fetch it from
-@file{http://www.stud.ifi.uio.no/~larsi/ding-other/gnus-kill-to-score}.
+@file{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
If your old kill files are very complex---if they contain more
non-@code{gnus-kill} forms than not, you'll have to convert them by