3 #### convenience functions for various repl(1) commands
5 #### They're functions instead of aliases for portability. This file
6 #### is intended to be sourced from a Bourne-compatible shell, e.g.,
7 #### source `mhparam docdir`/contrib/replaliases
8 #### to declare the functions.
10 #### Author: David Levine <levinedl@acm.org>
12 #### If using par (see mhn.defaults), it helps to have its PARINIT
13 #### environment variable set. If you really want it to be null,
14 #### either comment this out or set it to, e.g., ' '.
15 #### Removed "R" from PARINIT recommendation in par(1) man page so
16 #### that it doesn't consider words that are too long to be an error.
17 if [ -z "$PARINIT" ]; then
18 PARINIT='rTbgq B=.,?_A_a Q=_s>|'
22 #### Reply, including text/html (converted to text/plain) and
23 #### text/plain parts.
25 #### Optional arguments:
26 #### -h to disable conversion of text/html parts
27 #### -p to disable conversion of text/plain parts
28 #### All other arguments are passed to repl.
29 #### The -p argument can be useful with improperly structured
30 #### messages, such as those that use multipart/related when they
31 #### should have used multipart/alternative.
33 if [ "$1" = -h ]; then
35 \repl -filter mhl.replywithoutbody -convertargs text/plain '' "$@"
36 elif [ "$1" = -p ]; then
38 \repl -filter mhl.replywithoutbody -convertargs text/html '' "$@"
40 \repl -filter mhl.replywithoutbody \
41 -convertargs text/html '' -convertargs text/plain '' "$@"
46 #### Add -editor mhbuild to above. Useful only when attachments
47 #### won't be added to the message.
49 #### To ease editing at the What now? prompt, add a line like this to
50 #### your .mh_profile:
51 #### mhbuild-next: $EDITOR
52 #### assuming that your EDTIOR environment variable is set; if not,
53 #### replace $EDITOR above with the name of your editor. Without that
54 #### profile entry, enter "e[dit] $EDITOR" at the What now? prompt.
56 rt -editor mhbuild "$@"
60 #### accept a calendar request
62 \repl -noformat -editor mhbuild \
63 -convertargs text/calendar '-reply accept -contenttype' "$@"
66 #### decline a calendar request
68 \repl -noformat -editor mhbuild \
69 -convertargs text/calendar '-reply decline -contenttype' "$@"
72 #### reply as tentative to a calendar request
74 \repl -noformat -editor mhbuild \
75 -convertargs text/calendar '-reply tentative -contenttype' "$@"
78 #### cancel a calendar request
80 \repl -noformat -editor mhbuild \
81 -convertargs text/calendar '-cancel -contenttype' "$@"