From: morioka Date: Mon, 2 Mar 1998 15:16:24 +0000 (+0000) Subject: tm 6.70 X-Git-Tag: tm6_70~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92663a97ee2860f29f0a33ec71246bc9a9416ea3;p=elisp%2Ftm.git tm 6.70 --- diff --git a/Changes-6.68-6.70.en b/Changes-6.68-6.70.en new file mode 100644 index 0000000..3d6397e --- /dev/null +++ b/Changes-6.68-6.70.en @@ -0,0 +1,79 @@ +tm-view.el +---------------------------- +revision 6.70 +date: 1995/07/30 23:18:01; author: morioka; state: Exp; lines: +5 -6 +replaced function `mail-fetch-field' by function +`message/get-field-body' because of trouble. +---------------------------- +revision 6.69 +date: 1995/07/30 23:11:42; author: morioka; state: Exp; lines: +6 -4 +redefine function `mime-viewer/default-content-subject-function' not +to display content-subject for root content. +---------------------------- +revision 6.68 +date: 1995/07/30 20:51:16; author: morioka; state: Exp; lines: +6 -5 +replaced function `message/get-field-body' by function +`mail-fetch-field'. +---------------------------- + + +tm-rich.el +---------------------------- +revision 6.8 +date: 1995/07/17 22:30:36; author: morioka; state: Exp; lines: +9 -4 +modified for changes of text/richtext supporting system. +---------------------------- + +richtext.el +---------------------------- +revision 2.1 +date: 1995/07/17 22:59:10; author: morioka; state: Exp; lines: +9 -8 +added (require 'enriched). +---------------------------- +revision 2.0 +date: 1995/07/17 22:29:49; author: morioka; state: Exp; lines: +136 -97 +rewrite to encode/decode directly. Converters are moved to tinyrich.el. +---------------------------- + +tinyrich.el +---------------------------- +revision 2.0 +date: 1995/07/17 22:31:32; author: morioka; state: Exp; lines: +95 -1 +text/richtext <-> text/enriched converter are moved from richtext.el. +---------------------------- + + +tiny-mime.el +---------------------------- +revision 5.16 +date: 1995/07/26 05:54:16; author: morioka; state: Exp; lines: +5 -3 +fixed a problem of function `mime/unfolding'. +---------------------------- + + +gnus/tm-dgnus.el +---------------------------- +revision 6.14 +date: 1995/08/01 17:19:15; author: morioka; state: Exp; lines: +7 -2 +In function `tm-gnus/summary-toggle-header', header mode detecting way +for automatic MIME preview mode is changed. +---------------------------- +revision 6.13 +date: 1995/08/01 17:09:13; author: morioka; state: Exp; lines: +10 -27 +Rewrote function `tm-gnus/summary-toggle-header' to use function +`gnus-summary-toggle-header'. +---------------------------- +revision 6.12 +date: 1995/07/30 20:09:41; author: morioka; state: Exp; lines: +68 -214 +Don't support automatic MIME preview for original (ding) GNUS. +---------------------------- +revision 6.11 +date: 1995/07/27 19:35:42; author: morioka; state: Exp; lines: +3 -4 +(1) fixed a problem of function `tm-gnus/set-mime-method'. +(2) added cheap support for page break in automatic preview mode. +---------------------------- +revision 6.10 +date: 1995/07/27 18:54:30; author: morioka; state: Exp; lines: +171 -79 +Changed the way to save original article-buffer to the variable +`gnus-clean-article-buffer'. +---------------------------- diff --git a/Changes-6.68-6.70.ja b/Changes-6.68-6.70.ja new file mode 100644 index 0000000..defd06b --- /dev/null +++ b/Changes-6.68-6.70.ja @@ -0,0 +1,79 @@ +tm-view.el +---------------------------- +revision 6.70 +date: 1995/07/30 23:18:01; author: morioka; state: Exp; lines: +5 -6 +$BIT6q9g$,8+$D$+$C$?$N$G!"4X?t(B mail-fetch-field $B$r;H$&$N$r$d$a!"$d$C$Q$j!"(B +$B4X?t(B message/get-field-body $B$r;H$&$h$&$K$7$?!#(B +---------------------------- +revision 6.69 +date: 1995/07/30 23:11:42; author: morioka; state: Exp; lines: +6 -4 +top content $B$N(B content-subject $B$rI=<($7$J$$$h$&$K$7$?!#(B +---------------------------- +revision 6.68 +date: 1995/07/30 20:51:16; author: morioka; state: Exp; lines: +6 -5 +$B4X?t(B message/get-field-body $B$r;H$&$N$r$d$a$F!"4X?t(B mail-fetch-field $B$r(B +$B;H$&$h$&$K$7$?!#(B +---------------------------- + + +tm-rich.el +---------------------------- +revision 6.8 +date: 1995/07/17 22:30:36; author: morioka; state: Exp; lines: +9 -4 +text/richtext $B4X78$N9=@.$NJQ99$KH<$&=$@5$r9T$C$?!#(B +---------------------------- + +richtext.el +---------------------------- +revision 2.1 +date: 1995/07/17 22:59:10; author: morioka; state: Exp; lines: +9 -8 +(require 'enriched) $B$rDI2C$7$?!#(B +---------------------------- +revision 2.0 +date: 1995/07/17 22:29:49; author: morioka; state: Exp; lines: +136 -97 +$BD>@\(B encode/decode $B$9$k$h$&$K$7!"(Bconverter $B$O(B tinyrich.el $B$K0\$7$?!#(B +---------------------------- + +tinyrich.el +---------------------------- +revision 2.0 +date: 1995/07/17 22:31:32; author: morioka; state: Exp; lines: +95 -1 +text/richtext <-> text/enriched converter $B$r(B richtext.el $B$+$i0\$7$?!#(B +---------------------------- + + +tiny-mime.el +---------------------------- +revision 5.16 +date: 1995/07/26 05:54:16; author: morioka; state: Exp; lines: +5 -3 +$B4X?t(B mime/unfolding $B$NIT6q9g$r=$@5$7$?!#(B +---------------------------- + + +gnus/tm-dgnus.el +---------------------------- +revision 6.14 +date: 1995/08/01 17:19:15; author: morioka; state: Exp; lines: +7 -2 +$B4X?t(B tm-gnus/summary-toggle-header $B$K$*$$$F!"(Bautomatic MIME preview +mode $B$N;~$N(B header $B$NI=<((B mode $B$NH=DjK!$rJQ99$7$?!#(B +---------------------------- +revision 6.13 +date: 1995/08/01 17:09:13; author: morioka; state: Exp; lines: +10 -27 +$B4X?t(B gnus-summary-toggle-header $B$rMxMQ$9$k$h$&$K!"4X?t(B +tm-gnus/summary-toggle-header $B$r=q$-49$($?!#(B +---------------------------- +revision 6.12 +date: 1995/07/30 20:09:41; author: morioka; state: Exp; lines: +68 -214 +original $B$N(B (ding) GNUS $B$KBP$7$F$O(B automatic MIME preview support $B$O9T(B +$B$J$o$J$$$h$&$K$7$?!#(B +---------------------------- +revision 6.11 +date: 1995/07/27 19:35:42; author: morioka; state: Exp; lines: +3 -4 +(1) $B4X?t(B tm-gnus/set-mime-method $B$K$*$1$kIT6q9g$r=$@5$7$?!#(B +(2) $B2~JG$K4J0WBP1~$7$?!#(B +---------------------------- +revision 6.10 +date: 1995/07/27 18:54:30; author: morioka; state: Exp; lines: +171 -79 +$B85$N(B article-buffer $B$rJQ?t(B gnus-clean-article-buffer $B$KJ]B8$9$kJ}<0$K(B +$B2~$a$?!#(B +---------------------------- diff --git a/Makefile b/Makefile index bcbfce0..575863e 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ TL_FILES = tl/README.eng \ FILES = $(TM_FILES) $(TM_MUA_FILES) $(MEL_FILES) $(TL_FILES) -TARFILE = tm6.67.tar +TARFILE = tm6.70.tar lpath-nemacs: diff --git a/README.eng b/README.eng index eba4aaf..5b1075f 100644 --- a/README.eng +++ b/README.eng @@ -1,6 +1,6 @@ [README for tm (English Version)] by MORIOKA Tomohiko -$Id: README.eng,v 3.0 1995/06/26 08:16:34 morioka Exp morioka $ +$Id: README.eng,v 6.0 1995/08/01 19:09:28 morioka Exp $ 1 What's tm? @@ -17,20 +17,22 @@ This package includes following documents. (1) English edition -- doc/tm-eng.tex : tm Reference Manual (LaTeX) +- doc/tm_en.texi : tm Reference Manual (TeXinfo) +- doc/tm-view_en.texi : tm-view Reference Manual (TeXinfo) - doc/tiny-mime-eng.ol : tiny-mime.el Reference Manual (Emacs Outline) - doc/tiny-mime-eng.tex : tiny-mime.el Reference Manual (LaTeX) - rel-6eng.ol : notice about major changes of tm 6.* (Emacs Outline) (2) Japanese edition -- doc/tm-jp.tex : tm Reference Manual (LaTeX) -- doc/tiny-mime-jp.ol : tiny-mime.el Reference Manual (Emacs Outline) -- doc/tiny-mime-jp.tex : tiny-mime.el Reference Manual (LaTeX) +- doc/tm_ja.tex : tm Reference Manual (TeXinfo) +- doc/tm-view_ja.tex : tm-view Reference Manual (TeXinfo) +- doc/tm-eword_ja.texi : tiny-mime.el Reference Manual (TeXinfo) - doc/signature-jp.ol : signature.el Reference Manual (Emacs Outline) - doc/signature-jp.tex : signature.el Reference Manual (LaTeX) - rel-6jp.ol : notice about major changes of tm 6.* (Emacs Outline) + 3 Modules Tm has following modules: @@ -132,6 +134,14 @@ tl. Please read tl/README.eng. Run `make install-19', if you use Emacs 19.*. +5.1.1 (ding) GNUS + + If you want to use automatic MIME preview support, please apply a +patch to (ding) GNUS. This patch is called `with tm patch'. It is +available from ftp.jaist.ac.jp:/pub/GNU/elisp/dgnus/. Current version +is dgnus-0.98.6-tm.diff. + + 5.1 tm-mh-e (1) Please edit mh-e/Makefile @@ -158,17 +168,29 @@ tl. Please read tl/README.eng. Please copy tm-rmail.el or tm-vm.el to Emacs Lisp install path. -5 .emacs +6 .emacs Please insert (load "mime-setup") or (load "tm-setup") in .emacs. If you use mime-setup, you should prepare mime.el. +6.1 VM + If you want use vm, please insert following in .vm or .emacs: (load "tm-vm") +6.2 XEmacs + +In XEmacs, current mime.el can not work, so you should use tm-setup.el +and another MIME composer, such as mime-compose.el. Following is a +example: + + (load "tm-setup") + ;; (require 'mh-e) ; if you use mh-e, please use it. + (load "mime-compose") + -6 How to use mime/viewer-mode +7 How to use mime/viewer-mode In tm-MUAs, you can use mime/viewer-mode if you press `v' key (in VM, `Z' key) in Summary mode. mime/viewer-mode has following functions: @@ -184,7 +206,7 @@ In tm-MUAs, you can use mime/viewer-mode if you press `v' key (in VM, C-c C-p print the content -7 Bug report +8 Bug report If you write bug-reports and/or propositions for improvement, please post them to following news groups: @@ -210,7 +232,7 @@ Since the user registration is manually done, please write the mail body in human-recognizable language (^_^). -8 TODO +9 TODO - better XEmacs support (i.e. richtext filter or inline image) - multi frame support diff --git a/doc/tm-eword_ja.texi b/doc/tm-eword_ja.texi index 5cf288d..fabe28e 100644 --- a/doc/tm-eword_ja.texi +++ b/doc/tm-eword_ja.texi @@ -4,13 +4,9 @@ @settitle{tiny-mime manual} @titlepage -@sp{5} -@center{@titlefont{tiny-mime}} -@sp{15} -@center{@titlefont{$BZ$7$^$;$s!#$7$+$7$J$,$i!"(BUS-ASCII $B$NHO0O$G$OF0:n$9$k$H;W$o$l(B -$B$^$9!#!J$"$^$j0UL#$,$J$$$+$bCN$l$^$;$s$,!K(B +Æ°ºî¤ÏÊݾڤ·¤Þ¤»¤ó¡£¤·¤«¤·¤Ê¤¬¤é¡¢US-ASCII ¤ÎÈϰϤǤÏÆ°ºî¤¹¤ë¤È»×¤ï¤ì +¤Þ¤¹¡£¡Ê¤¢¤Þ¤ê°ÕÌ£¤¬¤Ê¤¤¤«¤âÃΤì¤Þ¤»¤ó¤¬¡Ë @section{NEmacs, NEpoch} -ISO-2022-JP, US-ASCII $B$N(B encoding/decoding $B$r%5%]!<%H$7$^$9!#(B +ISO-2022-JP, US-ASCII ¤Î encoding/decoding ¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£ -$B$^$?!"(BISO-8859-*$B$G$"$C$F$b!"(Bencoded-text $B$K4^$^$l$kJ8;zNs$,e$G!"(B +tiny-mime.el ¤ò load ¤·¤Æ¡¢decode ¤·¤¿¤¤ buffer ¾å¤Ç¡¢ @example M-x mime/decode-message-header @end example -$B$re$G!"(B +tiny-mime.el ¤ò load ¤·¤Æ¡¢encode ¤·¤¿¤¤ buffer ¾å¤Ç¡¢ @example M-x mime/encode-message-header @end example -$B$rl9g!"(Btiny-mime.el $B$,(B encode $B$7$J$/$F$b!"(B -mime.el $B$,(B encode $B$9$k$N$G!"(Bmime.el $B$N(B message header encoder $B$,F/$+$J(B -$B$$$h$&$K$K@_Dj$7$^$9!#(B +¡ÎÃí°Õ¡Ï mime.el ¤ÈÊ»ÍѤ¹¤ë¾ì¹ç¡¢tiny-mime.el ¤¬ encode ¤·¤Ê¤¯¤Æ¤â¡¢ +mime.el ¤¬ encode ¤¹¤ë¤Î¤Ç¡¢mime.el ¤Î message header encoder ¤¬Æ¯¤«¤Ê +¤¤¤è¤¦¤Ë¤ËÀßÄꤷ¤Þ¤¹¡£ @end defvr @defvr{Variable} mime/use-X-Nsubject -$B$3$NJQ?t$NCM$,(B t $B$N>l9g!"(Bmessage header $B$r(B encode $B$9$k;~!"(Bencode $B$7$?(B -$B7k2L!"(BSubject $B$K(B encoded-word $B$,4^$^$l$k>l9g!"(BSubject $B$r(B decode $B$7$?$b(B -$B$N$rF~$l$?(B X-Nsubject $B$r:n@.$7$^$9!#(B +¤³¤ÎÊÑ¿ô¤ÎÃͤ¬ t ¤Î¾ì¹ç¡¢message header ¤ò encode ¤¹¤ë»þ¡¢encode ¤·¤¿ +·ë²Ì¡¢Subject ¤Ë encoded-word ¤¬´Þ¤Þ¤ì¤ë¾ì¹ç¡¢Subject ¤ò decode ¤·¤¿¤â +¤Î¤òÆþ¤ì¤¿ X-Nsubject ¤òºîÀ®¤·¤Þ¤¹¡£ -default $B$G$O(B nil $B$,;XDj$5$l$F$$$^$9!#(B +default ¤Ç¤Ï nil ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£ -$B!NCm0U!O(BMule $B$G(B ISO-2022-JP $B$K4^$^$l$k$b$N0J30$NJ8;z=89g$r;H$&>l9g$O!"(B -$B$3$l$r;XDj$7$J$$J}$,8-L@$G$9!#(B +¡ÎÃí°Õ¡ÏMule ¤Ç ISO-2022-JP ¤Ë´Þ¤Þ¤ì¤ë¤â¤Î°Ê³°¤Îʸ»ú½¸¹ç¤ò»È¤¦¾ì¹ç¤Ï¡¢ +¤³¤ì¤ò»ØÄꤷ¤Ê¤¤Êý¤¬¸­ÌÀ¤Ç¤¹¡£ @end defvr @node Customize, Integrate-into-MUA, Variable, Top @comment node-name, next, previous, up -@section{charset $B$NDI2C!&JQ99(B} -@cindex{charset $B$NDI2C!&JQ99(B} +@section{charset ¤ÎÄɲá¦Êѹ¹} +@cindex{charset ¤ÎÄɲá¦Êѹ¹} -Mule $B$G$O!"4X?t(B @code{mime/set-charset-and-encoding} $B$G!"(Bcharset $B$NDI(B -$B2C!&JQ99$,$G$-$^$9!#(B +Mule ¤Ç¤Ï¡¢´Ø¿ô @code{mime/set-charset-and-encoding} ¤Ç¡¢charset ¤ÎÄÉ +²Ã¡¦Êѹ¹¤¬¤Ç¤­¤Þ¤¹¡£ @deffn{Function} mime/set-charset-and-encoding LC CS CHARSET ENCODING @table @var @item LC -charset $B$KBP1~$9$k(B leading-char $B$r;XDj$9$k!#(B +charset ¤ËÂбþ¤¹¤ë leading-char ¤ò»ØÄꤹ¤ë¡£ @item CS -charset $B$KBP1~$9$k(B coding-system $B$r;XDj$9$k!#(B1 octet $BJ8;z=89g$G(B -coding-system $B$r:n$i$J$$>l9g$O!"(Bnil $B$r;XDj$9$k!#(B +charset ¤ËÂбþ¤¹¤ë coding-system ¤ò»ØÄꤹ¤ë¡£1 octet ʸ»ú½¸¹ç¤Ç +coding-system ¤òºî¤é¤Ê¤¤¾ì¹ç¤Ï¡¢nil ¤ò»ØÄꤹ¤ë¡£ @item CHARSET -MIME $B$N(B charset. +MIME ¤Î charset. @item ENCODING -encode $B$9$k:]$N(B encoding. +encode ¤¹¤ëºÝ¤Î encoding. @end table @end deffn @@ -210,18 +206,18 @@ encode $B$9$k:]$N(B encoding. @node Integrate-into-MUA, Top, Customize, Top @comment node-name, next, previous, up -@chapter{MUA $B$X$NAH$_9~$_(B} -@cindex{MUA $B$X$NAH$_9~$_(B} +@chapter{MUA ¤Ø¤ÎÁȤ߹þ¤ß} +@cindex{MUA ¤Ø¤ÎÁȤ߹þ¤ß} -$BF|>oE*$K!"L50U<1$K(B MIME header $B$rK\Mh$N8@8l$G8+$?$$$H$$$&$N$OEvA3$N(B -$BM_5a$G$9!#$=$3$G!"(Btiny-mime.el $B$r(B mailer $B$d(B news reader $B$KAH$_9~$`$H<+(B -$BF0E*$K(B MIME header $B$N(B encode/decode $B$,$G$-$^$9!#(B +Æü¾ïŪ¤Ë¡¢Ìµ°Õ¼±¤Ë MIME header ¤òËÜÍè¤Î¸À¸ì¤Ç¸«¤¿¤¤¤È¤¤¤¦¤Î¤ÏÅöÁ³¤Î +Íßµá¤Ç¤¹¡£¤½¤³¤Ç¡¢tiny-mime.el ¤ò mailer ¤ä news reader ¤ËÁȤ߹þ¤à¤È¼« +ưŪ¤Ë MIME header ¤Î encode/decode ¤¬¤Ç¤­¤Þ¤¹¡£ -$B$3$NL\E*$r +Newsgroups: zxr.comp.emacs.tm-english +Subject: tm6.63.tar.gz +Date: Mon, 26 Jun 1995 17:39:50 JST +Organization: Chamonix, JAIST, Tatsunokuchi, Ishikawa, Japan +Reply-To: tm-eng@@chamonix.jaist.ac.jp +To: tm-eng@@chamonix.jaist.ac.jp +In-Reply-To: Your message of "Sun, 25 Jun 1995 23:20:49 MST" +X-Mua: mh-e 4.1 + tm 6.63 / Mule 2.2 (WAKAMURASAKI) PL02 +X-Mime-Composer: mime.el + tiny-mime 5.12 +X-Ml-Count: 32 + +[1 (text/plain)] + I put tm6.63.tar.gz in ftp.jaist.ac.jp. + + In this version, tm-view uses new MIME encoding/decoding engine +``mel (MIME encoding library''. This library has internal/external +encoding/decoding engine. If data is smaller than a limit, tm-view +uses internal decoder, otherwise external decoder. + +[2 tm6.63.tar.gz ([anon-ftp] ftp.jaist.ac.jp:/pub/GNU/elisp/mime/alpha)] + +[3 (text/plain)] +---- +MORIOKA, Tomohiko +@end example + + +@menu +* content-subject:: +* content-header:: +* content-body:: +* content-separator:: +@end menu + + +@node content-subject, content-header, Preview Buffer, Preview Buffer +@comment node-name, next, previous, up +@section{content-subject} +@cindex{content-subject} + +content-subject is a part to display abstract for the content. It is +placed in top of content. + +In default, it is displayed following design: + +@example + [1.3 test (text/plain)] +@end example + +First number field represents position of a content in the message. It +is called `content-number'. It can be considered as the chapter number +in the message. + +Second string part represents title. It is created by following: + +@itemize +@item name paramater or x-name parameter in Content-Type field +@item Content-Description field or Subject field +@item filename of uuencode +@end itemize + +If they are not exists, space is displayed. + +Third parenthesis part represents content-type/subtype of the +content. If it is non-MIME part, @code{nil} is displayed. + +Content-subject is used like icon when content-header and content-body +are hidden. For example, + +@example + [2 (image/gif)] +@end example + +if you press `v' key, GIF image is displayed. + + +@defvr{Variable} mime-viewer/content-subject-omitting-Content-Type-list + +List of content-type. If content-type of a content is a member of this +list, its content-subject is not displayed. + +This variable is referenced by function +@code{mime-viewer/default-content-subject-function}. +@end defvr + + +@deffn{Function} mime-viewer/default-content-subject-function cnum cinfo ctype params subj + +Default value of the variable +@code{mime-viewer/content-subject-function}. +It refers variable +@code{mime-viewer/content-subject-omitting-Content-Type-list}. +@end deffn + + +@defvar mime-viewer/content-subject-function cnum cinfo ctype params subj + +Variable to specify content-subject display function. Default value is +the function @code{mime-viewer/default-content-subject-function}. +@end defvar + + +@node content-header, content-body, content-subject, Preview Buffer +@comment node-name, next, previous, up +@section{content-header} +@cindex{content-header} + +A content header shows the header portion of a content in the preview +buffer. + +When the function @code{mime-viewer/header-visible-p} returns @code{t} +for content-number of a content, content-header is displayed. This +judge function returns @code{t} when a content is root or content-type +of its parent is a member of the variable +@code{mime-viewer/childrens-header-showing-Content-Type-list}. + +If you want to change this condition, please redefine it. + +When content-header is displayed, content-header are formated by +content-header-filter. Content-header-filter is searched from variable +@code{mime-viewer/content-header-filter-alist}. Its key is major-mode +of the article buffer. If not found, function +@code{mime-viewer/default-content-header-filter} is called. + + +@defvar mime-viewer/childrens-header-showing-Content-Type-list + +List of content-type. If content-type of parent of a content is a +member of this variable, its content-header is displayed. +Default value is "message/rfc822". + +This variable is referred by the function +@code{mime-viewer/header-visible-p}. +@end defvar + + +@deffn{Function} mime-viewer/header-visible-p cnum cinfo &optional ctype + +Returns @code{t} if a content is displayed. + +@var{cnum} is content-number. @var{cinfo} is content-info. If you know +content-type, you can specify by @var{ctype}. +@end deffn + + +@defvar mime-viewer/content-header-filter-alist + +Association-list whose key is major-mode of a article buffer, value is +content-header-filter. +@end defvar + + +@deffn{Function} mime-viewer/default-content-header-filter + +It is called when content-header-filter is not found in variable +@code{mime-viewer/content-header-filter-alist}. +@end deffn + + +@node content-body, content-separator, content-header, Preview Buffer +@comment node-name, next, previous, up +@section{content-body} +@cindex{content-body} + +Content-body represents content of the message. tm-view does not +display raw content body. For example, if a content has binary, it is +hidden. If a content has richtext, it is formated. Namely content body +is hidden or formated. + +Function @code{mime-viewer/body-visible-p} is a judge function whether +content-body of a content is displayed. If it returns @code{nil}, +content-body is hidden. In default, it returns non-@code{nil} when +content-type of a content is a member of variable +@code{mime-viewer/default-showing-Content-Type-list}. + +When content-body of a content is displayed, content-body is formated +by content-filter. Content-filter is searched from variable +@code{mime-viewer/content-filter-alist}. At this time, major-mode of +the article buffer is used as the key. + +If it is not found, function @code{mime-viewer/default-content-filter} +is called. + + +@defvar mime-viewer/default-showing-Content-Type-list + +List of content-type. If content-type of a content is a member of this +variable, its body is displayed. +@end defvar + + +@deffn{Function} mime-viewer/body-visible-p cnum cinfo &optional ctype + +Return non-@code{nil}, if content-type of a content is displayed. +@var{cnum} is content-number of a content. @var{cinfo} is content-info +of the message. If you know content-type of a content, you can specify +it as argument @var{ctype}. +@end deffn + + +@defvar mime-viewer/content-filter-alist + +Association-list whose key is major-mode of a article buffer, value is +content-filter. +@end defvar + + +@deffn{Function} mime-viewer/default-content-filter cnum cinfo ctype params subj + +It is called when content-body of a content should be displayed and +content-filter is not found in +@code{mime-viewer/content-filter-alist}. + +In default, it does nothing. +@end deffn + + +@node content-separator, Decoding, content-body, Preview Buffer +@comment node-name, next, previous, up +@section{content-separator} +@cindex{content-separator} + +Content-separator is displayed to represent boundary of contents. + +Content-separator is displayed by function +@code{mime-viewer/default-content-separator}. In default, it displays +line-break when content-header and content-body are not displayed. + +If you want to change this condition, please redefine this function. + + +@deffn{Function} mime-viewer/default-content-separator cnum cinfo ctype params subj + +Display content-separator. @var{cnum} is content-number of a +content. @var{cinfo} is content-info of the message. @var{ctype} is +content-type of a content. @var{params} is Content-Type field +parameters of a content. @var{subj} is subject. + +In default, it displays line-break when content-header and +content-body are not displayed. +@end deffn + + +@node Decoding, decoding-condition, Preview Buffer, Top +@comment node-name, next, previous, up +@chapter{Decoding} +@cindex{Decoding} + +In @code{mime/viewer-mode}, you can do play (@key{v}), extract +(@key{e}), or print (@key{C-c C-p}) for each content. These operations +are called ``decoding operation(s) (for a content)''. And kind of +decoding operations are called @strong{decoding-mode}. + +When decoding operation is driven, tm-view calls a procedure matched +for the condition, such as content-type. This procedure is called +@strong{method}. + +There are two kinds of method. One is Emacs Lisp function, called +@strong{internal method}. Another one is external program, called +@strong{external method}. + +Internal method operates in Emacs, so it can do carefully. + +External method is called as asynchronous process, so Emacs does not +wait while method is running. So it is good for big data, such as +audio, image or video. + +@menu +* decoding-condition:: Setting of content decoding condition. +* Format of method value:: Format of method value part. +* Example of decoding-condition:: Examples of decoding-condition. +@end menu + + +@node decoding-condition, Format of method value, Decoding, Decoding +@comment node-name, next, previous, up +@section{Setting of content decoding condition} +@cindex{Setting of content decoding condition} + +When decoding operation is driven, tm-view calls a method matched for +the condition searched from the variable +@code{mime/content-decoding-condition}. + +Variable @code{mime/content-decoding-condition} is defined as a list +with the following syntax: + +@lisp + (condition1 condition2 ...) +@end lisp + +Each condition are association-list with the following syntax: + +@lisp + ((field-type_1 . value_1) + (field-type_2 . value_2) + ...) +@end lisp + +For example, if you want to call the external method named tm-plain to +decode every text/plain type content, you can define the condition +like + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) +@end lisp + +As you notice, now you can define the arguments to pass to a external +method. Refer to \ref{sec:method-arguments} section for more +explanation. + +This condition definition will match all contents whose types are +text/plain. Here is an another example: + +@lisp + ((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name) + (mode . "play")) +@end lisp + +This will match the content whose type is text/plain and the mode is +play. + +@lisp + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file) + (mode . "play")) +@end lisp + +This will match all contents which have a mode of play. + +The conditions defined in a mime/content-decoding-condition variable +are examined from top to bottom. The first matching condition becomes +valid and the method specified in that condition definition will be +executed. + + +@node Format of method value, Example of decoding-condition, decoding-condition, Decoding +@comment node-name, next, previous, up +@section{Format of method value part} +@cindex{Format of method value part} + +You can specify the method field of the decoding-condition definition +in two different ways, + +@lisp + (method . SYMBOL) +@end lisp + +or + +@lisp + (method STRING FLAG ARGUMENT1 ARGUMENT2 ...) +@end lisp + +can be accepted. + +When a symbol is specified in the method field, a function whose name +is SYMBOL will be called as an internal method. + +When a list is specified in the method field, it will be called as an +external method. + +The list below shows the meaning of the parameters when the external +method is specified in the method field. + +@table @samp +@item STRING + name of an external method +@item FLAG + If @code{t}, both the content header and the content body are + passed to an external method. if nil, only the content body is + passed to an external method. +@item ARGUMENTs + list of arguments passed to an external method +@end table + +An argument passed to an external method can be in one of the +following formats: + +@table @samp +@item STRING + string itself +@item 'SYMBOL + value gotten using SYMBOL as a key (see below) +@item 'STRING + value gotten using STRING as a key (see below) +@end table + +'SYMBOL can be one of the following: + +@table @samp +@item 'file + name of a file holding the original content +@item 'type + content-type/sub-type of Content-Type field +@item 'encoding + field body of Content-Transfer-Encoding field +@item 'mode + decoding-mode +@item 'name + name of a file created by decode operation +@end table + +'STRING is used to search a parameter of the Content-Type field whose +name matches with it, and pass the value of that parameter to the +external method. + + +@node Example of decoding-condition, Concept Index, Format of method value, Decoding +@comment node-name, next, previous, up +@section{Examples of decoding-condition} +@cindex{Examples of decoding-condition} + +The default definition of a mime/content-decoding-condition variable +is shown below. + +@lisp +(defvar mime/content-decoding-condition + '(((type . "text/plain") + (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)) + ((type . "text/x-latex") + (method "tm-latex" nil 'file 'type 'encoding 'mode 'name)) + ((type . "audio/basic") + (method "tm-au" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/gif") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/jpeg") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-tiff") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-xbm") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "image/x-pic") + (method "tm-image" nil 'file 'type 'encoding 'mode 'name)) + ((type . "video/mpeg")` + (method "tm-mpeg" nil 'file 'type 'encoding 'mode 'name)) + ((type . "application/octet-stream") + (method "tm-file" nil 'file 'type 'encoding 'mode 'name)) + ((type . "message/partial") + (method . mime/decode-message/partial-region)) + ((method "metamail" t + "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play")) + )) +@end lisp + +For example, if you want to use metamail to decode any contents, + +@lisp +(setq mime/content-decoding-condition + '( + ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)) + )) +@end lisp + +will work. + +A mime/content-decoding-condition variable provides you of very flexible +way to define the conditions of decoding. It can be simple if you only +need the a few decoding methods, while it can be very complicated if you +want to use the separate decoding method for each type/mode combination. + + +Following function may be useful to set decoding-condition. It is a +function of tl-atype.el. + + +@deffn{Function} set-atype symbol alist + +Add condition @var{alist} to symbol @var{symbol}. + +Example: + +@lisp +(set-atype 'mime/content-decoding-condition + '((type . "message/external-body") + ("access-type" . "anon-ftp") + (method . mime/decode-message/external-ftp) + )) +@end lisp +@end deffn + + +@node Concept Index, Command Index, Decoding, Top +@unnumbered Concept Index + +@printindex cp + + +@node Command Index, Variable Index, Concept Index, Top +@unnumbered Command and Function Index + +@printindex fn + + +@node Variable Index, , Command Index, Top +@unnumbered Variable Index + +@printindex vr + +@bye diff --git a/doc/tm-view_ja.texi b/doc/tm-view_ja.texi index 3dc25ee..8aeac7e 100644 --- a/doc/tm-view_ja.texi +++ b/doc/tm-view_ja.texi @@ -4,14 +4,9 @@ @settitle{tm-view manual} @titlepage -@sp{5} -@center{@titlefont{tm-view}} -@sp{15} -@center{@titlefont{¼é²¬ ÃÎɧ}} -@sp{1} -@center - @code{$Id: tm-view_ja.texi,v 6.1 1995/06/29 14:12:00 morioka Exp $} - +@title{tm-view} +@author{¼é²¬ ÃÎɧ} +@code{$Id: tm-view_ja.texi,v 6.3 1995/08/01 18:56:32 morioka Exp $} @end titlepage @@ -174,7 +169,6 @@ preview buffer @example -[0 tm6.63.tar.gz (multipart/mixed)] From: ¼é²¬ ÃÎɧ (MORIOKA Tomohiko) Newsgroups: zxr.comp.emacs.tm-english Subject: tm6.63.tar.gz @@ -289,7 +283,7 @@ content-subject ɽ ¤¢¤ë content ¤Î content-number ¤ò´Ø¿ô @code{mime-viewer/header-visible-p} ¤ËÆþÎϤ·¤Æ¤½¤ÎÊÖ¤êÃͤ¬ @code{t} ¤Ë ¤Ê¤ë¾ì¹ç¡¢¤½¤Î content ¤Î content-header ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¤³¤ÎȽÄê´Ø¿ô -¤Ï¡¢°ìÈÖ¾å¤Î content ¤Ç¤¢¤ë¤«¡¢¤½¤Î content ¤Î¿Æ¤Î content-type ¤¬ÊÑ¿ô +¤Ï¡¢°ìÈÖ¾å¤Î content ¤Ç¤Ê¤¯¡¢¤½¤Î content ¤Î¿Æ¤Î content-type ¤¬ÊÑ¿ô @code{mime-viewer/childrens-header-showing-Content-Type-list} ¤Ç»ØÄꤵ ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë @code{t} ¤òÊÖ¤·¤Þ¤¹¡£ diff --git a/doc/tm_en.texi b/doc/tm_en.texi new file mode 100644 index 0000000..e0cade6 --- /dev/null +++ b/doc/tm_en.texi @@ -0,0 +1,350 @@ +\input texinfo.tex +@c{-*-tm manual-*-} +@setfilename tm_en.info +@settitle{tm manual} + +@titlepage +@title{tm Manual (English Version)} +@author{by MORIOKA Tomohiko} +@code{$Id: tm_en.texi,v 6.1 1995/08/01 18:48:29 morioka Exp $} +@end titlepage + + +@node Top, List of modules, (dir), (dir) +@comment node-name, next, previous, up +@chapter{tm} +@cindex{tm} + +The tm package is a set of modules to enjoy MIME on GNU Emacs. Using tm, +you can + +@itemize +@item playback or view the MIME messages using mime/viewer-mode +@item encode and decode the multi-lingual headers using tiny-mime +@item use the enhanced MIME functions with mh-e, GNUS, RMAIL and VM +@end itemize + +and more. + + +@menu +* List of modules:: +* Emacs Versions:: +* Install:: +* Setting:: +* tm-MUA:: +* tm-view: (tm-view_en.info). +* Bug report:: How to report bug and about mailing list of tm. +* Concept Index:: +* Command Index:: +* Variable Index:: +@end menu + + +@node List of modules, Emacs Versions, Top, Top +@comment node-name, next, previous, up +@chapter{List of modules} +@cindex{List of modules} + +The tm package includes the modules listed below. + +@itemize +@item @strong{tiny-mime:} MIME header encoder/decoder +@item @strong{tm-view:} MIME viewer +@item @strong{tm-misc:} common part for tm-MUAs + @item @strong{tm-mh-e:} tm-MUA for mh-e + @item @strong{tm-gnus:} tm-MUA for GNUS + @item @strong{tm-rmail:} tm-MUA for RMAIL + @item @strong{tm-vm:} tm-MUA for VM +@item @strong{tm-setup:} tm-MUA setup module +@item @strong{mime-setup:} MIME setup module +@end itemize + +@menu +* tiny-mime:(tm-eword_en.info). +* tm-view:(tm-view_en.info). +* tm-mh-e:(tm-mh-e_en.info). +* tm-gnus:(tm-gnus_en.info). +* tm-rmail:(tm-rmail_en.info). +* tm-vm:(tm-vm_en.info). +* chain-mail:(tm-cmail_en.info). +@end menu + + +@node Emacs Versions, Install, List of modules, Top +@comment node-name, next, previous, up +@chapter{Considerations for each emacs variants} +@cindex{Considerations for each emacs variants} + +@section{original GNU Emacs 18} + +I can not guarantee, but you may use US-ASCII only. + +@section{NEmacs, NEpoch} + +ISO-2022-JP and US-ASCII can be used if you use NEmacs. + +@section{original GNU Emacs 19} + +US-ASCII and ISO-8859-1 can be used if you use the original Emacs +19.*. + +When emacs is running with own window in X window environment, tm-rich +displays multi face for text/richtext and text/enriched richtext +messages. + +@section{Mule} + +Mule can handle the multi-lingual text. With Mule, tiny-mime supports +ISO-2022-JP, ISO-2022-JP-2, US-ASCII, ISO-8859-1..9, ISO-2022-CN, +ISO-2022-KR, EUC-KR, etc. You can also add or change +encoding/decoding for character sets by mime/set-charset-and-encoding +function. + +When Mule 2.* is running with own window in X window environment, +tm-rich displays multi face for text/richtext and text/enriched +richtext messages. + +@section{XEmacs} + +US-ASCII and ISO-8859-1 can be used if you use the XEmacs. + +In future, we will support multi face and inline image. + + +@node Install, Setting, Emacs-Versions, Top +@comment node-name, next, previous, up +@chapter{Install} +@cindex{Install} + +You can install tm by following the procedures below. + +@section{tl install} + +tm requires the Emacs Lisp library ``tl'', so please install this at +first. + +How to install tl is written in tl/README.eng. + + +@section{Makefile} + +Please modify Makefile to your environment. + +@subsection{Specification executable file name of emacs} + +Please specify executable file name of emacs. + +@itemize +@item NEMACS = for NEMACS (or NEpoch) +@item MULE1 = for Mule 1.* (based on Emacs 18.*) +@item ORIG19 = for Emacs 19.* (FSF original or XEmacs) +@item MULE2 = for MULE 2.* (based on Emacs 19.*) +@end itemize + +@subsection{Specification load-path} + +Please specify directory to install Emacs Lisp program. + +@itemize +@item TLDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1) +@item TLDIR19 = for Emacs 19.* (FSF original, XEmacs or MULE 2) +@end itemize + + +@section{External method} + +Please modify method script in tm/methods/ to your environment. + + +@section{make} + +Run `make all'. + + +@section{install} + +Run `make install'. + + +@section{install Emacs Lisp program} + +Run `make install-nemacs', if you use NEmacs or NEpoch. + +Run `make install-mule1', if you use Mule 1.* (based on Emacs 18.*). + +Run `make install-orig19', if you use Original Emacs 19.* or XEmacs. + +Run `make install-mule2', if you use Mule 2.* (based on Emacs 19.*). + +Or copy *.el to your emacs lisp directory. + + +@node Setting, tm-MUA, Install, Top +@comment node-name, next, previous, up +@chapter{Setting} +@cindex{Setting} + +In the tm package, two files, mime-setup.el and tm-setup.el, are provided +to ease the setup. A mime-setup.el is used for the whole MIME related +setup including MIME encoding, while tm-setup is used to set up tm-MUA +only. + +@section{mime-setup} + +@lisp +(load "mime-setup") +@end lisp + +will perform various settings of MIME. As mime-setup loads +tm-setup, you do not need to load tm-setup when you use mime-setup. + +You can also set up the "automatic signature selection tool" using +mime-setup. If you want to automatically select the signature file +depending on how the message headers show, add lines like shown below +to your .emacs (Refer to the reference manual of signature.el for +more details). + +@lisp +(setq signature-file-alist + '((("Newsgroups" . "jokes") . "~/.signature-jokes") + (("Newsgroups" . ("zxr" "nzr")) . "~/.signature-sun") + (("To" . ("ishimaru" "z-suzuki")) . "~/.signature-sun") + (("To" . "tea") . "~/.signature-jokes") + (("To" . ("sim" "oku" "takuo")) . "~/.signature-formal") + )) +@end lisp + +mime-setup requires mime.el. if you set up SuperCite via mime-setup, +you need the SuperCite package also. + + +@section{tm-setup} + +tm-setup only sets up tm-MUAs. You do not need to explicitly load +tm-setup if you are using mime-setup for your setup. tm-setup is useful +when you do not want to use mime-setup but want to set up tm-MUAs. + +@lisp +(load "tm-setup") +@end lisp + + +@section{vm} + +If you use vm, please insert following in .vm or .emacs. + +@lisp +(load "tm-vm") +@end lisp + + +@section{setting up without loading provided setup files} + +You may find the valuable hints in tm-setup.el if you want to set up +MIME environment without loading the tm-provided setup files. + + +@node tm-MUA, Bug report, Setting, Top +@comment node-name, next, previous, up +@chapter{tm-MUA} +@cindex{tm-MUA} + +``tm-MUA'' is a generic name of the modules which enhance the MIME +functions of MUA like mh-e, GNUS, and RMAIL etc. + +The current version of tm provides the following tm-MUA. + +@itemize +@item @strong{tm-mh-e:} tm-MUA for mh-e +@item @strong{tm-gnus:} tm-MUA for GNUS +@item @strong{tm-rmail:} tm-MUA for RMAIL +@item @strong{tm-vm:} tm-MUA for VM +@end itemize + +You can find the detailed explanations of these modules in the +following sections. + + +@section{Summary mode} + +If you are using tm-MUA, the following functions are added to the +Summary mode of the MUA. + +@table @kbd +@item @key{M-t} + toggles decoding of MIME headers +@item @key{v} + enters @code{mime/viewer-mode} to view a message +@end table + +Notice: In tm-vm, key to enter @code{mime/viewer-mode} is @key{Z} +instead of @key{v}. In tm-mh-e and tm-gnus for (ding) GNUS, preview +buffer of @code{mime/viewer-mode} is displays automatically in default +setting. + +@menu +* tm-mh-e: (tm-mh-e_en.info). +* tm-gnus: (tm-gnus_en.info). +* tm-rmail: (tm-rmail_en.info). +* tm-vm: (tm-vm_en.info). +* tm-cmail: (tm-cmail_en.info). +* mime/viewer-mode: (tm-view_en.info)how-to-use. +@end menu + + +@node Bug report, Concept Index, tm-MUA, Top +@comment node-name, next, previous, up +@chapter{How to report bug and about mailing list of tm} +@cindex{bug report} +@cindex{mailing list} + +Please report tm bugs you find to fj.editor.emacs or send a mail to +tm ML: + +@itemize @bullet +@item Japanese or English + + + +@item English + + +@end itemize + +Via tm ML, You can report bugs of tm, obtain the latest release of tm +package, and discuss the future enhancements to tm. To join tm ML, +send a mail to + +@itemize @bullet +@item Japanese or English + + + +@item English + + +@end itemize + +Since the user registration is manually done, please write +the mail body in human-recognizable language. (^_^) + + +@node Concept Index, Command Index, Bug report, Top +@unnumbered Concept Index + +@printindex cp + + +@node Command Index, Variable Index, Concept Index, Top +@unnumbered Command and Function Index + +@printindex fn + + +@node Variable Index, Top, Command Index, Top +@unnumbered Variable Index + +@printindex vr + +@bye diff --git a/doc/tm_ja.texi b/doc/tm_ja.texi index 639b20e..d7e0b43 100644 --- a/doc/tm_ja.texi +++ b/doc/tm_ja.texi @@ -4,12 +4,9 @@ @settitle{tm manual} @titlepage -@sp{5} -@center @titlefont{tm} -@sp{15} -@center @titlefont{$BZ$7$^$;$s!#$7$+$7$J$,$i!"(BUS-ASCII $B$NHO0O$G$OF0:n$9$k$H;W$o$l(B -$B$^$9!#(B +Æ°ºî¤ÏÊݾڤ·¤Þ¤»¤ó¡£¤·¤«¤·¤Ê¤¬¤é¡¢US-ASCII ¤ÎÈϰϤǤÏÆ°ºî¤¹¤ë¤È»×¤ï¤ì +¤Þ¤¹¡£ @section{NEmacs, NEpoch} -ISO-2022-JP, US-ASCII $B$,;H$($^$9!#(B +ISO-2022-JP, US-ASCII ¤¬»È¤¨¤Þ¤¹¡£ @section{original GNU Emacs 19} -US-ASCII $B$*$h$S(B ISO-8859-1 $B$r%5%]!<%H$7$^$9!#(B +US-ASCII ¤ª¤è¤Ó ISO-8859-1 ¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£ -$B$^$?!"(BX window $B>e$NFHN)$7$?(B window $B$H$7$FF0:n$5$;$k>l9g!"(Btm-rich $B$K$h(B -$B$k(B multi face $BI=<($,9T$J$($^$9!#(B +¤Þ¤¿¡¢X window ¾å¤ÎÆÈΩ¤·¤¿ window ¤È¤·¤ÆÆ°ºî¤µ¤»¤ë¾ì¹ç¡¢tm-rich ¤Ë¤è +¤ë multi face ɽ¼¨¤¬¹Ô¤Ê¤¨¤Þ¤¹¡£ @section{Mule} ISO-2022-JP, US-ASCII, ISO-8859-1..9, ISO-2022-CN, ISO-2022-KR, EUC-KR -$B$J$I$NB?$/$N(B charset $B$r%5%]!<%H$7$^$9!#$^$?!"4X?t(B -mime/set-charset-and-encoding $B$GDI2C!&JQ99$,$G$-$^$9!#(B +¤Ê¤É¤Î¿¤¯¤Î charset ¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¤Þ¤¿¡¢´Ø¿ô +mime/set-charset-and-encoding ¤ÇÄɲá¦Êѹ¹¤¬¤Ç¤­¤Þ¤¹¡£ -$B$^$?!"(BMule 2.* $B$r(B X window $B>e$NFHN)$7$?(B window $B$H$7$FF0:n$5$;$k>l9g!"(B -tm-rich $B$K$h$k(B multi face $BI=<($,9T$J$($^$9!#(B +¤Þ¤¿¡¢Mule 2.* ¤ò X window ¾å¤ÎÆÈΩ¤·¤¿ window ¤È¤·¤ÆÆ°ºî¤µ¤»¤ë¾ì¹ç¡¢ +tm-rich ¤Ë¤è¤ë multi face ɽ¼¨¤¬¹Ô¤Ê¤¨¤Þ¤¹¡£ @section{XEmacs} -US-ASCII $B$*$h$S(B ISO-8859-1 $B$r%5%]!<%H$7$^$9!#(B +US-ASCII ¤ª¤è¤Ó ISO-8859-1 ¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£ -$B:#$N$H$3$m!"(Btm-rich $B$K$h$k(B multi face $BI=<($O%5%]!<%H$5$l$F$$$^$;$s$,!"(B -$B>-MhE*$K$O!"(Bmulti face $BI=<($H(B inline image $B$NI=<($,%5%]!<%H$5$l$kM=Dj(B -$B$G$9!#(B +º£¤Î¤È¤³¤í¡¢tm-rich ¤Ë¤è¤ë multi face ɽ¼¨¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¤¬¡¢ +¾­ÍèŪ¤Ë¤Ï¡¢multi face ɽ¼¨¤È inline image ¤Îɽ¼¨¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤ëͽÄê +¤Ç¤¹¡£ -@node Install, How-to-use, Emacs-Versions, Top +@node Install, Setting, Emacs-Versions, Top @comment node-name, next, previous, up @chapter{Install} @cindex{Install} -Install $B$O$N;XDj(B} +@subsection{Emacs ¤Î¼Â¹Ô file ̾¤Î»ØÄê} -Emacs $B$N$r;XDj$7$F2<$5$$!#(B +Emacs ¤Î¼Â¹Ô file ̾¤ò»ØÄꤷ¤Æ²¼¤µ¤¤¡£ @itemize @item NEMACS = for NEMACS (or NEpoch) @@ -145,9 +143,9 @@ Emacs $B$N$r;XDj$7$F2<$5$$!#(B @item MULE2 = for MULE 2.* (based on Emacs 19.*) @end itemize -@subsection{load-path $B$N;XDj(B} +@subsection{load-path ¤Î»ØÄê} -Emacs Lisp program $B$r(B install $B$9$k(B directory $B$r;XDj$7$F2<$5$$!#(B +Emacs Lisp program ¤ò install ¤¹¤ë directory ¤ò»ØÄꤷ¤Æ²¼¤µ¤¤¡£ @itemize @item TLDIR18 = for Emacs 18.* (NEMACS, NEpoch or MULE 1) @@ -155,60 +153,60 @@ Emacs Lisp program $B$r(B install $B$9$k(B directory $B$r;XDj$7$F2<$5$$!#( @end itemize -@section{$B30It(B method} +@section{³°Éô method} -methods/ $B0J2<$K$"$k(B method script $B$r(B sec:method $B@a$r;2>H$7$F!"<+J,$N4D(B -$B6-$K9g$&$h$&$K=q$-49$($F2<$5$$!#(B +methods/ °Ê²¼¤Ë¤¢¤ë method script ¤ò sec:method Àá¤ò»²¾È¤·¤Æ¡¢¼«Ê¬¤Î´Ä +¶­¤Ë¹ç¤¦¤è¤¦¤Ë½ñ¤­´¹¤¨¤Æ²¼¤µ¤¤¡£ @section{make} -`make all' $B$7$F2<$5$$!#(B +`make all' ¤·¤Æ²¼¤µ¤¤¡£ @section{install} -`make install' $B$7$F2<$5$$!#(B +`make install' ¤·¤Æ²¼¤µ¤¤¡£ -@section{Emacs Lisp program $B$N(B install} +@section{Emacs Lisp program ¤Î install} -NEmacs $B$b$7$/$O(B NEpoch $B$r;H$C$F$$$k>l9g!"(B`make install-nemacs' $B$rl9g!"(B`install-mule1' $B$rl9g!"(B`make -install-orig19' $B$rl9g!"(B`make install-mule2' $B$rl9g$G$b!"(B*.el $B$r(B load-path $B$G;XDj(B -$B$5$l$?(B directory $B$K(B copy $B$9$l$P(B OK $B$G$9!#(B +¤¢¤ë¤¤¤Ï¡¢¤³¤ì¤é¤¬¤¦¤Þ¤¯¤¤¤«¤Ê¤«¤Ã¤¿¾ì¹ç¤Ç¤â¡¢*.el ¤ò load-path ¤Ç»ØÄê +¤µ¤ì¤¿ directory ¤Ë copy ¤¹¤ì¤Ð OK ¤Ç¤¹¡£ @node Setting, tm-MUA, Install, Top @comment node-name, next, previous, up -@chapter{$B@_Dj(B} -@cindex{$B@_Dj(B} +@chapter{ÀßÄê} +@cindex{ÀßÄê} -$B$3$N(B package $B$K$O(B mime-setup.el $B$H(B tm-setup.el $B$H$$$&4J0W@_Dj(B file $B$,(B -$BImB0$7$F$$$^$9!#(Bmime-setup.el $B$G$O(B encoding $B$b4^$a$?(B MIME $BA4HL$N@_Dj$r(B -$B9T$J$$!"(Btm-setup $B$G$O(B tm-MUA $B$K4X$9$k@_Dj$N$_$r9T$J$$$^$9!#(B +¤³¤Î package ¤Ë¤Ï mime-setup.el ¤È tm-setup.el ¤È¤¤¤¦´Ê°×ÀßÄê file ¤¬ +Éí°¤·¤Æ¤¤¤Þ¤¹¡£mime-setup.el ¤Ç¤Ï encoding ¤â´Þ¤á¤¿ MIME Á´È̤ÎÀßÄê¤ò +¹Ô¤Ê¤¤¡¢tm-setup ¤Ç¤Ï tm-MUA ¤Ë´Ø¤¹¤ëÀßÄê¤Î¤ß¤ò¹Ô¤Ê¤¤¤Þ¤¹¡£ @section{mime-setup} @example (load "mime-setup") @end example -$B$H$9$k$H(B MIME $B$K4X$9$k3Fl9g!"(Btm-setup $B$r(B load $B$9$kI,MW$O$"$j(B -$B$^$;$s!#(B +¤È¤¹¤ë¤È MIME ¤Ë´Ø¤¹¤ë³Æ¼ïÀßÄê¤ò¹Ô¤Ê¤¤¤Þ¤¹¡£mime-setup ¤Ï tm-setup ¤ò +Æɤó¤Ç¤¤¤ë¤Î¤Ç¡¢mime-setup ¤ò»È¤¦¾ì¹ç¡¢tm-setup ¤ò load ¤¹¤ëɬÍפϤ¢¤ê +¤Þ¤»¤ó¡£ -mime-setup $B$G$O(B signature $B$N<+F0@ZBX$((B tool $B$bImB0$7$F$$$^$9!#(B -message header $B$N(B field $B$K9g$o$;$F(B signature $B$N<+F0@ZBX$r9T$J$$$?$$>l(B -$B9g$O(B .emacs $B$K0J2<$N$h$&$J$b$N$rF~$l$F2<$5$$!#!J>\$7$/$O(B signature.el -$B$N@bL@=q$r;2>H$7$F2<$5$$!K(B +mime-setup ¤Ç¤Ï signature ¤Î¼«Æ°ÀÚÂؤ¨ tool ¤âÉí°¤·¤Æ¤¤¤Þ¤¹¡£ +message header ¤Î field ¤Ë¹ç¤ï¤»¤Æ signature ¤Î¼«Æ°ÀÚÂؤò¹Ô¤Ê¤¤¤¿¤¤¾ì +¹ç¤Ï .emacs ¤Ë°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤òÆþ¤ì¤Æ²¼¤µ¤¤¡£¡Ê¾Ü¤·¤¯¤Ï signature.el +¤ÎÀâÌÀ½ñ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡Ë @example (setq signature-file-alist @@ -220,15 +218,15 @@ message header $B$N(B field $B$K9g$o$;$F(B signature $B$N<+F0@ZBX$r9T$J$$$? )) @end example -mime-setup $B$r;H$&>l9g$O!"(Bmime.el $B$,I,MW$G$9!#$^$?!"(BSuperCite $B$r;H$&>l(B -$B9g$O!"(BSuperCite $B$bI,MW$G$9!#(B +mime-setup ¤ò»È¤¦¾ì¹ç¤Ï¡¢mime.el ¤¬É¬ÍפǤ¹¡£¤Þ¤¿¡¢SuperCite ¤ò»È¤¦¾ì +¹ç¤Ï¡¢SuperCite ¤âɬÍפǤ¹¡£ @section{tm-setup} -tm-setup $B$O(B tm-MUA $B$N@_Dj$N$_$r9T$J$&(B module $B$G$9!#(Bmime-setup $B$r(B load -$B$7$F$$$k>l9g!"$3$l$rM[$K(B load $B$9$kI,MW$O$"$j$^$;$s$,!"(Bmime-setup $B$r;H(B -$B$$$?$/$J$$>l9g!"0J2<$N$h$&$K$3$l$r(B load $B$7$F2<$5$$!#(B +tm-setup ¤Ï tm-MUA ¤ÎÀßÄê¤Î¤ß¤ò¹Ô¤Ê¤¦ module ¤Ç¤¹¡£mime-setup ¤ò load +¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤³¤ì¤òÍÛ¤Ë load ¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¤¬¡¢mime-setup ¤ò»È +¤¤¤¿¤¯¤Ê¤¤¾ì¹ç¡¢°Ê²¼¤Î¤è¤¦¤Ë¤³¤ì¤ò load ¤·¤Æ²¼¤µ¤¤¡£ @example (load "tm-setup") @@ -237,50 +235,50 @@ tm-setup $B$O(B tm-MUA $B$N@_Dj$N$_$r9T$J$&(B module $B$G$9!#(Bmime-setup @section{vm} -vm $B$r;H$&>l9g$O(B .vm $B$+(B .emacs $B$K(B +vm ¤ò»È¤¦¾ì¹ç¤Ï .vm ¤« .emacs ¤Ë @example (load "tm-vm") @end example -$B$rF~$l$F2<$5$$!#(B +¤òÆþ¤ì¤Æ²¼¤µ¤¤¡£ -@section{$B@_Dj(B file $B$r;H$o$J$$>l9g(B} +@section{ÀßÄê file ¤ò»È¤ï¤Ê¤¤¾ì¹ç} -tm-setup.el $B$r;29M$K$7$F2<$5$$!#(B +tm-setup.el ¤ò»²¹Í¤Ë¤·¤Æ²¼¤µ¤¤¡£ -@node tm-MUA, Concept Index, Setting, Top +@node tm-MUA, Bug report, Setting, Top @comment node-name, next, previous, up @chapter{tm-MUA} @cindex{tm-MUA} -``tm-MUA'' $B$H$$$&$N$O!"(Bmh-e, GNUS, RMAIL $B$J$I$N(B MUA $B$N$?$a$N(B MIME $B5!G=(B -$B6/2=(B module $B$NAm>N$G$9!#(B +``tm-MUA'' ¤È¤¤¤¦¤Î¤Ï¡¢mh-e, GNUS, RMAIL ¤Ê¤É¤Î MUA ¤Î¤¿¤á¤Î MIME µ¡Ç½ +¶¯²½ module ¤ÎÁí¾Î¤Ç¤¹¡£ -$B8=:_!"(Btm-MUA $B$K$O!"(B +¸½ºß¡¢tm-MUA ¤Ë¤Ï¡¢ @itemize -@item @strong{tm-mh-e:} mh-e $BMQ$N(B tm-MUA -@item @strong{tm-gnus:} GNUS $BMQ$N(B tm-MUA -@item @strong{tm-rmail:} RMAIL $BMQ$N(B tm-MUA -@item @strong{tm-vm:} VM $BMQ$N(B tm-MUA +@item @strong{tm-mh-e:} mh-e ÍѤΠtm-MUA +@item @strong{tm-gnus:} GNUS ÍѤΠtm-MUA +@item @strong{tm-rmail:} RMAIL ÍѤΠtm-MUA +@item @strong{tm-vm:} VM ÍѤΠtm-MUA @end itemize -$B$,$"$j$^$9!#$3$N>O$G$O$3$l$i$N(B module $B$K4X$7$F@bL@$7$^$9!#(B +¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¾Ï¤Ç¤Ï¤³¤ì¤é¤Î module ¤Ë´Ø¤·¤ÆÀâÌÀ¤·¤Þ¤¹¡£ @section{Summary mode} -tm-MUA $B$r;H$&$H!"85$N(B MUA $B$N(B Summary mode $B$KBP$7$F0J2<$N5!G=$,DI2C$5$l(B -$B$^$9!#(B +tm-MUA ¤ò»È¤¦¤È¡¢¸µ¤Î MUA ¤Î Summary mode ¤ËÂФ·¤Æ°Ê²¼¤Îµ¡Ç½¤¬Äɲ䵤ì +¤Þ¤¹¡£ @table @kbd @item @key{M-t} - RFC 1522 MIME encoded-word $B$N(B decode $B$K4X$9$k(B toggle + RFC 1522 MIME encoded-word ¤Î decode ¤Ë´Ø¤¹¤ë toggle @item @key{v} - @code{mime/viewer-mode} $B$KF~$j!"(Bmessage $B$r1\Mw$9$k(B + @code{mime/viewer-mode} ¤ËÆþ¤ê¡¢message ¤ò±ÜÍ÷¤¹¤ë @end table -$BC"$7!"(Btm-vm $B$G$O(B @key{v} $B$G$O$J$/(B @key{Z} $B$G(B @code{mime/viewer-mode} -$B$KF~$j$^$9!#$^$?!"(Btm-mh-e $B$H(B tm-gnus for (ding) GNUS $B$G$OI8=`$G$O>o$K(B -@code{mime/viewer-mode} $B$N(B preview buffer $B$,I=<($5$l$^$9!#(B +⤷¡¢tm-vm ¤Ç¤Ï @key{v} ¤Ç¤Ï¤Ê¤¯ @key{Z} ¤Ç @code{mime/viewer-mode} +¤ËÆþ¤ê¤Þ¤¹¡£¤Þ¤¿¡¢tm-mh-e ¤È tm-gnus for (ding) GNUS ¤Ç¤Ïɸ½à¤Ç¤Ï¾ï¤Ë +@code{mime/viewer-mode} ¤Î preview buffer ¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ @menu * tm-mh-e: (tm-mh-e_ja.info). @@ -292,20 +290,56 @@ tm-MUA $B$r;H$&$H!"85$N(B MUA $B$N(B Summary mode $B$KBP$7$F0J2<$N5!G=$,DI2 @end menu -@node Concept Index, Command Index, tm-MUA, Top -@unnumbered $B35G0:w0z(B +@node Bug report, Concept Index, tm-MUA, Top +@comment node-name, next, previous, up +@chapter{bug Êó¹ð¤Î»ÅÊý¤È mailing list ¤Ë¤Ä¤¤¤Æ} +@cindex{bug Êó¹ð} +@cindex{mailing list} + +tm ¤Î¥Ð¥°¤ò¸«¤Ä¤±¤¿¤é fj.editor.emacs ¤Ë post ¤¹¤ë¤«¡¢tm ML ¤Ë mail ¤ò +Á÷¤Ã¤Æ²¼¤µ¤¤¡£tm ML ¤Î address ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£ + +@itemize @bullet +@item Japanese or English + + + +@item English + + +@end itemize + +tm ML ¤Ç¤Ï tm ¤Î¥Ð¥°¾ðÊó¤Î¸ò´¹¤äºÇ¿·ÈǤÎÇÛÉÛ¡¢tm ¤Î²þÎɤ˴ؤ¹¤ëµÄÏÀ¤ò +¹Ô¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£tm ML ¤Ë»²²Ã¤·¤¿¤¤Êý¤Ï + +@itemize @bullet +@item Japanese or English + + + +@item English + + +@end itemize + +¤Þ¤Ç mail ¤òÁ÷¤Ã¤Æ²¼¤µ¤¤¡£ÅÐÏ¿¤Ï¼êÆ°¤Ç¤¹¤Î¤Ç¡¢¤Ç¤­¤ì¤Ð¡¢¼«Á³¸À¸ì¤Ç½ñ¤¤ +¤Æ²¼¤µ¤¤¡£(^_^) + + +@node Concept Index, Command Index, Bug report, Top +@unnumbered ³µÇ°º÷°ú @printindex cp @node Command Index, Variable Index, Concept Index, Top -@unnumbered $B4X?t!&%3%^%s%I:w0z(B +@unnumbered ´Ø¿ô¡¦¥³¥Þ¥ó¥Éº÷°ú @printindex fn @node Variable Index, Top, Command Index, Top -@unnumbered $BJQ?t:w0z(B +@unnumbered ÊÑ¿ôº÷°ú @printindex vr diff --git a/gnus/Makefile b/gnus/Makefile index c6371a2..de668d7 100644 --- a/gnus/Makefile +++ b/gnus/Makefile @@ -3,7 +3,7 @@ # # Please specify emacs executables: -EMACS = mule2 +EMACS = mule # Please specfy Emacs Lisp install directory: diff --git a/gnus/tm-dgnus.el b/gnus/tm-dgnus.el index aa79f1f..8fbb8ac 100644 --- a/gnus/tm-dgnus.el +++ b/gnus/tm-dgnus.el @@ -10,11 +10,22 @@ ;;; @ version ;;; (defconst tm-gnus/RCS-ID - "$Id: tm-dgnus.el,v 6.9 1995/07/03 07:50:58 morioka Exp $") + "$Id: tm-dgnus.el,v 6.14 1995/08/01 17:19:15 morioka Exp $") (defconst tm-gnus/version (concat (get-version-string tm-gnus/RCS-ID) " (ding)")) +(defconst tm-gnus/automatic-MIME-preview-support + (if (boundp 'gnus-clean-article-buffer) + (progn + (defconst gnus-version (concat gnus-version " with tm patch")) + t))) + +(defvar tm-gnus/preview-buffer + (if tm-gnus/automatic-MIME-preview-support + (concat "*Preview-" gnus-clean-article-buffer "*")) + ) + ;;; @ autoload ;;; @@ -30,9 +41,10 @@ (defvar tm-gnus/original-article-display-hook gnus-article-display-hook) -(defvar tm-gnus/decode-all t) - -(defvar tm-gnus/preview-buffer (concat "*Preview-" gnus-article-buffer "*")) +(defvar tm-gnus/decode-all tm-gnus/automatic-MIME-preview-support + "If it is non-nil and +tm-gnus/automatic-MIME-preview-support is non-nil, +article is automatic MIME decoded.") ;;; @ command functions @@ -44,7 +56,7 @@ (let ((gnus-break-pages nil)) (gnus-summary-select-article t t) ) - (pop-to-buffer gnus-article-buffer t) + (pop-to-buffer gnus-clean-article-buffer t) (let (buffer-read-only) (if (text-property-any (point-min) (point-max) 'invisible t) (remove-text-properties (point-min) (point-max) @@ -62,112 +74,6 @@ (define-key gnus-summary-mode-map "v" (function tm-gnus/view-message)) (define-key gnus-summary-mode-map "\e\r" (function tm-gnus/summary-scroll-down)) -(define-key gnus-summary-mode-map "\et" (function tm-gnus/toggle-mime)) - -(defmacro gnus-get-article-buffer () - (` (cdr (assq 'article gnus-window-to-buffer)))) - -;; Set article window start at LINE, where LINE is the number of lines -;; from the head of the article. -(defun gnus-article-set-window-start (&optional line) - (let ((article-buffer (gnus-get-article-buffer))) - (set-window-start - (get-buffer-window article-buffer) - (save-excursion - (set-buffer article-buffer) - (goto-char (point-min)) - (if (not line) - (point-min) - (gnus-message 6 "Moved to bookmark") - (search-forward "\n\n" nil t) - (forward-line line) - (point)))))) - -(defun gnus-summary-next-page (lines) - "Show next page of selected article. -If end of article, select next article. -Argument LINES specifies lines to be scrolled up." - (interactive "P") - (let ((article (gnus-summary-article-number)) - (endp nil)) - (if (or (null gnus-current-article) - (/= article gnus-current-article)) - ;; Selected subject is different from current article's. - (gnus-summary-display-article article) - (gnus-configure-windows 'article) - (pop-to-buffer gnus-summary-buffer) - (gnus-eval-in-buffer-window - (gnus-get-article-buffer) - (setq endp (gnus-article-next-page lines))) - (cond ((and endp lines) - (message "End of message")) - ((and endp (null lines)) - (gnus-summary-next-unread-article))) - ))) - -(defun gnus-summary-prev-page (lines) - "Show previous page of selected article. -Argument LINES specifies lines to be scrolled down." - (interactive "P") - (gnus-set-global-variables) - (let ((article (gnus-summary-article-number))) - (gnus-configure-windows 'article) - (if (or (null gnus-current-article) - (null gnus-article-current) - (/= article (cdr gnus-article-current)) - (not (equal (car gnus-article-current) gnus-newsgroup-name))) - ;; Selected subject is different from current article's. - (gnus-summary-display-article article) - (gnus-summary-recenter) - (gnus-eval-in-buffer-window - (gnus-get-article-buffer) - (gnus-article-prev-page lines)))) - (gnus-summary-position-cursor)) - -(defun gnus-summary-scroll-up (lines) - "Scroll up (or down) one line current article. -Argument LINES specifies lines to be scrolled up (or down if negative)." - (interactive "p") - (gnus-set-global-variables) - (gnus-configure-windows 'article) - (or (gnus-summary-select-article nil nil 'pseudo) - (gnus-eval-in-buffer-window - (gnus-get-article-buffer) - (cond ((> lines 0) - (if (gnus-article-next-page lines) - (gnus-message 3 "End of message"))) - ((< lines 0) - (gnus-article-prev-page (- lines)))))) - (gnus-summary-recenter) - (gnus-summary-position-cursor)) - -(defun gnus-summary-toggle-header (arg) - "Show the headers if they are hidden, or hide them if they are shown. -If ARG is a positive number, show the entire header. -If ARG is a negative number, hide the unwanted header lines." - (interactive "P") - (gnus-set-global-variables) - (save-excursion - (set-buffer (gnus-get-article-buffer)) - (let ((buffer-read-only nil)) - (if (numberp arg) - (if (> arg 0) (remove-text-properties (point-min) (point-max) - gnus-hidden-properties) - (if (< arg 0) (run-hooks 'gnus-article-display-hook))) - (if (text-property-any (point-min) (point-max) 'invisible t) - (if tm-gnus/decode-all - (let (mime-viewer/ignored-field-list) - (run-hooks 'gnus-article-display-hook) - ) - (remove-text-properties (point-min) (point-max) - gnus-hidden-properties) - ) - (let (gnus-have-all-headers) - (run-hooks 'gnus-article-display-hook) - )) - ) - (pop-to-buffer gnus-summary-buffer) - (set-window-point (get-buffer-window (current-buffer)) (point-min))))) ;;; @ summary filter @@ -202,6 +108,27 @@ If ARG is a negative number, hide the unwanted header lines." (mime/decode-message-header) )))) + +;;; @ automatic MIME preview support +;;; + +(defun tm-gnus/summary-toggle-header (&optional arg) + (interactive "P") + (if tm-gnus/decode-all + (let ((mime-viewer/ignored-field-list + (if (save-window-excursion + (switch-to-buffer tm-gnus/preview-buffer) + (goto-char (point-min)) + (message/get-field-body + (car mime-viewer/ignored-field-list) + )) + mime-viewer/ignored-field-list) + )) + (gnus-summary-select-article t t) + ) + (gnus-summary-toggle-header arg) + )) + (defun tm-gnus/set-mime-method (mode) (if mode (progn @@ -210,18 +137,16 @@ If ARG is a negative number, hide the unwanted header lines." (list (function (lambda () (mime/viewer-mode) (gnus-set-mode-line 'article) - (set-buffer-modified-p nil) - (pop-to-buffer mime::preview/article-buffer) )))) (set-alist 'gnus-window-to-buffer 'article tm-gnus/preview-buffer) + (setq gnus-article-buffer tm-gnus/preview-buffer) ) (setq gnus-show-mime t) (setq gnus-article-display-hook tm-gnus/original-article-display-hook) - (set-alist 'gnus-window-to-buffer 'article gnus-article-buffer) + (set-alist 'gnus-window-to-buffer 'article gnus-clean-article-buffer) + (setq gnus-article-buffer gnus-clean-article-buffer) )) -(tm-gnus/set-mime-method tm-gnus/decode-all) - (defun tm-gnus/toggle-mime (arg) "Toggle MIME processing mode. With arg, turn MIME processing on if arg is positive." @@ -235,17 +160,25 @@ With arg, turn MIME processing on if arg is positive." (gnus-summary-select-article gnus-show-all-headers 'force) ) - -;;; @ etc -;;; - -(add-hook 'gnus-exit-gnus-hook - (function - (lambda () - (let ((buf (get-buffer tm-gnus/preview-buffer))) - (if buf - (kill-buffer buf) - ))))) +(if tm-gnus/automatic-MIME-preview-support + (progn + (define-key gnus-summary-mode-map + "t" (function tm-gnus/summary-toggle-header)) + (define-key gnus-summary-mode-map "\et" (function tm-gnus/toggle-mime)) + + (tm-gnus/set-mime-method tm-gnus/decode-all) + + (add-hook 'gnus-exit-gnus-hook + (function + (lambda () + (let ((buf (get-buffer tm-gnus/preview-buffer))) + (if buf + (kill-buffer buf) + ))))) + ) + (setq gnus-article-display-hook tm-gnus/original-article-display-hook) + (setq gnus-show-mime t) + ) ;;; @ end diff --git a/richtext.el b/richtext.el index 4b0b35c..2cf6e4d 100644 --- a/richtext.el +++ b/richtext.el @@ -1,118 +1,158 @@ ;;; ;;; richtext.el -- read and save files in text/richtext format ;;; -;;; $Id: richtext.el,v 1.4 1995/07/15 17:58:36 morioka Exp $ +;;; $Id: richtext.el,v 2.1 1995/07/17 22:59:10 morioka Exp $ ;;; -(require 'tl-misc) +(require 'enriched) -(if (or (< emacs-major-version 19) - (and (= emacs-major-version 19) - (< emacs-minor-version 29)) - ) - (require 'tinyrich) - (require 'enriched) - ) + +;;; @ variables +;;; + +(defconst richtext-initial-annotation + (lambda () + (format "Content-Type: text/richtext\nText-Width: %d\n\n" + (enriched-text-width))) + "What to insert at the start of a text/richtext file. +If this is a string, it is inserted. If it is a list, it should be a lambda +expression, which is evaluated to get the string to insert.") + +(defconst richtext-annotation-regexp + "[ \t\n]*\\(<\\(/\\)?\\([-A-za-z0-9]+\\)>\\)[ \t\n]*" + "Regular expression matching richtext annotations.") + +(defconst richtext-translations + '((face (bold-italic "bold" "italic") + (bold "bold") + (italic "italic") + (underline "underline") + (fixed "fixed") + (excerpt "excerpt") + (default ) + (nil enriched-encode-other-face)) + (invisible (t "comment")) + (left-margin (4 "indent")) + (right-margin (4 "indentright")) + (justification (right "flushright") + (left "flushleft") + (full "flushboth") + (center "center")) + ;; The following are not part of the standard: + (FUNCTION (enriched-decode-foreground "x-color") + (enriched-decode-background "x-bg-color")) + (read-only (t "x-read-only")) + (unknown (nil format-annotate-value)) +; (font-size (2 "bigger") ; unimplemented +; (-2 "smaller")) +) + "List of definitions of text/richtext annotations. +See `format-annotate-region' and `format-deannotate-region' for the definition +of this structure.") -;;; @ text/richtext <-> text/enriched converter +;;; @ encoder ;;; -(defun richtext-to-enriched-region (beg end) - "Convert the region of text/richtext style to text/enriched style." - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (let (b e i) - (while (re-search-forward "[ \t]*" nil t) - (setq b (match-beginning 0)) - (delete-region b - (if (re-search-forward "[ \t]*" nil t) - (match-end 0) - (point-max) - )) - ) - (goto-char (point-min)) - (while (re-search-forward "\n\n+" nil t) - (replace-match "\n") - ) - (goto-char (point-min)) - (while (re-search-forward "[ \t\n]*[ \t\n]*" nil t) - (setq b (match-beginning 0)) - (setq e (match-end 0)) - (setq i 1) - (while (looking-at "[ \t\n]*[ \t\n]*") - (setq e (match-end 0)) - (setq i (1+ i)) - (goto-char e) - ) - (delete-region b e) - (while (>= i 0) - (insert "\n") - (setq i (1- i)) - )) - (goto-char (point-min)) - (while (search-forward "" nil t) - (replace-match "<<") - ) +(defun richtext-encode (from to) + (if enriched-verbose (message "Richtext: encoding document...")) + (save-restriction + (narrow-to-region from to) + (delete-to-left-margin) + (unjustify-region) + (goto-char from) + (format-replace-strings '(("<" . ""))) + (format-insert-annotations + (format-annotate-region from (point-max) richtext-translations + 'enriched-make-annotation enriched-ignore)) + (goto-char from) + (insert (if (stringp enriched-initial-annotation) + richtext-initial-annotation + (funcall richtext-initial-annotation))) + (enriched-map-property-regions 'hard + (lambda (v b e) + (goto-char b) + (if (eolp) + (while (search-forward "\n" nil t) + (replace-match "\n") + ))) + (point) nil) + (if enriched-verbose (message nil)) + ;; Return new end. + (point-max))) + + +;;; @ decoder +;;; + +(defun richtext-next-annotation () + "Find and return next text/richtext annotation. +Return value is \(begin end name positive-p), or nil if none was found." + (catch 'tag + (while (re-search-forward richtext-annotation-regexp nil t) + (let* ((beg0 (match-beginning 0)) + (end0 (match-end 0)) + (beg (match-beginning 1)) + (end (match-end 1)) + (name (downcase (buffer-substring + (match-beginning 3) (match-end 3)))) + (pos (not (match-beginning 2))) + ) + (cond ((equal name "lt") + (delete-region beg end) + (goto-char beg) + (insert "<") + ) + ((equal name "comment") + (if pos + (throw 'tag (list beg0 end name pos)) + (throw 'tag (list beg end0 name pos)) + ) + ) + (t + (throw 'tag (list beg end name pos)) + )) )))) -(defun enriched-to-richtext-region (beg end) - "Convert the region of text/enriched style to text/richtext style." +(defun richtext-decode (from to) + (if enriched-verbose (message "Richtext: decoding document...")) (save-excursion (save-restriction - (goto-char beg) - (and (search-forward "text/enriched") - (replace-match "text/richtext")) - (search-forward "\n\n") - (narrow-to-region (match-end 0) end) - (let (str n) - (goto-char (point-min)) + (narrow-to-region from to) + (goto-char from) + (let ((file-width (enriched-get-file-width)) + (use-hard-newlines t) pc nc) + (enriched-remove-header) + + (goto-char from) (while (re-search-forward "\n\n+" nil t) - (setq str (buffer-substring (match-beginning 0) - (match-end 0))) - (setq n (1- (length str))) - (setq str "") - (while (> n 0) - (setq str (concat str "\n")) - (setq n (1- n)) - ) - (replace-match str) + (replace-match "\n") ) - (goto-char (point-min)) - (while (search-forward "<<" nil t) - (replace-match "") + + ;; Deal with newlines + (goto-char from) + (while (re-search-forward "[ \t\n]*[ \t\n]*" nil t) + (replace-match "\n") + (put-text-property (match-beginning 0) (point) 'hard t) + (put-text-property (match-beginning 0) (point) 'front-sticky nil) ) - )))) + ;; Translate annotations + (format-deannotate-region from (point-max) richtext-translations + 'richtext-next-annotation) -;;; @ encoder and decoder -;;; - -(defun richtext-decode (beg end) - (save-restriction - (narrow-to-region beg end) - (richtext-to-enriched-region beg (point-max)) - (enriched-decode beg (point-max)) - )) - -(defun richtext-encode (beg end) - (save-restriction - (narrow-to-region beg end) - (enriched-encode beg (point-max)) - (enriched-to-richtext-region beg (point-max)) - )) - - -;;; @ setup -;;; - -(set-alist 'format-alist - 'text/richtext - '("Extended MIME text/richtext format." - "Content-[Tt]ype:[ \t]*text/richtext" - richtext-decode richtext-encode t enriched-mode)) + ;; Fill paragraphs + (if (or (and file-width ; possible reasons not to fill: + (= file-width (enriched-text-width))) ; correct wd. + (null enriched-fill-after-visiting) ; never fill + (and (eq 'ask enriched-fill-after-visiting) ; asked & declined + (not (y-or-n-p "Re-fill for current display width? ")))) + ;; Minimally, we have to insert indentation and justification. + (enriched-insert-indentation) + (if enriched-verbose (message "Filling paragraphs...")) + (fill-region (point-min) (point-max)))) + (if enriched-verbose (message nil)) + (point-max)))) ;;; @ end diff --git a/tiny-mime.el b/tiny-mime.el index 0c47945..2998e31 100644 --- a/tiny-mime.el +++ b/tiny-mime.el @@ -19,7 +19,7 @@ ;;; @ version ;;; (defconst mime/RCS-ID - "$Id: tiny-mime.el,v 5.15 1995/07/17 05:26:06 morioka Exp $") + "$Id: tiny-mime.el,v 5.16 1995/07/26 05:54:16 morioka Exp $") (defconst mime/tiny-mime-version (get-version-string mime/RCS-ID)) @@ -800,8 +800,10 @@ (setq end (progn (if (re-search-forward "\n[!-9;-~]+:" nil t) (goto-char (match-beginning 0)) - (end-of-line) - ) + (if (re-search-forward "^$" nil t) + (goto-char (1- (match-beginning 0))) + (end-of-line) + )) (point) )) (setq field (buffer-substring beg end)) diff --git a/tinyrich.el b/tinyrich.el index 2253d64..edf4056 100644 --- a/tinyrich.el +++ b/tinyrich.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tinyrich.el,v 1.1 1995/07/05 16:21:36 morioka Exp $ +;;; $Id: tinyrich.el,v 2.0 1995/07/17 22:31:32 morioka Exp $ ;;; ;;; by MORIOKA Tomohiko ;;; modified by YAMATE Keiichirou @@ -90,4 +90,98 @@ ) )))) + +;;; @ text/richtext <-> text/enriched converter +;;; + +(defun richtext-to-enriched-region (beg end) + "Convert the region of text/richtext style to text/enriched style." + (save-excursion + (save-restriction + (narrow-to-region beg end) + (goto-char (point-min)) + (let (b e i) + (while (re-search-forward "[ \t]*" nil t) + (setq b (match-beginning 0)) + (delete-region b + (if (re-search-forward "[ \t]*" nil t) + (match-end 0) + (point-max) + )) + ) + (goto-char (point-min)) + (while (re-search-forward "\n\n+" nil t) + (replace-match "\n") + ) + (goto-char (point-min)) + (while (re-search-forward "[ \t\n]*[ \t\n]*" nil t) + (setq b (match-beginning 0)) + (setq e (match-end 0)) + (setq i 1) + (while (looking-at "[ \t\n]*[ \t\n]*") + (setq e (match-end 0)) + (setq i (1+ i)) + (goto-char e) + ) + (delete-region b e) + (while (>= i 0) + (insert "\n") + (setq i (1- i)) + )) + (goto-char (point-min)) + (while (search-forward "" nil t) + (replace-match "<<") + ) + )))) + +(defun enriched-to-richtext-region (beg end) + "Convert the region of text/enriched style to text/richtext style." + (save-excursion + (save-restriction + (goto-char beg) + (and (search-forward "text/enriched") + (replace-match "text/richtext")) + (search-forward "\n\n") + (narrow-to-region (match-end 0) end) + (let (str n) + (goto-char (point-min)) + (while (re-search-forward "\n\n+" nil t) + (setq str (buffer-substring (match-beginning 0) + (match-end 0))) + (setq n (1- (length str))) + (setq str "") + (while (> n 0) + (setq str (concat str "\n")) + (setq n (1- n)) + ) + (replace-match str) + ) + (goto-char (point-min)) + (while (search-forward "<<" nil t) + (replace-match "") + ) + )))) + + +;;; @ encoder and decoder +;;; + +(defun richtext-decode (beg end) + (save-restriction + (narrow-to-region beg end) + (richtext-to-enriched-region beg (point-max)) + (enriched-decode beg (point-max)) + )) + +;; (defun richtext-encode (beg end) +;; (save-restriction +;; (narrow-to-region beg end) +;; (enriched-encode beg (point-max)) +;; (enriched-to-richtext-region beg (point-max)) +;; )) + + +;;; @ end +;;; + (provide 'tinyrich) diff --git a/tm-rich.el b/tm-rich.el index d2295cd..bce5ef9 100644 --- a/tm-rich.el +++ b/tm-rich.el @@ -1,11 +1,17 @@ ;;; -;;; $Id: tm-rich.el,v 6.7 1995/07/15 16:45:29 morioka Exp $ +;;; $Id: tm-rich.el,v 6.8 1995/07/17 22:30:36 morioka Exp $ ;;; ;;; by MORIOKA Tomohiko ;;; (require 'tm-view) -(require 'richtext) +(if (or (< emacs-major-version 19) + (and (= emacs-major-version 19) + (< emacs-minor-version 29)) + ) + (require 'tinyrich) + (require 'richtext) + ) ;;; @ content filters for tm-view @@ -22,8 +28,7 @@ (mime-viewer/default-code-convert-region beg (point-max) charset encoding) ) - (richtext-to-enriched-region beg (point-max)) - (enriched-decode beg (point-max)) + (richtext-decode beg (point-max)) )) (defun mime-viewer/filter-text/enriched (ctype params encoding) diff --git a/tm-view.el b/tm-view.el index 59a78ac..bcf886c 100644 --- a/tm-view.el +++ b/tm-view.el @@ -21,7 +21,7 @@ ;;; (defconst mime-viewer/RCS-ID - "$Id: tm-view.el,v 6.67 1995/07/03 07:41:02 morioka Exp $") + "$Id: tm-view.el,v 6.70 1995/07/30 23:18:01 morioka Exp $") (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID)) (defconst mime/viewer-version mime-viewer/version) @@ -155,9 +155,11 @@ (defun mime-viewer/default-content-subject-function (cnum cinfo ctype params subj) - (if (not (member - ctype - mime-viewer/content-subject-omitting-Content-Type-list)) + (if (and (listp cnum) + (not (member + ctype + mime-viewer/content-subject-omitting-Content-Type-list)) + ) (insert (let ((access-type (assoc "access-type" params)) (num (or (assoc-value "x-part-number" params)