head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2006.05.29.14.31.25; author jpeek; state Exp; branches; next 1.3; 1.3 date 2006.05.28.04.27.15; author jpeek; state Exp; branches; next 1.2; 1.2 date 2006.05.26.23.59.01; author jpeek; state Exp; branches; next 1.1; 1.1 date 2006.05.26.22.12.09; author jpeek; state Exp; branches; next ; desc @mh-e_59.html page from mh-e section of "MH & nmh: Email for Users & Programmers" @ 1.4 log @Removed 'html/' from end of http://mh-e.sourceforge.net/manual/html/ URLs @ text @ BOOK MOVED: mh-e - Customizing Editing MIME

BOOK MOVED: mh-e - Customizing Editing MIME

This section of MH & nmh: Email for Users & Programmers is now the MH-E Manual. It's moved to http://mh-e.sourceforge.net/manual/.

If you aren't taken to the new site in 15 seconds, please click on the link above.

You may also want to visit:


Last change $Date: 2006/05/28 04:27:15 $
Suggestions are welcome: Bill Wohler <wohler@@newt.com>
@ 1.3 log @removed 'Tour-Through-MH_002dE.html' from end of http://mh-e.sourceforge.net/manual/html/ @ text @d4 1 a4 1 content="15;URL=http://mh-e.sourceforge.net/manual/html/"> d15 2 a16 2 href="http://mh-e.sourceforge.net/manual/html/"> http://mh-e.sourceforge.net/manual/html/. d39 1 a39 1 Last change $Date: 2006/05/26 23:59:01 $ @ 1.2 log @Replaced with page pointing people to new MH-E Manual @ text @d4 1 a4 1 content="15;URL=http://mh-e.sourceforge.net/manual/html/Tour-Through-MH_002dE.html"> d15 2 a16 2 href="http://mh-e.sourceforge.net/manual/html/Tour-Through-MH_002dE.html"> http://mh-e.sourceforge.net/manual/html/Tour-Through-MH_002dE.html. d39 1 a39 1 Last change $Date: 2006/05/26 22:12:05 $ @ 1.1 log @Original version from Feb 19 2001 @ text @d3 2 d7 39 a45 84 mh-e - Customizing Editing MIME Go to the first, previous, next, last section, table of contents.


Editing Multimedia Messages

The variable mh-mime-content-types contains a list of the currently valid content types. They are listed in the table in section Editing a Draft. If you encounter a new content type, you can add it like this:

(setq mh-mime-content-types (append mh-mime-content-types
                                    '(("new/type"))))

Emacs macros can be used to insert enriched text directives like `<bold>'. The following code will make, for example, C-c t b insert the `<bold>' directive.

Emacs macros for entering enriched text

(defvar enriched-text-types '(("b" . "bold") ("i" . "italic") ("f" . "fixed")
                              ("s" . "smaller") ("B" . "bigger")
                              ("u" . "underline") ("c" . "center"))
  "Alist of (final-character . directive) choices for add-enriched-text.
Additional types can be found in RFC 1563.")

(defun add-enriched-text (begin end)
  "Add enriched text directives around region.
The directive used comes from the list enriched-text-types and is
specified by the last keystroke of the command.  When called from Lisp,
arguments are BEGIN and END."
  (interactive "r")
  ;; Set type to the directive indicated by the last keystroke.
  (let ((type (cdr (assoc (char-to-string (logior last-input-char ?`))
                          enriched-text-types))))
    (save-restriction              ; restores state from narrow-to-region
      (narrow-to-region begin end) ; narrow view to region
      (goto-char (point-min))      ; move to beginning of text
      (insert "<" type ">")        ; insert beginning directive
      (goto-char (point-max))      ; move to end of text
      (insert "</" type ">"))))    ; insert terminating directive

To use the function add-enriched-text, first create keybindings for it (see section Sending Mail). Then, set the mark with C-@@ or C-SPC, type in the text to be highlighted, and type C-c t b. This adds `<bold>' where you set the mark and adds `</bold>' at the location of your cursor, giving you something like: `You should be <bold>very</bold>'. You may also be interested in investigating sgml-mode.


Go to the first, previous, next, last section, table of contents. @