Mew

Mew 2.0 が出ました。 Mew の公式ページ からダウンロードしませう。

あらかじめ旧バージョンのアドレス帳を移行します。

cd ~/.im
mv Addrbook ~/Mail

ソースを展開します。

tar xvzf ..../mew-2.0.tar.gz
cd mew-2.0

中にある Makefile を適当に書き直します。私は

etcdir = $(prefix)/lib/$(EMACS)/etc/Mew
etcdir = $(prefix)/share/$(EMACS)/etc/Mew
にしただけです。

make です。

make
make install
make info
make jinfo
make install-info
make install-jinfo
cp -a contrib/mewinc /usr/local/bin/

Mew は Emacs/Mule 上で動くメールツールです。 作者はIIJ技術研究所の 山本和彦さん です。

Mew が 1.94 になりました(アナウンス)。

Mew Official Homepage から mew-1.94.tar.gzim-130.tar.gz をいただいてきます。

必要があれば GnuPG - The GNU Privacy Guard から gnupg-1.0.0.tar.gz をいただいてきてインストールしておきます (GnuPG の日本語化 のページも参考にしてください)。

tar xvzf gnupg-1.0.0.tar.gz
cd gnupg-1.0.0
./configure
make
make check
make install

im-130.tar.gz をインストールします。

tar xvzf im-130.tar.gz
cd im-130
./configure
make install

imsetup を実行し,質問に答えていきます。

Mew をインストールします。

tar xvzf mew-1.94.tar.gz
cd mew-1.94

Makefile を編集します。次は一例です。

EMACS = mule
ELISPDIR  = $(PREFIX)/share/emacs/site-lisp
ETCDIR = $(PREFIX)/share/emacs/etc/Mew

次のように打ち込みます。

make
make install
make install-info

.emacs にたとえば次のように書き込みます。

(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
(setq mew-mail-domain-list '("matsusaka-u.ac.jp"))
(setq mew-use-overlay-keymap nil)   ; Subject に日本語が入らないなら
(setq mew-use-highlight-header nil) ; 色が嫌いなら
(setq mew-use-highlight-mark nil)   ; 同上
(setq mew-use-highlight-url nil)    ; URLを太字にしないなら
(setq mew-decode-quoted t)          ; Subject: が文字化けするなら

; 本文の先頭に定型文を入れたいなら
(add-hook 'mew-draft-mode-hook
	  (function
	   (lambda ()
	     (let ((p (point)))
	       (goto-char (point-max))
	       (insert-file "~/Mail/head.txt")
	       (goto-char p)))))

; 以下はとりあえず必要ないと思いますが……
(autoload 'mew-user-agent-compose "mew" nil t)
(if (boundp 'mail-user-agent)
    (setq mail-user-agent 'mew-user-agent))
(if (fboundp 'define-mail-user-agent)
    (define-mail-user-agent
      'mew-user-agent
      'mew-user-agent-compose
      'mew-draft-send-letter
      'mew-draft-kill
      'mew-send-hook))

上の設定なら ~/Mail/head.txt に定型文(「奥村@松阪大です」など) を書いておきます。

XEmacs なら次のように書いておくと,起動時に可愛い猫が現れ, ボタンにアイコンが付きます(ディレクトリはシステムによって異なります)。

(setq mew-icon-directory "/usr/lib/xemacs/site-packages/etc/mew")

Mule を起動して M-x mew と打ち込みます。 あとは SPC だけでナビゲートできます。 逆方向のナビゲートは DEL(または C-h)です。 主なコマンドをまとめておきます。

n
next(次メッセージ)
p
previous(前メッセージ)
i
inbox更新(新着メールをサーバから取ってくる)
w
write(メッセージ作成)
a
answer(リプライ)
A
リプライ(引用付き)
f
forward(転送)

メッセージ作成は,To: と Subject: を書いて ---- の下に本文を書きます。 C-c TAB でカーソル位置に ~/.signature が入ります。 C-c C-m で MIME 変換し,C-c C-c で送ります。 ヘッダだけの MIME なら C-c C-m は省略できるようですが, C-c C-m C-c C-c とする癖をつけるのがいいかもしれません。

添付ファイルを付けるには,メッセージを書いているバッファで C-c C-a し,ピリオドの上で c します。 送るには C-c C-m C-c C-c します。

詳しくは info mew してください。

サマリーモードのヘルプです:

Summary mode:

Mew Summary mode:: major mode to visualize messages in a folder.

The keys that are defined for both Summary mode and Virtual mode are:

SPC     Read through messages. That is, display a message, scroll it, 
        and move-then-display another message. 
        See 'mew-summary-show-direction' to set 'up, 'down, 
        'next(current direction) or 'stop. Default is 'down.
DEL     Back-scroll this message. Unnecessary header fields are hidden
        over the window. Type 'DEL' to see them when a message is displayed.
.       If the size of a message exceeds 'mew-file-max-size', MIME
        analysis is skipped then the beginning of the raw message is
        displayed. When you failed to decrypted a cipher message, it
        is cached and is displayed as a broken message.
        In such cases, type '.' to force MIME analysis.
,       Display this message in the raw format(i.e. without MIME analysis). 

RET     Make this message scroll up with one line.
-       Make this message scroll down with one line.

n       Move to below then display. Targets includes parts, messages 
        marked with '*', and non-marked messages. When called with 'C-u',
        parts are skipped.
p       Move to above then display. Targets includes parts, messages 
        marked with '*', and non-marked messages. When called with 'C-u',
        parts are skipped.
j       Jump to a message according to the number which you input.
<       Go to the beginning of this Summary mode.
>       Go to the end of this Summary mode.

i       Get +inbox asynchronously.
s       List this folder asynchronously. 
g       Go to the folder which you input.

w       Write a message. A new draft is prepared in Draft mode.
a       Answer to this message. A new draft is prepared in Draft mode. 
        Mew automatically decides To: and Cc:.
A       Answer to this message. A new draft is prepared in Draft mode. 
        Mew automatically decides To: and Cc: and cites the body.
f       Forward this message to a third person. A new draft is prepared in 
        Draft mode and this message is automatically attached.
F       Forward messages marked with '@' to a third person. A new draft 
        is prepared in Draft mode and this message is automatically 
        attached.

E       Edit this message again to send. Or edit this rfc822 part
        typically included MIME-encapsulated error message.
        In the +draft folder, it just edits the message. Otherwise, 
        copy the message to the +draft folder, then edit.
M-e     Edit an old fashioned error message in which the original message 
        is encapsulated after after strings defined in 
        'mew-summary-edit-again-regex'
        (e.g. "----- Original message follows -----").

*       Put the review the '*' mark on this message. 
        Use 'N' or 'P' to jump to a message marked with '*'.
        It can overlay '@'. The cursor stays always.
        See also 'm o', 'm d', 'm r', and 'm a'.
N       Jump to the message marked with '*' below.
P       Jump to the message marked with '*' above.

@       Put the multi the '@' mark on this message for 'F', 'M-s', 
        'M-t', 'M-b'. It can overlay the '*' mark. 
        The cursor stays always.
M-s     Apply 'unshar' on messages marked with '@'.
M-t     Apply 'uudecode' on messages marked with '@'.
M-b     De-capsulate messages embedded in the messages marked with '@'.
J       Concat Message/Partial fragments marked with '@' to an original
        message.

u       Cancel the mark on this message.
U       Cancel all marks according to what you input.

m r     Put the '*' mark onto Mall messages matched to a regular expression.
m a     Put the '*' mark onto all messages which are not marked.
m *     Change the '@' mark into the '*' mark.
m @     Change the '*' mark into the '@' mark.
m u     Unmark all message marked with 'o' or 'D'.
m s     Swap the '@' mark and the '*' mark.

d       Put the delete mark(default is 'D') on this message.
        This can overlay other marks. When it overlays, the cursor stays
        on the message. If it marks newly, displays the next message.
        To know what kind of action will be taken, see 'mew-msg-rm-policy'.
D       Really remove all messages in the +trash folder.

y       Save any parts. If the target is a message, you are asked which 
        you want to save, the entire message or its body. If the target is
        a non-message part, the part is saved (with line delimiter conversion
        if it is a text object).
v       Toggle 'Summary mode only' and 'Summary & Message mode'. If 
        you choose 'Summary mode only', you can quickly put the delete 
        marks since the next message is not displayed.
M-l     Make the current line to the center of Summary mode.

B       De-capsulate embedded messages in MIME format.
Z       Read Addrbook and update its information. If executed with 'C-u',
        information of folders is also updated in addition to that of
        Addrbook. If 'mew-use-folders-file-p' is 't', the list of
        folders is stored in '~/Mail/.folders'. The default value is 't'.
C       Set the config value for imget.

q       Suspend Mew then switch to another buffer. All buffers of 
        Mew retain, so you can resume with buffer operations.
Q       Quit Mew. All buffers of Mew are erased.
C-c C-q Kill this Summary mode.

C-c C-l Convert to character sets used locally.
C-c C-p  Decrypting/verifying old-fashioned PGP messages.
C-c C-x Display xface.
C-c C-f Fetch the PGP public key whose key ID appears in the X-Mew: field.
C-c C-v Select PGP version.

C-c C-a Adding the value of From: in Message mode to Addrbook.
        When executed with 'C-u, it will add personal information.
        Otherwise, it will add an alias.

C-c C-k Kill a process in Summary mode such as 'imget' and 'imls'.
        Sometime a process accidentally remains in Summary mode. 
        In this situation, you cannot execute 'i', 's', nor 'x'.
        Use this command to solve this problem.

C-c C-s Incremental search forward in Message mode.
C-c C-r Incremental search backward in Message mode.

#       Print this message or this part.
|       Send this message via pipe.

The following commands are provided for Summary mode only, not for
Virtual mode.

o       Put the refile mark(default is 'o') on this message. 
        If already marked with 'o', it prints where this message 
        will be refiled. This can overlay other marks. When it overlays, 
        the cursor stays on the message. If it marks newly, displays 
        the next message. If executed with 'C-u', it displays how
        the refile rules work in Message mode.
!       Put a refile mark on this message according to the previous 
        refile folder.

x       Process marked messages. To cancel the '*' mark, use 'u' or 'U'.
X       Process the current marked messages.

m o     Put the refile mark onto all messages marked with '*'.
        This is very convenient to refile all messages picked by '?'.
m d     Put the delete mark onto all messages marked with '*'.
m S     Sort messages marked with '*'.

/       Pick messages according to a pick pattern which you input, 
        then list them up.
?       Pick messages according to a pick pattern which you input, 
        then put the '*' mark onto them.
V       Go to Virtual mode which gives a single view to picked messages
        from multiple folders. Enter a virtual folder name, 
        comma-separated folders, and pick pattern.

S       Sort messages and list them up again.
O       Pack messages and list them up again.

RANGE means as follows:
        all, update, 
        <num1>-<num2>, <num>:+N, <num>:-N, 
        first:N, prev:N, next:N, last:N

Use 'all' to flush the summary buffer. 'update' means the range
between the last message included in Summary mode + 1 and the real last
message on the folder.

PICK PATTERN is as follews:
- field=string
        Match if the 'field' field contains the 'string' string.
        If you specify 'head', 'body' or 'all' as 'field', it means
        the entire header, the body, and the entire message, respectively.
- <pattern1> & <pattern2>
        Match if <pattern1> AND <pattern2>.
- <pattern1> | <pattern2>
        Match if <pattern1> OR <pattern2>.
- ! <pattern>
        Match if not <pattern>.
- ( <pattern> )
        Evaluate <pattern> first.

X-Face の付け方

XEmacs 上のメーラでは From: の後に小さな48×48ドットのモノクロの絵を入れることができます。

xpaint -size 48x48 して白黒で絵を描き,XBM 形式で保存します。 ファイル名は適当でかまいません(たとえば foo.xbm)。 これを xbm2xface.pl foo.xbm すると,標準出力に変な文字列が出力されます。 これを ~/.emacs にたとえば次のように入れておきます。 文字列中の "\\ でエスケープしておきます。 次の例では PGP のフィンガープリントやパブリックキーもヘッダに入れています。 (setq mew-header-alist '(("X-fingerprint:" . "FF 65 ED 7A F6 9C 6E 5F 24 76 0E 34 67 15 08 08 2C 06 49 C1") ("X-PGP-Pubkey:" . "http://www.matsusaka-u.ac.jp/~okumura/okumura.asc") ("X-Face:" . "#nDg$|2/|R#6Z4sG>\\lLq^WU$(ju{tS@0/M\"xreoR^E/$,|=>EFu_lQ:\\(l8#n,,|/`i\\3; Dl8\\I]4\\|kbbp-w+$KG36mi<$ZQ!qW7a?jfP}/^=AT2mu")))

さらに詳しいことは家永数行さんの X-Face のページが参考になります。


リンクはご自由にどうぞ。

松阪大学 奥村晴彦 okumura@matsusaka-u.ac.jp

Last modified: Thu Jul 26 18:52:22 JST 2001