16 Apr 05:40
Re: Hello
From: Bill Wohler <wohler <at> newt.com>
Subject: Re: Hello
Newsgroups: gmane.mail.mh-e.user
Date: 2008-04-16 03:40:49 GMT
Subject: Re: Hello
Newsgroups: gmane.mail.mh-e.user
Date: 2008-04-16 03:40:49 GMT
Xavier Maillard <xma <at> gnu.org> wrote: > Just a quick message to say hello. I am back at using MH(-E) on > my laptop. Welcome back, Xavier! > I am currently reading (again) all I can concerning MH(-E) to be > able to use effectively as quick as possible. I hope the online help and manual are helping! http://mh-e.sourceforge.net/manual/ > 1. How does one choose to customise MH or MH-E -i.e. tweak the > "unix" system part instead of emacs part (and the contrary) ? One of the design goals of MH-E is to use MH as much as possible, so your goal is a good one. To tweak MH-E, please see the manual. And the code! To tweak MH, please see the book, now online: http://rand-mh.sourceforge.net/book/ > 2. How can I tell emacs that my mh_profile is not ~/.mh_profile > but something along $MH env variable ? MH-E should honor the MH environment variable. > 3. How can I answer a message *directly* from a digest message > -i.e. without having to burst it first ? Bursting is the way to go. http://mh-e.sourceforge.net/manual/mh-e.html#Digests > 4. (Last for this round). Can MH gurus share their tips and setup > so I can learn quickly ? What do you tweak first when > (re)installing your MH system ? Why ? In fact, I would be > interested in reading how _you_ use MH daily. Too much. Note that with versions 7 and 8, we moved a lot of our .emacs code into MH-E proper, so our customization is pretty slim. OK, maybe it's not *that* slim
. My nmh installation is stock Debian. My .mh_profile is appended. I've also appended the relevant bits from my .emacs customization. > I have tons of other questions but I will try to figure out by > myself first. > > Sorry to bother. Not a problem, but do see if your questions are answered in the manual. If you think your question should have been answered by the manual, I'd be obliged if you submitted a bug or feature request as appropriate. Choose the "Documentation" category. Include the answers from posting to this list
. (custom-set-variables '(debian-bug-always-CC-myself nil) '(debian-bug-menu-action-default (quote email)) '(debian-bug-menu-preload-flag t) '(mail-header-separator "--------") '(mail-user-agent (quote mh-e-user-agent)) '(mh-alias-insertion-location (quote top)) '(mh-auto-fields-list (quote (("mh-e-users" (("Mail-Followup-To" . "mh-e-users <at> lists.sourceforge.net"))) ("mh-e-devel" (("Mail-Followup-To" . "mh-e-devel <at> lists.sourceforge.net"))) ("emacs-devel" (("Mail-Followup-To" . "emacs-devel <at> gnu.org"))) ("emacs-pretest-bug" (("Mail-Followup-To" . "emacs-pretest-bug <at> gnu.org"))) ("voyager" (("Mail-Followup-To" . "voyager <at> newt.com"))) ("babble" (("Mail-Followup-To" . "babble <at> newt.com")))))) '(mh-before-quit-hook (quote (bw-mh-before-quit-hook))) '(mh-before-send-letter-hook (quote (ispell-message))) '(mh-compose-skipped-header-fields (quote ("From" "Organization" "References" "In-Reply-To" "X-Face" "Face" "X-Image-URL" "X-Mailer" "Reply-To"))) '(mh-compose-space-does-completion-flag t) '(mh-default-folder-must-exist-flag nil) '(mh-default-folder-prefix "a/") '(mh-delete-yanked-msg-window-flag t) '(mh-display-buttons-for-alternatives-flag t) '(mh-do-not-confirm-flag t) '(mh-fetch-x-image-url (quote ask)) '(mh-folder-mode-hook (append (if (fboundp (quote mc-install-read-mode)) (quote (mc-install-read-mode)) (quote nil)) (quote (bw-mh-folder-mode-hook)))) '(mh-identity-default "Home") '(mh-identity-list (quote (("Home" (("Organization" . "Newt Software") (":signature") ("Fcc" . "+outbox"))) ("Work" (("From" . "Bill Wohler <Bill.Wohler <at> nasa.gov>") ("Organization" . "Orbital") (":signature" . "~/.signature.nasa") ("Fcc:" . "+outbox")))))) '(mh-index-new-messages-folders (quote ("lists"))) '(mh-index-ticked-messages-folders (quote ("a" "lists"))) '(mh-invisible-header-fields (quote ("Sender:" "DomainKey-Signature" "X-Image-URL:" "X-Proofpoint" "X-YMail-OSG:" "X-Oracle-Calendar:" "DKIM-Signature:" "X-IRONPORT:"))) '(mh-invisible-header-fields-default (quote ("X-Bogosity:"))) '(mh-junk-background 0) '(mh-junk-disposition "+spam/corpus") '(mh-large-folder 60) '(mh-letter-mode-hook (append (if (fboundp (quote mc-install-write-mode)) (quote (mc-install-write-mode)) (quote nil)) (quote (bw-mh-letter-mode-hook)))) '(mh-lpr-command-format "mpage -h'%s' -P") '(mh-mime-save-parts-default-directory "/tmp/") '(mh-new-messages-folders (quote ("lists"))) '(mh-quit-hook (quote (bw-mh-quit-hook))) '(mh-recenter-summary-flag t) '(mh-recursive-folders-flag t) '(mh-reply-default-reply-to "all") '(mh-show-maximum-size 1000000) '(mh-show-mode-hook (quote (bw-mh-show-mode-hook))) '(mh-show-threads-flag t) '(mh-ticked-messages-folders (quote ("a" "lists"))) '(mh-yank-behavior (quote autoattrib)) '(mm-inline-large-images t) '(mm-text-html-renderer (quote w3m)) '(read-mail-command (quote mh-rmail)) '(sentence-end-double-space nil))
;;; bw-mh-e.el --- MH-E customizations
;;; Commentary:
;;; History:
;; $Id: bw-mh-e.el 8872 2008-03-25 05:05:49Z wohler $
;;; Code:
(require 'mh-cus-load nil t)
(require 'mh-autoloads nil t)
;;; Variables
(setq mh-picon-directory-list
'("~/.picons" "/usr/lib/picon/"
"/usr/lib/picon/users" "/usr/lib/picon/usenix" "/usr/lib/picon/news"
"/usr/lib/picon/domains" "/usr/lib/picon/misc"))
;;; Hooks
(defun bw-mh-folder-mode-hook ()
"Hook to set key bindings in MH-Folder mode."
(make-local-variable 'transient-mark-mode)
(transient-mark-mode t)
(local-set-key "//" 'bw-search-msg)
(local-set-key "\C-ck" 'bw-fix-kens-mail)
(local-set-key "\C-cm" 'bw-compose-mail-with-template)
(local-set-key "\C-cr" 'bw-reply-with-template))
(defun bw-mh-show-mode-hook ()
"Hook to turn on variable `transient-mark-mode' in `mh-show-mode'.
This highlights the selected region."
(make-local-variable 'transient-mark-mode)
(transient-mark-mode t))
(defun bw-mh-letter-mode-hook ()
"Hook to prepare letter for editing."
(save-excursion
(save-restriction
;; Strip spaces that MH has added, especially on Subject and References
;; header fields. Breaks newsreaders.
(goto-char (point-min))
(search-forward-regexp "\\(^--------$\\|^$\\)")
(narrow-to-region (point-min) (point))
(goto-char (point-min))
(while (search-forward-regexp " $" nil t)
(replace-match "" nil t))))
(cond
;; Just modifying a message, perhaps.
((not (boundp 'mh-comp-formfile)))
;; Insert status report information, and ready point after pseudo-header.
((equal mh-comp-formfile (concat mh-user-path "comps/status"))
(call-interactively 'bw-insert-status-report)
(goto-char (point-min))
(search-forward-regexp "^$")
(forward-char 1))))
(defvar bw-mh-folder-buffer-to-delete nil
"Folder buffer that is being quit.")
(defun bw-mh-before-quit-hook ()
"Save folder buffer that is to be deleted."
(setq bw-mh-folder-buffer-to-delete (current-buffer)))
(defun bw-mh-quit-hook ()
"Kill folder buffer rather than just bury it."
(with-current-buffer bw-mh-folder-buffer-to-delete
(if (get-buffer mh-show-buffer)
(kill-buffer mh-show-buffer))
(mh-execute-commands)
(message nil) ; clear message from previous command
(kill-buffer nil)))
;;; General functions
(defun bw-fix-kens-mail ()
"Fix Ken's mail formatting."
(interactive)
(let (start end)
(mh-modify (mh-get-msg-num t))
;; Fix header of first body part.
(search-forward-regexp "^content-type:.*name=.*noname.txt")
(end-of-line)
(setq end (point))
(beginning-of-line)
(delete-region (point) end)
(insert "Content-Type: application/pgp-encrypted")
;; Remove base64 encoding.
(goto-char (point-min))
(while (search-forward-regexp "content-transfer-encoding:.*base64" nil t)
(end-of-line)
(setq end (1+ (point))) ;include eol
(beginning-of-line)
(delete-region (point) end)
(search-forward-regexp "^$")
(while (looking-at "^$")
(forward-char 1))
(setq start (point))
(search-forward-regexp "^\\($\\|--\\)")
(setq end (point))
(base64-decode-region start end)
;; And remove ^M's!
(goto-char start)
(while (search-forward-regexp "\\(\r\\)" end t)
(delete-region (match-beginning 0) (match-end 0))))
;; Remove existing header for encrypted message part as the real header is
;; embedded in the encrypted part.
(search-backward-regexp "^-----BEGIN PGP MESSAGE-----$")
(setq end (point))
(search-backward-regexp "^--")
(forward-line 1)
(delete-region (point) end))
(save-buffer)
(kill-buffer nil)
(mc-decrypt))
(defun bw-search-msg ()
"Search for a regexp in the current message."
(interactive) ; user function
(save-window-excursion
(other-window 1) ; go to next window
(isearch-forward-regexp))) ; string search; hit return when done
;; Send and reply using different templates.
(defun bw-reply-with-template (form)
"Reply with the alternate template FORM."
(interactive (list (read-file-name
"Form: "
(concat mh-user-path "comps/") nil t)))
(let* ((mh-repl-formfile (expand-file-name form))
(mh-repl-group-formfile mh-repl-formfile))
(call-interactively 'mh-reply)))
(defun bw-compose-mail-with-template (form)
"Compose and send a letter with alternate template FORM."
(interactive (list (read-file-name
"Form: "
(concat mh-user-path "comps/") nil t)))
(let ((mh-comp-formfile (expand-file-name form)))
(call-interactively 'mh-send)))
(provide 'bw-mh-e)
;;; bw-mh-e.el ends here
-- -- Bill Wohler <wohler <at> newt.com> http://www.newt.com/wohler/ GnuPG ID:610BD9AD
------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________ mh-e-users mailing list mh-e-users <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mh-e-users
.
Note that with versions 7 and 8, we moved a lot of our .emacs code into
MH-E proper, so our customization is pretty slim. OK, maybe it's not
*that* slim
RSS Feed