From: "Kelly Dean" <kelly@prtime.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org
Subject: Rant - Emacs mail is not user friendly
Date: Sun, 16 Nov 2014 12:18:41 +0000 [thread overview]
Message-ID: <nWtpGiyFKR9k7nE3zeYlerT8rNARjNQg7DewPsssrEs@local> (raw)
In-Reply-To: <871tp4wut1.fsf@uwakimon.sk.tsukuba.ac.jp>
> In particular, mail
> queuing is about as complex as things get. MUAs normally delegate
> queuing to the MTA (that's how I handle disconnected operation on my
> laptop, for example, and that's the *only* reason I run Postfix on my
> laptop), and in that sense feedmail.el is a hack.
It doesn't seem very complex, at least on the user side of things. You might want to consider msmtp instead of Postfix on your laptop.
> I'm sure you have good reason for doing that,
Yes. Emacs on my machine doesn't have Internet access.
> but that is a very unusual use case.
I certainly hope not! The usual case is that a person's instance of Emacs has access to his data (otherwise, Emacs wouldn't be very useful); if my use case is unusual, that means the usual case is that his Emacs has access not only to his data, but also to the Internet. With a program like Emacs serving as a bridge, that means his data isn't his data, but instead belongs to some Russian or Chinese hacker, whoever crosses the bridge first, and the original owner is permitted to retain a copy of the data just due to the hacker's mercifulness, or maybe just as bait so the hacker can get even more data later. The years when normal people weren't targets are long gone.
> Bottom line: I think the task you were trying to accomplish is far
> more complex that you are admitting, and has little to do with "user
> friendliness" of Emacs MUAs.
My previous, manual workflow was:
0. Compose a message in Emacs, note a subject and recipient, and note any files to attach.
1. Log in to webmail, and click ‟compose message”.
2. Copy the message, subject, and recipient from Emacs to the web browser, and attach the noted files.
3. Click ‟send”.
4. Save the message in Emacs to my file of sent messages (in anticipation of the webmail service's betrayal).
That was inconvenient, so I decided a better workflow would be:
0. Compose a message in Emacs in standard format, with Subject and To headers separated from the body by a blank line.
1. Add the From, Date, and Message-ID headers.
2. Save the message to a file foo in an outbox directory.
3. Run ⌜msmtp -t < outbox/foo⌝
4. If #3 succeeds, then run ⌜mv outbox/foo sent/foo⌝
The Emacs mail-sending functionality I wanted was simply automation of steps #1 (plus let me attach files) and #2 of the better workflow, without also doing steps #3 and #4. That's hardly complex, and in fact is simply _omission_ of the last two steps that MUAs ordinarily do (or equivalents thereof). I looked in the Emacs manual, and it said Emacs can do what I wanted, and said to read feedmail.el to learn how. Nowhere did the manual warn ‟Here be dragons”; had I known to avoid feedmail, that would have saved me the day that I wasted on it.
For me, Emacs assists with step #0 except that the ⌜--text follows this line--⌝ is left in, it automates step #1 except that the Message-ID is broken, and it automates step #2 except that it leaves the draft in place after queuing the message.
I eventually figured out that I don't need feedmail at all. The broken Message-ID is just because Emacs (in message.el; not feedmail's fault) rejects my ‟localhost” hostname (the machine has no network connection, so it needs no hostname), and the other things are fixable with just a few lines:
(defun delete-mail-header-separator ()
"Delete `mail-header-separator'. This function copied from top of `message-send-mail-partially' in Emacs's message.el."
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
(replace-match "\n"))
(defcustom message-outbox-directory
(file-name-as-directory (expand-file-name "outbox" message-directory))
:type 'directory)
; mv-rename copied from http://code.activestate.com/recipes/578116-move-files-with-rename-if-required/
(defun queue-message-to-outbox ()
(let ((filename (expand-file-name "out.mail" message-outbox-directory)))
(delete-mail-header-separator)
(write-file filename)
(shell-command (concat "mv-rename " filename " " message-outbox-directory))))
(defun discard-draft ()
(delete-file (buffer-file-name)))
(setq message-send-mail-function 'queue-message-to-outbox)
(add-hook 'message-sent-hook 'discard-draft)
Also I had to add ⌜(pushnew '(utf-8 . 8bit) mm-body-charset-encoding-alist)⌝ to my init file to make Emacs stop mangling the text. (Yes I know, the mangling is intended as a preemptive surrender to the administrators of broken MTAs that used to dominate the Internet, but those seem to have been mostly vanquished now. At least my messages appear to be getting to the mailing list with no problem.)
And Emacs doesn't like it if I open sent/foo that has the ⌜--text follows this line--⌝ deleted and switch to message-mode and try to resend it, so I have to put that back in this case. I don't know what the point of it is, but it's a minor inconvenience and I've already wasted enough time on Emacs email, so I'll live with it.
Last problem that I do care about is that Emacs keeps inserting line breaks after 72 characters, so I have to switch out of message-mode or copy/paste from another buffer to make it stop doing that because I can't find the setting to turn it off. Why is it turned on by default? Modern email readers do have word-wrap, after all. Even Emacs.
next prev parent reply other threads:[~2014-11-16 12:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <emacs-mail-is-unusable-0>
2014-11-15 11:46 ` Rant - Emacs mail is not user friendly Stephen J. Turnbull
2014-11-16 12:18 ` Kelly Dean [this message]
2014-11-16 17:49 ` David Caldwell
2014-11-16 22:52 ` Stephen Berman
2014-11-17 9:48 ` Kelly Dean
2014-11-16 23:22 ` Stephen J. Turnbull
2014-11-17 10:06 ` Kelly Dean
2014-11-17 13:59 ` Ted Zlatanov
2014-11-17 19:54 ` Richard Stallman
2014-11-18 5:30 ` Stephen J. Turnbull
2014-11-21 14:51 ` Richard Stallman
2014-11-21 16:07 ` Stefan Monnier
2014-11-22 5:41 ` Stephen J. Turnbull
2014-11-22 15:51 ` Stefan Monnier
2014-11-22 16:13 ` Stephen J. Turnbull
2014-11-22 11:08 ` Richard Stallman
2014-11-22 15:53 ` Stefan Monnier
2014-11-22 5:40 ` Stephen J. Turnbull
2014-11-22 11:09 ` Richard Stallman
2014-11-21 16:22 ` Emacs dependencies vs. security Ivan Shmakov
2014-12-19 17:22 ` application/x-patch MIME type used by Gnus? (was: Rant - Emacs mail is not user friendly) Reiner Steib
2014-12-19 20:01 ` Stephen J. Turnbull
[not found] <emacs-mail-is-unusable-0@[87.69.4.28]>
2014-11-15 8:27 ` Rant - Emacs mail is not user friendly Eli Zaretskii
[not found] <54670009.027ce00a.0184.ffffdfd3SMTPIN_ADDED_BROKEN@mx.google.com>
2014-11-15 7:54 ` Alexis
2014-11-15 6:54 Kelly Dean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nWtpGiyFKR9k7nE3zeYlerT8rNARjNQg7DewPsssrEs@local \
--to=kelly@prtime.org \
--cc=emacs-devel@gnu.org \
--cc=stephen@xemacs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).