+2005-09-27 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * mm-uu.el (mm-uu-emacs-sources-regexp): Make variable
+ customizable. Change default value.
+ (mm-uu-diff-groups-regexp): Change default value.
+ (mm-uu-type-alist): Added doc string.
+ (mm-uu-configure): Added doc string. Make it interactive.
+ (mm-uu-tex-groups-regexp): New variable.
+ (mm-uu-latex-extract, mm-uu-latex-test): New functions.
+ (mm-uu-type-alist): Added LaTeX documents.
+ (mm-uu-verbatim-marks-extract): Use "text/x-gnus-verbatim" instead
+ of "text/verbatim"..
+ (mm-uu-diff-groups-regexp): Fix missing quotes from previous
+ commit.
+
+ * mm-decode.el (mm-automatic-display): Use "text/x-gnus-verbatim"
+ instead of "text/verbatim".
+
+ * message.el (message-mark-inserted-region)
+ (message-mark-insert-file): Use slrn style marks when called with
+ prefix argument.
+
+2005-09-27 Simon Josefsson <jas@extundo.com>
+
+ * message.el (message-idna-to-ascii-rhs-1): Reformat.
+
+2005-09-27 Arne J\e,Ax\e(Brgensen <arne@arnested.dk>
+
+ * message.el (message-remove-duplicates): New function.
+ Implementation borrowed from `gnus-remove-duplicates'.
+ (message-idna-to-ascii-rhs): Also encode idna addresses in
+ Reply-To:, Mail-Reply-To: and Mail-Followup-To:.
+ (message-idna-to-ascii-rhs-1): When `message-use-idna' is 'ask
+ only ask about the same idna domain once per header and also tell
+ in what header to replace the idna domain.
+
+ * gnus-art.el (article-decode-idna-rhs): Also decode idna
+ addresses in Reply-To:, Mail-Reply-To: and Mail-Followup-To:.
+ (article-decode-idna-rhs): Fix regexp so that all idna-address in
+ a header is decoded and not just the last one.
+
2005-09-27 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mime-display-single): Don't modify text if it
(autoload 'idna-to-unicode "idna")
(defun article-decode-idna-rhs ()
- "Decode IDNA strings in RHS in From:, To: and Cc: headers in current buffer."
+ "Decode IDNA strings in RHS in various headers in current buffer.
+The following headers are decoded: From:, To:, Cc:, Reply-To:,
+Mail-Reply-To: and Mail-Followup-To:."
(when gnus-use-idna
(save-restriction
(let ((inhibit-point-motion-hooks t)
(inhibit-read-only t))
(article-narrow-to-head)
(goto-char (point-min))
- (while (re-search-forward "@.*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
+ (while (re-search-forward "@[^ \t\n\r,>]*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
(let (ace unicode)
(when (save-match-data
(and (setq ace (match-string 1))
(save-excursion
(and (re-search-backward "^[^ \t]" nil t)
- (looking-at "From\\|To\\|Cc")))
+ (looking-at "From\\|To\\|Cc\\|Reply-To\\|Mail-Reply-To\\|Mail-Followup-To")))
(setq unicode (idna-to-unicode ace))))
(unless (string= ace unicode)
(replace-match unicode nil nil nil 1)))))))))
old-subject ")\n")))))))))
;;;###autoload
-(defun message-mark-inserted-region (beg end)
+(defun message-mark-inserted-region (beg end &optional verbatim)
"Mark some region in the current article with enclosing tags.
-See `message-mark-insert-begin' and `message-mark-insert-end'."
- (interactive "r")
+See `message-mark-insert-begin' and `message-mark-insert-end'.
+If VERBATIM, use slrn style verbatim marks (\"#v+\" and \"#v-\")."
+ (interactive "r\nP")
(save-excursion
;; add to the end of the region first, otherwise end would be invalid
(goto-char end)
- (insert message-mark-insert-end)
+ (insert (if verbatim "#v-\n" message-mark-insert-end))
(goto-char beg)
- (insert message-mark-insert-begin)))
+ (insert (if verbatim "#v+\n" message-mark-insert-begin))))
;;;###autoload
-(defun message-mark-insert-file (file)
+(defun message-mark-insert-file (file &optional verbatim)
"Insert FILE at point, marking it with enclosing tags.
-See `message-mark-insert-begin' and `message-mark-insert-end'."
- (interactive "fFile to insert: ")
+See `message-mark-insert-begin' and `message-mark-insert-end'.
+If VERBATIM, use slrn style verbatim marks (\"#v+\" and \"#v-\")."
+ (interactive "fFile to insert: \nP")
;; reverse insertion to get correct result.
(let ((p (point)))
- (insert message-mark-insert-end)
+ (insert (if verbatim "#v-\n" message-mark-insert-end))
(goto-char p)
(insert-file-contents file)
(goto-char p)
- (insert message-mark-insert-begin)))
+ (insert (if verbatim "#v+\n" message-mark-insert-begin))))
;;;###autoload
(defun message-add-archive-header ()
;;; End of functions adopted from `message-utils.el'.
+(defun message-remove-duplicates (list)
+ (let (new)
+ (while list
+ (or (member (car list) new)
+ (setq new (cons (car list) new)))
+ (setq list (cdr list)))
+ (nreverse new)))
+
(defun message-remove-header (header &optional is-regexp first reverse)
"Remove HEADER in the narrowed buffer.
If IS-REGEXP, HEADER is a regular expression.
(let ((field (message-fetch-field header))
rhs ace address)
(when field
- (dolist (address (mail-header-parse-addresses field))
- (setq address (car address)
- rhs (downcase (or (cadr (split-string address "@")) ""))
- ace (downcase (idna-to-ascii rhs)))
+ (dolist (rhs
+ (message-remove-duplicates
+ (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
+ (mapcar 'downcase
+ (mapcar
+ 'car (mail-header-parse-addresses field))))))
+ (setq ace (downcase (idna-to-ascii rhs)))
(when (and (not (equal rhs ace))
(or (not (eq message-use-idna 'ask))
- (y-or-n-p (format "Replace %s with %s? " rhs ace))))
+ (y-or-n-p (format "Replace %s with %s in %s:? "
+ rhs ace header))))
(goto-char (point-min))
(while (re-search-forward (concat "^" header ":") nil t)
(message-narrow-to-field)
(message-idna-to-ascii-rhs-1 "From")
(message-idna-to-ascii-rhs-1 "To")
(message-idna-to-ascii-rhs-1 "Reply-To")
+ (message-idna-to-ascii-rhs-1 "Mail-Reply-To")
+ (message-idna-to-ascii-rhs-1 "Mail-Followup-To")
(message-idna-to-ascii-rhs-1 "Cc")))))
(defun message-generate-headers (headers)
:group 'mime-display)
(defcustom mm-automatic-display
- '("text/plain" "text/enriched" "text/richtext" "text/html" "text/verbatim"
+ '("text/plain" "text/enriched" "text/richtext" "text/html"
+ "text/x-gnus-verbatim"
"text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*"
"message/rfc822" "text/x-patch" "text/dns" "application/pgp-signature"
"application/emacs-lisp" "application/x-emacs-lisp"
"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.")
+(defcustom mm-uu-emacs-sources-regexp "\\.emacs\\.sources"
+ "The regexp of Emacs sources groups."
+ :version "22.1"
+ :type 'regexp
+ :group 'gnus-article-mime)
-(defcustom mm-uu-diff-groups-regexp "gnus\\.commits"
- "*Regexp matching diff groups."
+(defcustom mm-uu-diff-groups-regexp
+ "\\(gmane\\|gnu\\)\\..*\\(diff\\|commit\\|cvs\\|bug\\|devel\\)"
+ "Regexp matching diff groups."
:version "22.1"
:type 'regexp
:group 'gnus-article-mime)
+(defcustom mm-uu-tex-groups-regexp "\\.tex\\>"
+ "*Regexp matching TeX groups."
+ :version "23.0"
+ :type 'regexp
+ :group 'gnus-article-mime)
+
(defvar mm-uu-type-alist
'((postscript
"^%!PS-"
"^#v\\+$"
"^#v\\-$"
mm-uu-verbatim-marks-extract
- nil)))
+ nil)
+ (LaTeX
+ "^\\\\documentclass"
+ "^\\\\end{document}"
+ mm-uu-latex-extract
+ nil
+ mm-uu-latex-test))
+ "A list of specifications for non-MIME attachments.
+Each element consist of the following entries: label,
+start-regexp, end-regexp, extract-function, test-function.
+
+After modifying this list you must run \\[mm-uu-configure].")
(defcustom mm-uu-configure-list '((shar . disabled))
"A list of mm-uu configuration.
(member (cons key val) mm-uu-configure-list))
(defun mm-uu-configure (&optional symbol value)
+ "Configure detection of non-MIME attachments."
+ (interactive)
(if symbol (set-default symbol value))
(setq mm-uu-beginning-regexp nil)
(mapcar (lambda (entry)
(progn (goto-char start-point) (forward-line) (point))
(progn (goto-char end-point) (forward-line -1) (point))
t)
- '("text/verbatim" (charset . gnus-decoded))))
+ '("text/x-gnus-verbatim" (charset . gnus-decoded))))
+
+(defun mm-uu-latex-extract ()
+ (mm-make-handle
+ (mm-uu-copy-to-buffer start-point end-point t)
+ ;; application/x-tex?
+ '("text/x-gnus-verbatim" (charset . gnus-decoded))))
(defun mm-uu-emacs-sources-extract ()
(mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
mm-uu-diff-groups-regexp
(string-match mm-uu-diff-groups-regexp gnus-newsgroup-name)))
+(defun mm-uu-latex-test ()
+ (and gnus-newsgroup-name
+ mm-uu-tex-groups-regexp
+ (string-match mm-uu-tex-groups-regexp gnus-newsgroup-name)))
+
(defun mm-uu-forward-extract ()
(mm-make-handle (mm-uu-copy-to-buffer
(progn (goto-char start-point) (forward-line) (point))
+2005-09-27 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * emacs-mime.texi (Non-MIME): Add Slrn-style verbatim marks and
+ LaTeX documents. Describe "text/x-gnus-verbatim".
+
2005-09-26 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus.texi (Server Buffer Format): Document the %a format spec.
are automatically sent to. It only works in groups matching
@code{mm-uu-diff-groups-regexp}.
+@item verbatim-marks
+@cindex verbatim-marks
+Slrn-style verbatim marks.
+
+@item LaTeX
+@cindex LaTeX
+LaTeX documents. It only works in groups matching
+@code{mm-uu-tex-groups-regexp}.
+
@end table
+@cindex text/x-gnus-verbatim
+@c Is @vindex suitable for a face?
+@vindex mm-uu-extract
+Some inlined non-@acronym{MIME} attachments are displayed using the face
+@code{mm-uu-extract}. By default, no @acronym{MIME} button for these
+parts is displayed. You can force displaying a button using @kbd{K b}
+(@code{gnus-summary-display-buttonized}) or add @code{text/x-gnus-verbatim} to
+@code{gnus-buttonized-mime-types}, @xref{MIME Commands, ,MIME
+Commands, gnus, Gnus Manual}.
+
@node Handles
@section Handles