[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] EMacs for mail - nearly there!!!
>>>>> "Jose" == Dans <us-ascii> writes:
Jose> One thing that I couldn't suss out with suss out with
Jose> no mailer (and this includes VM, which I use every now and
Jose> then) is how to have "clever From:-ness". That is, I might
Jose> want to use address1 [at] ad1.com for messages to sheflug, and
Jose> address2 [at] ad15.com for messages to somewhere else. And use my
Jose> present address as a default. Is this possible under VM or
Jose> mutt?
Well, it could take some effort under Emacs/VM. What you would do, I
guess, is set the default in user-mail-address. Then something like
(defvar clever-from-ness-alist '("sheflug" . "jose [at] sheflug")
"Alist of (REGEXP . CLEVER-FROM) pairs.")
(defun clever-from-ness ()
"If a REGEXP from `clever-from-ness-alist' matches the headers, use
the corresponding CLEVER-FROM in the From: header.
First regexp to match wins. This is not very clever, but I don't see
an obvious way for it to lose."
(save-excursion
(goto-char (point-min))
(search-forward mail-header-separator nil 'go-and-win)
(beginning-of-line)
(narrow-to-region (point-min) (point))
(let ((list clever-from-ness-alist) pair)
(while list
(setq pair (car list))
(goto-char (point-min))
(when (re-search-forward (car pair) nil t)
(goto-char (point-min))
(search-forward "From: ")
(kill-line)
(insert (cdr pair))
(setq list nil))))
(widen)))
The above function can probably be done in a couple of lines if you're
familiar with VM internals. I'm not, very. So I'm doing it "by hand."
(add-hook 'vm-mail-send-hook #'clever-from-ness)
Jose> Also, what is the optimal way of retrieving mail and
Jose> having it separated? I quite like procmail (doing a fine job
Jose> at the moment), but I
This is what I use.
Jose> read that vm can query my POP accounts and filter mail as
Jose> well
VM's filtering mechanism is orthogonal to procmail. Procmail puts
things into separate mailboxes. VM's virtual folders organizes a
single folder from others based on some properties, but does not
actually create a folder. VM's properties are probably somewhat
smarter than procmail's in some ways, but I wouldn't bet a lot on that.
Jose> can VM present me with the main folder
Jose> (/var/spool/<username>) with new messages, and then
Jose> automatically go (with a single keypress :D) to the next
Jose> folder with unread mail?
Probably not. I use multiple frames. Of course, you can "easily"
write such a function and bind it to a key.
Gnus may be more to your liking, then.
Jose> I just don't know how to phrase these things for
Jose> xemacs to understand me...
C-h i m "vm" RET
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.