+2005-10-25 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-score.el (gnus-default-adaptive-score-alist): Set defaults
+ depending on gnus-score-decay-constant.
+
+ * encrypt.el (encrypt-insert-file-contents)
+ (encrypt-write-file-contents): Don't use `gnus-message'.
+
+ * mm-uu.el (mm-uu-verbatim-marks-extract): Add four start and end
+ arguments.
+ (mm-uu-type-alist): Add message-marks and insert-marks. Pass
+ arguments to mm-uu-verbatim-marks-extract.
+ (mm-uu-hide-markers): New variable.
+ (mm-uu-extract): Use face similar to `gnus-cite-3'.
+
+ * gnus-fun.el (gnus-convert-image-to-x-face-command)
+ (gnus-convert-image-to-face-command): Use "convert" by default to
+ allow other input image formats.
+ (gnus-x-face-from-file, gnus-face-from-file): Adjust doc strings
+ accordingly.
+
2005-10-23 Simon Josefsson <jas@extundo.com>
* imap.el (imap-gssapi-program): Align command line parameters
(if outdata
(progn
- (gnus-message 9 "%s was decrypted with %s (cipher %s)"
- file (symbol-name method) cipher)
+ (message "%s was decrypted with %s (cipher %s)"
+ file (symbol-name method) cipher)
(delete-region (point-min) (point-max))
(goto-char (point-min))
(insert outdata))
(if outdata
(progn
- (gnus-message 9 "%s was encrypted with %s (cipher %s)"
- file (symbol-name method) cipher)
+ (message "%s was encrypted with %s (cipher %s)"
+ file (symbol-name method) cipher)
(delete-region (point-min) (point-max))
(goto-char (point-min))
(insert outdata)
:group 'gnus-fun
:type 'string)
-(defcustom gnus-convert-image-to-x-face-command "giftopnm %s | ppmnorm | pnmscale -width 48 -height 48 | ppmtopgm | pgmtopbm | pbmtoxbm | compface"
+(defcustom gnus-convert-image-to-x-face-command
+ "convert -scale 48x48! %s xbm:- | xbm2xface.pl"
"Command for converting an image to an X-Face.
+The command must take a image filename (use \"%s\") as input.
+The output must be the Face header data on stdout in PNG format.
+
By default it takes a GIF filename and output the X-Face header data
on stdout."
:version "22.1"
:group 'gnus-fun
- :type 'string)
-
-(defcustom gnus-convert-image-to-face-command "djpeg %s | ppmnorm | pnmscale -width 48 -height 48 | ppmquant %d | pnmtopng"
+ :type '(choice (const :tag "giftopnm, netpbm (GIF input only)"
+ "giftopnm %s | ppmnorm | pnmscale -width 48 -height 48 | ppmtopgm | pgmtopbm | pbmtoxbm | compface")
+ (const :tag "convert"
+ "convert -scale 48x48! %s xbm:- | xbm2xface.pl")
+ (string)))
+
+(defcustom gnus-convert-image-to-face-command
+ "convert -scale 48x48! %s -colors %d png:-"
"Command for converting an image to a Face.
-By default it takes a JPEG filename and output the Face header data
-on stdout."
+
+The command must take an image filename (first format
+argument\"%s\") and the number of colors (second format argument:
+\"%d\") as input. The output must be the Face header data on
+stdout in PNG format."
:version "22.1"
:group 'gnus-fun
- :type 'string)
+ :type '(choice (const :tag "djpeg, netpbm (JPG input only)"
+ "djpeg %s | ppmnorm | pnmscale -width 48 -height 48 | ppmquant %d | pnmtopng")
+ (const :tag "convert"
+ "convert -scale 48x48! %s -colors %d png:-")
+ (string)))
(defcustom gnus-face-properties-alist (if (featurep 'xemacs)
'((xface . (:face gnus-x-face)))
;;;###autoload
(defun gnus-x-face-from-file (file)
- "Insert an X-Face header based on an image file."
- (interactive "fImage file name (by default GIF): ")
+ "Insert an X-Face header based on an image file.
+
+Depending on `gnus-convert-image-to-x-face-command' it may accept
+different input formats."
+ (interactive "fImage file name: ")
(when (file-exists-p file)
(gnus-shell-command-to-string
(format gnus-convert-image-to-x-face-command
;;;###autoload
(defun gnus-face-from-file (file)
- "Return a Face header based on an image file."
- (interactive "fImage file name (by default JPEG): ")
+ "Return a Face header based on an image file.
+
+Depending on `gnus-convert-image-to-face-command' it may accept
+different input formats."
+ (interactive "fImage file name: ")
(when (file-exists-p file)
(let ((done nil)
(attempt "")
(function :value fun)))
(defcustom gnus-default-adaptive-score-alist
- '((gnus-kill-file-mark)
+ `((gnus-kill-file-mark)
(gnus-unread-mark)
- (gnus-read-mark (from 3) (subject 30))
- (gnus-catchup-mark (subject -10))
- (gnus-killed-mark (from -1) (subject -20))
- (gnus-del-mark (from -2) (subject -15)))
- "*Alist of marks and scores."
+ (gnus-read-mark
+ (from , (+ 2 gnus-score-decay-constant))
+ (subject , (+ 27 gnus-score-decay-constant)))
+ (gnus-catchup-mark
+ (subject , (+ -7 (* -1 gnus-score-decay-constant))))
+ (gnus-killed-mark
+ (from , (- -1 gnus-score-decay-constant))
+ (subject , (+ -17 (* -1 gnus-score-decay-constant))))
+ (gnus-del-mark
+ (from , (- -1 gnus-score-decay-constant))
+ (subject , (+ -12 (* -1 gnus-score-decay-constant)))))
+ "Alist of marks and scores.
+If you use score decays, you might want to set values higher than
+`gnus-score-decay-constant'."
:group 'gnus-score-adapt
:type '(repeat (cons (symbol :tag "Mark")
(repeat (list (choice :tag "Header"
:group 'gnus-article-mime)
(defvar mm-uu-type-alist
- '((postscript
+ `((postscript
"^%!PS-"
"^%%EOF$"
mm-uu-postscript-extract
mm-uu-diff-extract
nil
mm-uu-diff-test)
+ (message-marks
+ ,(concat "^" (regexp-quote message-mark-insert-begin))
+ ,(concat "^" (regexp-quote message-mark-insert-end))
+ (lambda () (mm-uu-verbatim-marks-extract 0 -1 1 -2))
+ nil)
+ ;; Omitting [a-z8<] leads to false positives (bogus signature separators
+ ;; and mailing list banners).
+ (insert-marks
+ "^ *\\(-\\|_\\)\\{30,\\}.*[a-z8<].*\\(-\\|_\\)\\{30,\\} *$"
+ "^ *\\(-\\|_\\)\\{30,\\}.*[a-z8<].*\\(-\\|_\\)\\{30,\\} *$"
+ (lambda () (mm-uu-verbatim-marks-extract 0 0 1 -1))
+ nil)
(verbatim-marks
;; slrn-style verbatim marks, see
;; http://www.slrn.org/manual/slrn-manual-6.html#ss6.81
"^#v\\+"
"^#v\\-$"
- mm-uu-verbatim-marks-extract
+ (lambda () (mm-uu-verbatim-marks-extract 0 0 1 -1))
nil)
(LaTeX
"^\\\\documentclass"
(defsubst mm-uu-function-2 (entry)
(nth 5 entry))
-(defface mm-uu-extract
- '((((class color)
- (background dark))
- (:background "gray5"))
- (((class color)
- (background light))
- (:background "gray95"))
- (t
- ()))
+;; In Emacs 22, we could use `min-colors' in the face definition. But Emacs
+;; 21 and XEmacs don't support it.
+(defcustom mm-uu-hide-markers
+ (< 16 (or (and (fboundp 'defined-colors)
+ (length (defined-colors)))
+ (and (fboundp (device-color-cells))
+ (length (device-color-cells)))
+ 0))
+ "If non-nil, hide verbatim markers.
+The value should be nil on displays where the face
+`mm-uu-extract' isn't distinguishable to the face `default'."
+ :type '(choice (const :tag "Hide" t)
+ (const :tag "Don't hide" nil))
+ :version "23.0" ;; No Gnus
+ :group 'gnus-article-mime)
+
+(defface mm-uu-extract '(;; Colors from `gnus-cite-3' plus background:
+ (((class color)
+ (background dark))
+ (:foreground "light yellow"
+ :background "dark green"))
+ (((class color)
+ (background light))
+ (:foreground "dark green"
+ :background "light yellow"))
+ (t
+ ()))
"Face for extracted buffers."
;; See `mm-uu-verbatim-marks-extract'.
:version "23.0" ;; No Gnus
(mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
'("application/postscript")))
-(defun mm-uu-verbatim-marks-extract ()
- (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))
- t)
- '("text/x-verbatim" (charset . gnus-decoded))))
+(defun mm-uu-verbatim-marks-extract (start-offset end-offset
+ &optional
+ start-hide
+ end-hide)
+ (let ((start (or (and mm-uu-hide-markers
+ start-hide)
+ start-offset
+ 1))
+ (end (or (and mm-uu-hide-markers
+ end-hide)
+ end-offset
+ -1)))
+ (mm-make-handle
+ (mm-uu-copy-to-buffer
+ (progn (goto-char start-point)
+ (forward-line start)
+ (point))
+ (progn (goto-char end-point)
+ (forward-line end)
+ (point))
+ t)
+ '("text/x-verbatim" (charset . gnus-decoded)))))
(defun mm-uu-latex-extract ()
(mm-make-handle
+2005-10-25 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-coding.texi (Dependencies): Add some text.
+ (Dependencies): Update encrypt.el.
+
2005-10-17 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus.texi (Document Groups): Remove duplicate item.
@syncodeindex pg cp
@copying
-Copyright (c) 2004 Free Software Foundation, Inc.
+Copyright (c) 2004, 2005 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@titlepage
@title Gnus Coding Style and Maintainance Guide
-@c @author by Reiner Steib <Reiner.Steib@gmx.de>
+@author by Reiner Steib <Reiner.Steib@@gmx.de>
@insertcopying
@end titlepage
@node Top
-@section Gnus Coding Style
-@subsection Dependencies
+@chapter Gnus Coding Style
+@section Dependencies
+
+The Gnus distribution contains a lot of libraries that have been written
+for Gnus and used intensively for Gnus. But many of those libraries are
+useful on their own. E.g. other Emacs Lisp packages might use the
+@acronym{MIME} library @xref{Top, ,Top, emacs-mime, The Emacs MIME
+Manual}.
+
+@subsection General purpose libraries
+
+@table @file
+
+@item netrc.el
+@file{.netrc} parsing functionality.
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@item format-spec.el
+Functions for formatting arbitrary formatting strings.
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@end table
+
+@subsection Encryption and security
+
+@table @file
+@item encrypt.el
+File encryption routines
+@c As of 2005-10-25...
+There are no Gnus dependencies in this file.
+
+@item password.el
+Read passwords from user, possibly using a password cache.
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@item tls.el
+TLS/SSL support via wrapper around GnuTLS
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@item pgg*.el
+Glue for the various PGP implementations.
+@c As of 2005-10-21...
+There are no Gnus dependencies in these files.
+
+@end table
+
+@subsection Networking
+
+@table @file
+@item dig.el
+Domain Name System dig interface.
+@c As of 2005-10-21...
+There are no serious Gnus dependencies in this file. Uses
+@code{gnus-run-mode-hooks} (a wrapper function).
+
+@item dns*.el
+Domain Name Service lookups.
+@c As of 2005-10-21...
+There are no Gnus dependencies in these files.
+@end table
+
+@subsection Mail and News related RFCs
+
+@table @file
+@item pop3.el
+Post Office Protocol (RFC 1460) interface.
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@item imap.el
+@acronym{IMAP} library.
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@item ietf-drums.el
+Functions for parsing RFC822bis headers.
+@c As of 2005-10-21...
+There are no Gnus dependencies in this file.
+
+@item rfc1843.el
+HZ (rfc1843) decoding. HZ is a data format for exchanging files of
+arbitrarily mixed Chinese and @acronym{ASCII} characters.
+@c As of 2005-10-21...
+@code{rfc1843-gnus-setup} seem to be useful only for Gnus. Maybe this
+function should be relocated to remove dependencies on Gnus. Other
+minor dependencies: @code{gnus-newsgroup-name} could be eliminated by
+using an optional argument to @code{rfc1843-decode-article-body}.
+
+@item rfc2045.el
+Functions for decoding rfc2045 headers
+
+@item rfc2047.el
+Functions for encoding and decoding rfc2047 messages
+
+@item rfc2104.el
+RFC2104 Hashed Message Authentication Codes
+
+@item rfc2231.el
+Functions for decoding rfc2231 headers
+@end table
+
+@subsection message
+
+All message composition from Gnus (both mail and news) takes place in
+Message mode buffers. Message mode is intended to be a replacement for
+Emacs mail mode. There should be no Gnus dependencies in
+@file{message.el}.
+
+@subsection Gnus backends
+
+The files @file{nn*.el} provide functionality for accessing NNTP
+(@file{nntp.el}), IMAP (@file{nnimap.el}) and several other Mail back
+ends (probably @file{nnml.el}, @file{nnfolder.el} and
+@file{nnmaildir.el} are the ones most widely used mail back ends).
+
@c message / gnus
@c
@c nn*
@c
@c mm*
-@c
+@c
@c rfc*
@c
+@c pgg*
@c tla netrc pop3 dig dns ...
@c format-spec.el
-@subsection Compatibility
+
+@section Compatibility
@c Compatibility with XEmacs and older Emacs versions in v5-10 and in the
@c trunk.
@c x
@c @end table
-@section Gnus Maintainance Guide
+@chapter Gnus Maintainance Guide
-@subsection Stable and development versions
+@section Stable and development versions
The CVS trunk is developed quite actively.
@c e.g. 5.10.1
-@subsection Syncing
+@section Syncing
@c Some MIDs related to this follow. Use http://thread.gmane.org/MID
@c (and click on the subject) to get the thread on Gmane.
such multiple commits, like whitespace differences, and unify those ;-).
-@subsection Miscellanea
+@section Miscellanea
+
+@heading @file{GNUS-NEWS}
Starting from No Gnus, the @file{GNUS-NEWS} is created from
@file{texi/gnus-news.texi}. Don't edit @file{GNUS-NEWS}. Edit