+2001-02-17 Paul Jarc <prj@po.cwru.edu>
+ Committed by ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-get-reply-headers): Fix bug with
+ Mail-Followup-To/to-address interaction.
+
+2001-02-17 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-msg.el (gnus-configure-posting-styles): Match header in
+ gnus-article-copy.
+
+2001-02-16 22:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-do-send-housekeeping): Rename to a better
+ name.
+
+2001-02-16 18:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-cancel-news): Check article first, then ask
+ yes or no.
+
+2001-02-16 14:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-uu.el (mm-uu-type-alist): Add emacs-sources.
+
+2001-02-16 11:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-range.el (gnus-range-normalize): New function.
+
2001-02-15 NAGY Andras <nagya@inf.elte.hu>
* imap.el (imap-gssapi-open): Set imap-c-l-s-first.
;; Regexp string match on the group name.
(string-match match group))
((eq match 'header)
- (let ((header (message-fetch-field (pop style))))
- (and header
- (string-match (pop style) header))))
+ (and (gnus-buffer-live-p gnus-article-copy)
+ (with-current-buffer gnus-article-copy
+ (let ((header (message-fetch-field (pop style))))
+ (and header
+ (string-match (pop style) header))))))
((or (symbolp match)
(gnus-functionp match))
(cond
;;; List and range functions
+(defsubst gnus-range-normalize (range)
+ "Normalize RANGE.
+If RANGE is a single range, return (RANGE). Otherwise, return RANGE."
+ (if (listp (cdr range)) (list range) range))
+
(defun gnus-last-element (list)
"Return last element of LIST."
(while (cdr list)
;; Rename the buffer.
(if message-send-rename-function
(funcall message-send-rename-function)
- (when (string-match "\\`\\*\\(unsent \\)?" (buffer-name))
- (rename-buffer
- (concat "*sent " (substring (buffer-name) (match-end 0))) t)))
+ (when (string-match "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*"
+ (buffer-name))
+ (let ((name (match-string 2 (buffer-name)))
+ to group)
+ (if (not (or (string-equal name "mail")
+ (string-equal name "news")))
+ (setq name (concat "*sent " name "*"))
+ (setq to (message-fetch-field "to"))
+ (setq group (message-fetch-field "newsgroups"))
+ (setq name
+ (cond
+ (to (concat "*sent mail to "
+ (or (car (mail-extract-address-components to))
+ to) "*"))
+ ((and group (not (string= group "")))
+ (concat "*sent news on " group "*"))
+ (t "*sent mail*"))))
+ (unless (string-equal name (buffer-name))
+ (rename-buffer name t)))))
;; Push the current buffer onto the list.
(when message-max-buffers
(setq message-buffer-list
"that mailing list") ".")))
(setq mft nil))
- (if (or (not wide)
- to-address)
+ (if (and (or (not message-use-followup-to)
+ (not mft))
+ (or (not wide)
+ to-address))
(progn
(setq follow-to (list (cons 'To
(or to-address mrt reply-to mft from))))
(interactive "P")
(unless (message-news-p)
(error "This is not a news article; canceling is impossible"))
- (when (yes-or-no-p "Do you really want to cancel this article? ")
- (let (from newsgroups message-id distribution buf sender)
- (save-excursion
- ;; Get header info from original article.
- (save-restriction
- (message-narrow-to-head-1)
- (setq from (message-fetch-field "from")
- sender (message-fetch-field "sender")
- newsgroups (message-fetch-field "newsgroups")
- message-id (message-fetch-field "message-id" t)
- distribution (message-fetch-field "distribution")))
- ;; Make sure that this article was written by the user.
- (unless (or (message-gnksa-enable-p 'cancel-messages)
- (and sender
- (string-equal
- (downcase sender)
- (downcase (message-make-sender))))
- (string-equal
- (downcase (cadr (std11-extract-address-components
- from)))
- (downcase (cadr (std11-extract-address-components
- (message-make-from))))))
- (error "This article is not yours"))
+ (let (from newsgroups message-id distribution buf sender)
+ (save-excursion
+ ;; Get header info from original article.
+ (save-restriction
+ (message-narrow-to-head-1)
+ (setq from (message-fetch-field "from")
+ sender (message-fetch-field "sender")
+ newsgroups (message-fetch-field "newsgroups")
+ message-id (message-fetch-field "message-id" t)
+ distribution (message-fetch-field "distribution")))
+ ;; Make sure that this article was written by the user.
+ (unless (or (message-gnksa-enable-p 'cancel-messages)
+ (and sender
+ (string-equal
+ (downcase sender)
+ (downcase (message-make-sender))))
+ (string-equal
+ (downcase (cadr (std11-extract-address-components from)))
+ (downcase (cadr (std11-extract-address-components
+ (message-make-from))))))
+ (error "This article is not yours"))
+ (when (yes-or-no-p "Do you really want to cancel this article? ")
;; Make control message.
(if arg
(message-news)
mail-header-separator "\n"
message-cancel-message)
(run-hooks 'message-cancel-hook)
- (message "Canceling your article...")
(unless arg
+ (message "Canceling your article...")
(if (let ((message-syntax-checks
'dont-check-for-anything-just-trust-me)
(message-encoding-buffer (current-buffer))
;;; mm-uu.el -- Return uu stuff as mm handles
-;; Copyright (c) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
-;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
+;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
;; This file is part of GNU Emacs.
decoder, such as hexbin."
:type '(choice (item :tag "internal" binhex-decode-region)
(item :tag "external" binhex-decode-region-external))
- :group 'gnus-article-mime)
+ :group 'gnus-article-mime)
(defvar mm-uu-pgp-beginning-signature
"^-----BEGIN PGP SIGNATURE-----")
"The default disposition of uu parts.
This can be either \"inline\" or \"attachment\".")
+(defvar mm-uu-emacs-sources-regexp "gnu\\.emacs\\.sources"
+ "The regexp of emacs sources groups.")
+
(defvar mm-uu-type-alist
- '((postscript
+ '((postscript
"^%!PS-"
"^%%EOF$"
mm-uu-postscript-extract
nil)
- (uu
+ (uu
"^begin[ \t]+[0-7][0-7][0-7][ \t]+"
"^end[ \t]*$"
mm-uu-uu-extract
mm-uu-binhex-extract
nil
mm-uu-binhex-filename)
- (shar
+ (shar
"^#! */bin/sh"
"^exit 0$"
mm-uu-shar-extract)
- (forward
-;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
+ (forward
+;;; Thanks to Edward J. Sabol <sabol@alderaan.gsfc.nasa.gov> and
;;; Peter von der Ah\'e <pahe@daimi.au.dk>
"^-+ \\(Start of \\)?Forwarded message"
"^-+ End \\(of \\)?forwarded message"
"^-----END PGP PUBLIC KEY BLOCK-----"
mm-uu-pgp-key-extract
mm-uu-gpg-key-skip-to-last
- nil)))
+ nil)
+ (emacs-sources
+ "^;;;?[ \t]*[^ \t]+\\.el[ \t]*--"
+ "^;;;?[ \t]*\\([^ \t]+\\.el\\)[ \t]+ends here"
+ mm-uu-emacs-sources-extract
+ nil
+ mm-uu-emacs-sources-test)))
(defcustom mm-uu-configure-list nil
"A list of mm-uu configuration.
To disable dissecting shar codes, for instance, add
`(shar . disabled)' to this list."
- :type `(repeat (cons
+ :type `(repeat (cons
,(cons 'choice
(mapcar
(lambda (entry)
(if symbol (set-default symbol value))
(setq mm-uu-beginning-regexp nil)
(mapcar (lambda (entry)
- (if (mm-uu-configure-p (mm-uu-type entry) 'disabled)
+ (if (mm-uu-configure-p (mm-uu-type entry) 'disabled)
nil
(setq mm-uu-beginning-regexp
(concat mm-uu-beginning-regexp
(mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
'("application/postscript")))
+(defun mm-uu-emacs-sources-extract ()
+ (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
+ '("application/emacs-lisp")
+ nil nil
+ (list mm-dissect-disposition
+ (cons 'filename file-name))))
+
+(eval-when-compile
+ (defvar gnus-newsgroup-name))
+
+(defun mm-uu-emacs-sources-test ()
+ (setq file-name (match-string 1))
+ (and gnus-newsgroup-name
+ mm-uu-emacs-sources-regexp
+ (string-match mm-uu-emacs-sources-regexp gnus-newsgroup-name)))
+
(defun mm-uu-forward-extract ()
- (mm-make-handle (mm-uu-copy-to-buffer
+ (mm-make-handle (mm-uu-copy-to-buffer
(progn (goto-char start-point) (forward-line) (point))
(progn (goto-char end-point) (forward-line -1) (point)))
'("message/rfc822" (charset . gnus-decoded))))
((eq mm-verify-option 'known) t)
(t (y-or-n-p "Verify pgp signed part?")))))
+(eval-when-compile
+ (defvar gnus-newsgroup-charset))
+
(defun mm-uu-pgp-signed-extract-1 (handles ctl)
(let ((buf (mm-uu-copy-to-buffer (point-min) (point-max))))
(with-current-buffer buf
(funcall (mml2015-clear-verify-function))))
(when (and mml2015-use (null (mml2015-clear-verify-function)))
(mm-set-handle-multipart-parameter
- mm-security-handle 'gnus-details
+ mm-security-handle 'gnus-details
(format "Clear verification not supported by `%s'.\n" mml2015-use))))
(goto-char (point-min))
(if (search-forward "\n\n" nil t)
(defun mm-uu-pgp-signed-extract ()
(let ((mm-security-handle (list (format "multipart/signed"))))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'protocol "application/x-gnus-pgp-signature")
(save-restriction
(narrow-to-region start-point end-point)
(list 'buffer (mm-uu-copy-to-buffer))
(car mm-security-handle))
(setcdr mm-security-handle
- (mm-uu-pgp-signed-extract-1 nil
+ (mm-uu-pgp-signed-extract-1 nil
mm-security-handle)))
mm-security-handle))
(defun mm-uu-pgp-encrypted-extract ()
(let ((mm-security-handle (list (format "multipart/encrypted"))))
- (mm-set-handle-multipart-parameter
+ (mm-set-handle-multipart-parameter
mm-security-handle 'protocol "application/x-gnus-pgp-encrypted")
(save-restriction
(narrow-to-region start-point end-point)
(list 'buffer (mm-uu-copy-to-buffer))
(car mm-security-handle))
(setcdr mm-security-handle
- (mm-uu-pgp-encrypted-extract-1 nil
+ (mm-uu-pgp-encrypted-extract-1 nil
mm-security-handle)))
mm-security-handle))
(defun mm-uu-dissect ()
"Dissect the current buffer and return a list of uu handles."
(let ((case-fold-search t)
- text-start start-point end-point file-name result
+ text-start start-point end-point file-name result
text-plain-type entry func)
(save-excursion
(goto-char (point-min))
- (cond
+ (cond
((looking-at "\n")
(forward-line))
((search-forward "\n\n" nil t)
(let ((alist mm-uu-type-alist)
(beginning-regexp (match-string 0)))
(while (not entry)
- (if (string-match (mm-uu-beginning-regexp (car alist))
+ (if (string-match (mm-uu-beginning-regexp (car alist))
beginning-regexp)
(setq entry (car alist))
(pop alist))))
+2001-02-17 13:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus.texi (Posting Styles): Doc fix.
+
+2001-02-16 Simon Josefsson <sjosefsson@rsasecurity.com>
+
+ * gnus.texi (Optional Backend Functions): Fix case.
+
2001-02-14 Kai Gro\e,A_\e(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* gnus.texi (Unread Articles): Say that Gnus itself never expires
\e$B%@!<\e(B @samp{What me?} \e$B$r;}$A$^$9!#\e(B
\e$B$=$l$>$l$NMM<0$N:G=i$NMWAG$O\e(B @code{\e$B9gCW\e(B} (match) \e$B$H8F$P$l$^$9!#$b$7$=$l\e(B
-\e$B$,J8;zNs$G$"$l$P!"\e(Bgnus \e$B$O$=$l$r%0%k!<%WL>$K@55,I=8=$H$7$F9gCWA`:n$r9T$$\e(B
-\e$B$^$9!#%7%s%\%k\e(B @code{header} \e$B$G$"$l$P!"\e(Bgnus \e$B$O$=$N9gCW$NCf$N<!$NMWAG$K9g\e(B
-\e$BCW$9$k%X%C%@!<$rC5$7!"$=$l$r$=$N9gCW$N:G8e$N%X%C%@!<$HHf3S$7$^$9!#$b$7$=\e(B
-\e$B$l$,4X?t$N%7%s%\%k$G$"$l$P!"$=$N4X?t$,0z?tL5$7$G8F$P$l$^$9!#$=$l$,JQ?t$N\e(B
-\e$B%7%s%\%k$G$"$l$P!"$=$NJQ?t$,;2>H$5$l$^$9!#$=$l$,%j%9%H$G$"$l$P!"$=$N%j%9\e(B
-\e$B%H$,\e(B @code{\e$BI>2A\e(B} \e$B$5$l$^$9!#$I$N>l9g$G$b!"$3$l$,\e(B @code{nil}\e$B$G$J$$CM$r5"$;\e(B
-\e$B$P!"MM<0$O\e(B @code{\e$B9gCW$7$?\e(B} \e$B$H8@$$$^$9!#\e(B
+\e$B$,J8;zNs$G$"$l$P!"\e(Bgnus \e$B$O$=$l$r%0%k!<%WL>$K@55,I=858=$H$7$F9gCWA`:n$r9T\e(B
+\e$B$$$^$9!#%7%s%\%k\e(B @code{header} \e$B$G$"$l$P!"\e(Bgnus \e$B$O85$N5-;v$NCf$+$i$=$N9gCW\e(B
+\e$B$NCf$N<!$NMWAG$K9gCW$9$k%X%C%@!<$rC5$7!"$=$l$r$=$N9gCW$N:G8e$N@55,I=858=\e(B
+\e$B$HHf3S$7$^$9!#$b$7$=$l$,4X?t$N%7%s%\%k$G$"$l$P!"$=$N4X?t$,0z?tL5$7$G8F$P\e(B
+\e$B$l$^$9!#$=$l$,JQ?t$N%7%s%\%k$G$"$l$P!"$=$NJQ?t$,;2>H$5$l$^$9!#$=$l$,%j%9\e(B
+\e$B%H$G$"$l$P!"$=$N%j%9%H$,\e(B @code{\e$BI>2A\e(B} \e$B$5$l$^$9!#$I$N>l9g$G$b!"$3$l\e(B
+\e$B$,\e(B @code{nil}\e$B$G$J$$CM$r5"$;$P!"MM<0$O\e(B @code{\e$B9gCW$7$?\e(B} \e$B$H8@$$$^$9!#\e(B
\e$B$=$l$>$l$NMM<0$OG$0U$NNL$N\e(B @dfn{\e$BB0@-\e(B} \e$B$r;}$D;v$,$G$-$^$9!#$=$l$>$l$NB0@-\e(B
\e$B$O\e(B @code{(@var{name} . @var{value})} \e$B$NBP$K$h$j@.$jN)$C$F$$$^$9!#B0@-L>\e(B
(signature my-quote-randomizer))
((message-news-p)
(signature my-news-signature))
- (header "From\\|To" "larsi.*org"
+ (header "to" "larsi.*org"
(Organization "Somewhere, Inc."))
((posting-from-work-p)
(signature-file "~/.work-signature")
The first element in each style is called the @code{match}. If it's a
string, then Gnus will try to regexp match it against the group name.
-If it is the symbol @code{header}, then Gnus will look for header that
-match the next element in the match, and compare that to the last header
-in the match. If it's a function symbol, that function will be called
-with no arguments. If it's a variable symbol, then the variable will be
-referenced. If it's a list, then that list will be @code{eval}ed. In
-any case, if this returns a non-@code{nil} value, then the style is said
-to @dfn{match}.
+If it is the symbol @code{header}, then Gnus will look for header (the
+next element in the match) in the original article , and compare that to
+the last regexp in the match. If it's a function symbol, that function
+will be called with no arguments. If it's a variable symbol, then the
+variable will be referenced. If it's a list, then that list will be
+@code{eval}ed. In any case, if this returns a non-@code{nil} value,
+then the style is said to @dfn{match}.
Each style may contain a arbitrary amount of @dfn{attributes}. Each
attribute consists of a @code{(@var{name} . @var{value})} pair. The
(signature my-quote-randomizer))
((message-news-p)
(signature my-news-signature))
- (header "From\\|To" "larsi.*org"
+ (header "to" "larsi.*org"
(Organization "Somewhere, Inc."))
((posting-from-work-p)
(signature-file "~/.work-signature")
(RANGE ACTION MARK)
@end example
-Range is a range of articles you wish to update marks on. Action is
+RANGE is a range of articles you wish to update marks on. ACTION is
@code{set}, @code{add} or @code{del}, respectively used for removing all
existing marks and setting them as specified, adding (preserving the
marks not mentioned) mark and removing (preserving the marks not
-mentioned) marks. Mark is a list of marks; where each mark is a symbol.
+mentioned) marks. MARK is a list of marks; where each mark is a symbol.
Currently used marks are @code{read}, @code{tick}, @code{reply},
@code{expire}, @code{killed}, @code{dormant}, @code{save},
@code{download} and @code{unsend}, but your backend should, if possible,