annotate README @ 0:cdc3d19f5ba5 default tip

Initial revision
author Guido Berhoerster <guido+slrn@berhoerster.name>
date Sat, 21 May 2016 11:12:14 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
1 slrn MIME Support Macro
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
2 =======================
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
3
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
4 The slrn MIME support macro adds comprehensive support for displaying and
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
5 processing MIME messages to slrn. When opening a MIME message with parts other
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
6 than plain text or non-MIME messages with a content type other than plain text
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
7 the macro automatically converts these parts to plain text provided that the
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
8 conversion has been allowed in the configuration there is an appropriate entry
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
9 in the mailcap file. Parts with multipart/alternative content type are handled
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
10 intelligently by preferring the text part if available and falling back to
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
11 converting another part for which automatic conversion has been enabled. The
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
12 macro can process arbitrarily nested parts with message/rfc822,
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
13 multipart/alternative, multipart/mixed, multipart/digest, multipart/related,
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
14 and multipart/signed content type. It also features full support for mailcap
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
15 files as defined by RFC 1524, including substitutions. Furthermore, it
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
16 provides methods for selecting any MIME part for saving or viewing with an
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
17 external viewer and for toggling between the processed and raw message.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
18
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
19 Usage
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
20 -----
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
21
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
22 The slrn MIME support macro can be used by including it in the .slrnrc user
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
23 initialization file via the `interpret` command, e.g. provided that the file
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
24 mime-support.sl is located in one of the directories specified by the
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
25 macro_directory configuration variable:
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
26
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
27 interpret "mime-support.sl"
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
28
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
29 The macro can be configured through the following slang variables:
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
30
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
31 MIMESupport->config.auto_view
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
32 : Array that specifies which content types may be automatically converted to
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
33 plain text when opening a MIME message.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
34
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
35 It provides the following methods:
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
36
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
37 MIMESupport->mime_save_part()
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
38 : Displays a dialog allowing the user to save a MIME part.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
39
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
40 MIMESupport->mime_view_part()
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
41 : Displays a dialog allowing the user to view a MIME part using the command
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
42 specified in the mailcap entry corresponding to its content type.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
43
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
44 MIMESupport->mime_toggle_view()
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
45 : Toggles between the processed and raw form.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
46
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
47 The following environment variables are observed:
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
48
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
49 TMPDIR
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
50 : Path for temorary files when invoking the command specified in a mailcap
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
51 entry.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
52
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
53 PAGER
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
54 : The pager used for handling the output of a command specified in a mailcap
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
55 entry which contains a copiousoutput flag.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
56
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
57 Contact
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
58 -------
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
59
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
60 Please send any feedback, translations or bug reports via email to
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
61 <guido+slrn@berhoerster.name>.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
62
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
63 Bug Reports
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
64 -----------
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
65
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
66 When sending bug reports, please always mention the exact version of the
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
67 macro with which the issue occurs as well as the version of slrn, slang and
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
68 the operating system you are using and make sure that you provide sufficient
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
69 information to reproduce the issue and include any input, output, any error
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
70 messages and slang stack traces.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
71
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
72 License
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
73 -------
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
74
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
75 Except otherwise noted, all files are Copyright (C) 2013 Guido Berhoerster and
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
76 distributed under the following license terms:
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
77
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
78 Copyright (C) 2013 Guido Berhoerster <guido+slrn@berhoerster.name>
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
79
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
80 This file incorporates work from the file mime.sl distributed with slrn under
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
81 the terms of the GNU General Public Licens version 2 or later.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
82
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
83 Copyright (C) 2012 John E. Davis <jed@jedsoft.org>
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
84
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
85 This program is free software; you can redistribute it and/or
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
86 modify it under the terms of the GNU General Public License
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
87 as published by the Free Software Foundation; either version 2
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
88 of the License, or (at your option) any later version.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
89
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
90 This program is distributed in the hope that it will be useful,
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
91 but WITHOUT ANY WARRANTY; without even the implied warranty of
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
92 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
93 GNU General Public License for more details.
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
94
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
95 You should have received a copy of the GNU General Public License
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
96 along with this program; if not, write to the Free Software
cdc3d19f5ba5 Initial revision
Guido Berhoerster <guido+slrn@berhoerster.name>
parents:
diff changeset
97 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.