* gnus-sum.el (gnus-summary-add-mark): New function.
* gnus-group.el (gnus-add-mark): New function.
* gnus-sum.el (gnus-summary-buffer-name): New function.
(gnus-summary-setup-buffer): Use it.
* gnus-draft.el: Set things up with the right post method and
stuff.
* message.el (message-ignored-news-headers): Remove X-Draft-From.
* gnus-msg.el (gnus-inews-insert-draft-meta-information): New function.
* gnus.el (gnus-draft-meta-information-header): New variable.
* gnus-art.el (gnus-treatment-function-alist): Move the date
functions before the header sorting functions.
* mm-uu.el (mm-uu-pgp-signed-extract-1): Unquote "- " quotes.
* dgnushack.el (dgnushack-compile): Message whether there is w3.
Don't (push "/usr/share/emacs/site-lisp" load-path).
+2000-12-31 03:57:31 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-draft.el: Mark articles as replied.
+
+ * gnus-sum.el (gnus-summary-add-mark): New function.
+
+ * gnus-group.el (gnus-add-mark): New function.
+
+ * gnus-sum.el (gnus-summary-buffer-name): New function.
+ (gnus-summary-setup-buffer): Use it.
+
+ * gnus-draft.el: Set things up with the right post method and
+ stuff.
+
+ * message.el (message-ignored-news-headers): Remove X-Draft-From.
+
+ * gnus-msg.el (gnus-inews-insert-draft-meta-information): New function.
+
+ * gnus.el (gnus-draft-meta-information-header): New variable.
+
2000-12-30 00:17:38 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-art.el (gnus-treatment-function-alist): Move the date
+ functions before the header sorting functions.
+
+ * mm-uu.el (mm-uu-pgp-signed-extract-1): Unquote "- " quotes.
+
+ * dgnushack.el (dgnushack-compile): Message whether there is w3.
+ Don't (push "/usr/share/emacs/site-lisp" load-path).
+
* gnus-cite.el (gnus-article-fill-cited-article): Don't add space
to empty fill prefixes.
(push (or (getenv "lispdir")
"/usr/share/emacs/site-lisp")
load-path)
+
(push (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir))
load-path)
(require 'bytecomp)
-(push "/usr/share/emacs/site-lisp" load-path)
(push srcdir load-path)
(load (expand-file-name "lpath.el" srcdir) nil t)
file elc)
(dolist (file '("dgnushack.el" "lpath.el"))
(setq files (delete file files)))
- (if (featurep 'base64)
- (setq files (delete "base64.el" files)))
- (condition-case ()
- (require 'w3-forms)
+ (when (featurep 'base64)
+ (setq files (delete "base64.el" files)))
+ (condition-case code
+ (require 'w3-forms)
(error
+ (message "No w3: %s %s" code (locate-library "w3-forms"))
(dolist (file '("nnweb.el" "nnlistserv.el" "nnultimate.el"
"nnslashdot.el" "nnwarchive.el" "webmail.el"
"nnwfm.el"))
(defun gnus-agent-insert-meta-information (type &optional method)
"Insert meta-information into the message that says how it's to be posted.
-TYPE can be either `mail' or `news'. If the latter METHOD can
+TYPE can be either `mail' or `news'. If the latter, then METHOD can
be a select method."
(save-excursion
(message-remove-header gnus-agent-meta-information-header)
(gnus-treat-strip-cr gnus-article-remove-cr)
(gnus-treat-emphasize gnus-article-emphasize)
(gnus-treat-display-xface gnus-article-display-x-face)
+ (gnus-treat-date-ut gnus-article-date-ut)
+ (gnus-treat-date-local gnus-article-date-local)
+ (gnus-treat-date-english gnus-article-date-english)
+ (gnus-treat-date-lapsed gnus-article-date-lapsed)
+ (gnus-treat-date-original gnus-article-date-original)
+ (gnus-treat-date-user-defined gnus-article-date-user)
+ (gnus-treat-date-iso8601 gnus-article-date-iso8601)
(gnus-treat-hide-headers gnus-article-maybe-hide-headers)
(gnus-treat-hide-boring-headers gnus-article-hide-boring-headers)
(gnus-treat-hide-signature gnus-article-hide-signature)
(gnus-treat-highlight-headers gnus-article-highlight-headers)
(gnus-treat-highlight-citation gnus-article-highlight-citation)
(gnus-treat-highlight-signature gnus-article-highlight-signature)
- (gnus-treat-date-ut gnus-article-date-ut)
- (gnus-treat-date-local gnus-article-date-local)
- (gnus-treat-date-english gnus-article-date-english)
- (gnus-treat-date-lapsed gnus-article-date-lapsed)
- (gnus-treat-date-original gnus-article-date-original)
- (gnus-treat-date-user-defined gnus-article-date-user)
- (gnus-treat-date-iso8601 gnus-article-date-iso8601)
(gnus-treat-strip-trailing-blank-lines
gnus-article-remove-trailing-blank-lines)
(gnus-treat-strip-leading-blank-lines
(progn
(defun gnus-draft-setup (narticle group &optional restore)
- (gnus-setup-message 'forward
- (let ((article narticle))
- (message-mail)
- (erase-buffer)
- (if (not (gnus-request-restore-buffer article group))
- (error "Couldn't restore the article")
- (if (and restore (equal group "nndraft:queue"))
+ (let (ga)
+ (gnus-setup-message 'forward
+ (let ((article narticle))
+ (message-mail)
+ (erase-buffer)
+ (if (not (gnus-request-restore-buffer article group))
+ (error "Couldn't restore the article")
+ (when (and restore
+ (equal group "nndraft:queue"))
(mime-to-mml))
- ;; Insert the separator.
- (goto-char (point-min))
- (search-forward "\n\n")
- (forward-char -1)
- (insert mail-header-separator)
- (forward-line 1)
- (message-set-auto-save-file-name))))))
+ ;; Insert the separator.
+ (goto-char (point-min))
+ (search-forward "\n\n")
+ (forward-char -1)
+ (insert mail-header-separator)
+ (forward-line 1)
+ (setq ga (message-fetch-field gnus-draft-meta-information-header))
+ (message-set-auto-save-file-name))))
+ (when (and ga
+ (ignore-errors (setq ga (car (read-from-string ga)))))
+ (setq message-post-method
+ `(lambda (arg)
+ (gnus-post-method arg ,(car ga))))
+ (message-add-action
+ `(gnus-add-mark ,(car ga) 'replied ,(cadr ga))
+ 'send)))))
(defun gnus-draft-article-sendable-p (article)
"Say whether ARTICLE is sendable."
(setcar (nthcdr 2 entry) info)
(when (and (not (eq (car entry) t))
(gnus-active (gnus-info-group info)))
- (setcar entry (length (gnus-list-of-unread-articles (car info))))))
+ (setcar entry (length
+ (gnus-list-of-unread-articles (car info))))))
(error "No such group: %s" (gnus-info-group info))))))
(defun gnus-group-set-method-info (group select-method)
(sort (nconc (gnus-uncompress-range (cdr m))
(copy-sequence articles)) '<) t))))))
+(defun gnus-add-mark (group mark article)
+ "Mark ARTICLE in GROUP with MARK, whether the group is displayed or not."
+ (let ((buffer (gnus-summary-buffer-name group)))
+ (if (gnus-buffer-live-p buffer)
+ (save-excursion
+ (set-buffer (get-buffer buffer))
+ (gnus-summary-add-mark article mark))
+ (gnus-add-marked-articles group (cdr (assq mark gnus-article-mark-lists))
+ (list article)))))
+
;;;
;;; Group timestamps
;;;
(progn
,@forms)
(gnus-inews-add-send-actions ,winconf ,buffer ,article)
+ (gnus-inews-insert-draft-meta-information ,group ,article)
(setq gnus-message-buffer (current-buffer))
(set (make-local-variable 'gnus-message-group-art)
(cons ,group ,article))
(gnus-configure-windows ,config t)
(set-buffer-modified-p nil))))
+(defun gnus-inews-insert-draft-meta-information (group article)
+ (save-excursion
+ (when (and group
+ (not (string= group ""))
+ (not (message-fetch-field gnus-draft-meta-information-header)))
+ (goto-char (point-min))
+ (insert gnus-draft-meta-information-header ": (\"" group "\" "
+ (if article (number-to-string article) "\"\"") ")\n"))))
+
;;;###autoload
(defun gnus-msg-mail (&rest args)
"Start editing a mail message to be sent.
;;;###autoload
(define-mail-user-agent 'gnus-user-agent
- 'gnus-msg-mail 'message-send-and-exit
- 'message-kill-buffer 'message-send-hook)
+ 'gnus-msg-mail 'message-send-and-exit
+ 'message-kill-buffer 'message-send-hook)
(defun gnus-setup-posting-charset (group)
(let ((alist gnus-group-posting-charset-alist)
(gnus-set-active group (cons (car active)
(cdr group-art))))
(gnus-activate-group group)))
- (let ((buffer (concat "*Summary " group "*"))
+ (let ((buffer (gnus-summary-buffer-name group))
(mark gnus-read-mark)
(article (cdr group-art)))
(unless
(aset table i [??]))))
(setq buffer-display-table table)))
+(defun gnus-summary-buffer-name (group)
+ "Return the summary buffer name of GROUP."
+ (concat "*Summary " group "*"))
+
(defun gnus-summary-setup-buffer (group)
"Initialize summary buffer."
- (let ((buffer (concat "*Summary " group "*")))
+ (let ((buffer (gnus-summary-buffer-name group)))
(if (get-buffer buffer)
(progn
(set-buffer buffer)
(gnus-summary-remove-process-mark (car gnus-newsgroup-processable))))
(gnus-summary-position-point))
+(defun gnus-summary-add-mark (article type)
+ "Mark ARTICLE with a mark of TYPE."
+ (let ((vtype (car (assq type gnus-article-mark-lists)))
+ var)
+ (if (not vtype)
+ (error "No such mark type: %s" type)
+ (setq var (intern (format "gnus-newsgroup-%s" type)))
+ (set var (cons article (symbol-value var)))
+ (if (memq type '(processable cached replied saved))
+ (gnus-summary-update-secondary-mark article)
+ ;;; !!! This is bobus. We should find out what primary
+ ;;; !!! mark we want to set.
+ (gnus-summary-update-mark gnus-del-mark 'unread)))))
+
(defun gnus-summary-mark-as-expirable (n)
"Mark N articles forward as expirable.
If N is negative, mark backward instead. The difference between N and
(defvar gnus-agent-gcc-header "X-Gnus-Agent-Gcc")
(defvar gnus-agent-meta-information-header "X-Gnus-Agent-Meta-Information")
+(defvar gnus-draft-meta-information-header "X-Draft-From")
(defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
(defvar gnus-original-article-buffer " *Original Article*")
(defvar gnus-newsgroup-name nil)
set-buffer-multibyte set-char-table-range
set-face-stipple set-frame-face-alist track-mouse
url-retrieve w3-form-encode-xwfu window-at
- window-edges x-color-values x-popup-menu))
+ window-edges x-color-values x-popup-menu browse-url
+ frame-char-height frame-char-width))
(maybe-bind '(buffer-display-table
buffer-file-coding-system font-lock-defaults
global-face-data gnus-article-x-face-too-ugly
:type 'sexp)
(defcustom message-ignored-news-headers
- "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:"
+ "^NNTP-Posting-Host:\\|^Xref:\\|^[BGF]cc:\\|^Resent-Fcc:\\|X-Draft-From:"
"*Regexp of headers to be removed unconditionally before posting."
:group 'message-news
:group 'message-headers
(if (search-forward "\n\n" nil t)
(delete-region (point-min) (point)))
(if (re-search-forward mm-uu-pgp-beginning-signature nil t)
- (delete-region (match-beginning 0) (point-max))))
- (list
- (mm-make-handle buf
- '("text/plain" (charset . gnus-decoded))))))
+ (delete-region (match-beginning 0) (point-max)))
+ (goto-char (point-min))
+ (while (re-search-forward "^- " nil t)
+ (replace-match "" t t)
+ (forward-line 1)))
+ (list (mm-make-handle buf '("text/plain" (charset . gnus-decoded))))))
(defun mm-uu-pgp-signed-extract ()
(let ((mm-security-handle (list (format "multipart/signed"))))