From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kelly Dean Newsgroups: gmane.emacs.devel Subject: Rant - Emacs mail is not user friendly Date: Sat, 15 Nov 2014 06:54:07 +0000 Message-ID: <26260.0600407042$1416036364@news.gmane.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1416036364 9336 80.91.229.3 (15 Nov 2014 07:26:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Nov 2014 07:26:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 15 08:25:57 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XpXk4-0001vw-JK for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 08:25:56 +0100 Original-Received: from localhost ([::1]:39325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXk4-00046l-5s for ged-emacs-devel@m.gmane.org; Sat, 15 Nov 2014 02:25:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXQP-0001qP-4i for emacs-devel@gnu.org; Sat, 15 Nov 2014 02:05:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XpXQE-0008T5-TN for emacs-devel@gnu.org; Sat, 15 Nov 2014 02:05:37 -0500 Original-Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:52243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XpXQE-0008SY-KY for emacs-devel@gnu.org; Sat, 15 Nov 2014 02:05:26 -0500 Original-Received: from mfilter22-d.gandi.net (mfilter22-d.gandi.net [217.70.178.150]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 8C28B172070 for ; Sat, 15 Nov 2014 08:05:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter22-d.gandi.net Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter22-d.gandi.net (mfilter22-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id pXAGgSeG7lp8 for ; Sat, 15 Nov 2014 08:05:19 +0100 (CET) X-Originating-IP: 73.169.42.166 Original-Received: from localhost (c-73-169-42-166.hsd1.co.comcast.net [73.169.42.166]) (Authenticated sender: kelly@prtime.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3A53E17209C for ; Sat, 15 Nov 2014 08:05:16 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4b98:c:538::196 X-Mailman-Approved-At: Sat, 15 Nov 2014 02:25:29 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177139 Archived-At: Yesterday I decided to try using Emacs for email. For sending messages to= my mail server, I'll use a separate program, so I need Emacs just for co= mposing messages, inserting headers including autogenerated Date and Mess= age-ID headers, encoding file attachments, and moving completed messages = from my drafts folder to my outbound queue. Section 32.4.1 (Mail Sending)= of the manual says to read feedmail.el to learn how to do this. feedmail.el says: ;; After a long list of options below, you will find the function ;; feedmail-send-it. Hers's the best way to use the stuff in this ;; file: ;; ;; Save this file as feedmail.el somewhere on your elisp loadpath; ;; byte-compile it. Put the following lines in your init file: ;; ;; (setq send-mail-function 'feedmail-send-it) ;; (autoload 'feedmail-send-it "feedmail") ;; ;; If you plan to use the queue stuff, also use this: ;; ;; (setq feedmail-enable-queue t) ;; (autoload 'feedmail-run-the-queue "feedmail") ;; (autoload 'feedmail-run-the-queue-no-prompts "feedmail") ;; (setq auto-mode-alist (cons '("\\.fqm$" . mail-mode) auto-mode-ali= st)) ;; ;; though VM users might find it more comfortable to use this instead of ;; the above example's last line: ;; ;; (setq auto-mode-alist (cons '("\\.fqm$" . feedmail-vm-mail-mode) a= uto-mode-alist)) Um, ok. Done. Though it's already in Emacs's loadpath by default, and alr= eady byte-compiled, so I skipped that part. I don't know what a VM is in = this context, or why the alternative setting might be more comfortable, s= o I'm ignoring that part and just hoping it won't be a problem. I searche= d for =E2=8C=9Cfeedmail-vm-mail-mode=E2=8C=9D and found: =E2=8C=9CIf you are a VM user, you might like feedmail-vm-mail-mode, thou= gh you really don't need that (and it's not particularly well-tested).=E2=8C=9D Next: ;; If you are using the desktop.el library to restore your sessions, you = might ;; like to add the suffix ".fqm" to the list of non-saved things via the = variable ;; desktop-files-not-to-save. I found =E2=8C=9CFQM stands for feedmail queued message=E2=8C=9D, so why = wouldn't I want those to be saved? No explanation. Skipping this part. Next: ;; If you are using message-mode to compose and send mail, feedmail will ;; probably work fine with that (someone else tested it and told me it wo= rked). ;; Follow the directions above, but make these adjustments instead: ;; ;; (setq message-send-mail-function 'feedmail-send-it) ;; (add-hook 'message-mail-send-hook 'feedmail-mail-send-hook-splitte= r) Am I using message-mode? Section 32 (Sending Mail, as opposed to Mail Sen= ding in section 32.4.1) of the manual says =E2=8C=9CTo send an email mess= age from Emacs, type C-x m=E2=8C=9D. That runs compose-mail, which create= s a buffer in message-mode, so apparently I am. Ok, adjustments made. Except there doesn't appear to be a message-mail-send-hook, so I omitted = that part. The docstring for =E2=8C=9Cfeedmail-mail-send-hook-splitter=E2= =8C=9D says =E2=8C=9CFacilitate dividing `mail-send-hook' things into que= ued and immediate cases=E2=8C=9D, which isn't a feature I need since I'll= only be queuing (no immediate sending), so I guess it won't be a problem= that there's no hook to put it on. Next: ;; If you use message-mode and you make use of feedmail's queueing ;; stuff, you might also like to adjust these variables to appropriate ;; values for message-mode: ;; ;; feedmail-queue-runner-mode-setter ;; feedmail-queue-runner-message-sender The docstring for the first var says =E2=8C=9CA function to set the prope= r mode of a message file=E2=8C=9D. It also says =E2=8C=9CMost people want= `mail-mode'=E2=8C=9D, and that's the default, so I guess I don't want to= adjust it. Similarly for the second var. Ok, C-x m, write a test message, C-x C-s, C-c C-s RET C-x k RET. It adds = the appropriate headers, and in ~/mail/q/ I get a fqm file, yay. Except, = it still has the =E2=8C=9C--text follows this line--=E2=8C=9D from the dr= aft, so it isn't ready for sending. Why? Dunno. And the draft is still in ~/Mail/drafts (capitalized =E2=8C=9CMail=E2=8C=9D= , not lowercase =E2=8C=9Cmail=E2=8C=9D like for the queue, for no apparen= t reason), which is illogical, since the message has already been complet= ed and queued for sending, and leaving a copy in drafts will just confuse= me later about which messages have or haven't already been sent. To deci= de whether I want to move the draft message to ~/mail/sent or delete the = draft message and copy the queued message to ~/mail/sent, I re-open the d= raft to compare it to the queued version. I notice the draft isn't in mes= sage-mode anymore. What if I wanted to re-send it (assuming it should sti= ll be in drafts in the first place)? Ok, M-x message-mode. C-c C-s RET C-= x k RET, and it queues another. Then I notice: re-open the draft, M-x message-mode, C-c C-s RET, but don'= t kill the buffer this time. C-c C-s RET again, and this time it asks for= confirmation to resend, which makes sense because from Emacs's point of = view, the message was already sent, but why didn't it ask for confirmatio= n for the previous resend? Why did it forget that the message was already= sent? I discover that I don't even have to kill the buffer to make it fo= rget; I can just do M-x message-mode again. A mail program that can't rem= ember whether it has already sent a message is demented. I didn't even mo= dify the default locations for saving messages; it simply failed to save = that flag anywhere or to record it implicitly e.g. by moving sent message= s to ~/mail/sent. I've already queued enough copies of this test message, so this time I an= swer =E2=80=9Fno=E2=80=9D to the =E2=80=9Fresend=E2=80=9D question. It du= mps me into the debugger (I have debug-on-error set to t to try to help d= ebug all the Emacs bugs that keep biting me) because it's using error in = a place where in modern Emacs it should now be using user-error, so now I= have to add yet another patch to my growing pile of private fixes (inclu= ding for actual bugs, not just user-error updates) that I've been asked n= ot to submit for Emacs because saying my work is in the public domain isn= 't good enough, even though it apparently was good enough for the author = of feedmail (see the statement =E2=8C=9CThis code is hereby released into= the public domain=E2=8C=9D in feedmail.el--which I never would have both= ered to read in the first place if feedmail's documentation were in the m= anual). The Message-ID header always includes =E2=8C=9Ci-did-not-set--mail-host-a= ddress--so-tickle-me=E2=8C=9D, so I do (setq mail-host-address "localhost") and try again. No luck, so let's try something else. I find the feedmail-= message-id-generator option, which says this: =E2=8C=9CSpecifies the creation of a Message-Id: header field. If nil, nothing is done about Message-Id:. If t, a Message-Id: header of a predetermined format is produced, but only if there is not already a Message-Id: in the message. A value of t is equivalent to using the function feedmail-default-message-id-generat= or. If neither nil nor t, it may be a string, a fiddle-plex, or a function which returns either nil, t, a string, or a fiddle-plex (or, in fact, another function, but let's not be ridiculous). If a string, it should be just the contents of the header, not the name of the header itself nor the trailing newline. If a function, it will be called with one argument: the possibly-nil name of the file associated with the message buffer.=E2=8C=9D I try that. Still no luck; I still get the standard Message-ID header. Oh= , but after reading the definition of the function feedmail-fiddle-messag= e-id, I discover that despite the docstring, feedmail-message-id-generato= r _can't_ be function, but it can be a symbol fbound to a function. Ok, I= change my lambda to a named function. Still no luck. Digging further, I discover that feedmail-fiddle-message-i= d is only called from feedmail-send-it-immediately, which I don't use, be= cause I'm only queuing, not sending immediately. Did the docs say that fe= edmail-message-id-generator wouldn't be used when just queuing rather tha= n sending immediately? Of course not. The documentation is ridiculous, it's in the wrong place, it's outdated, = the code doesn't work, it's outdated too, and there's no point in trying = to fix any of it because my work is unwanted anyway. Even the worst webma= il service I've ever used was more user-friendly than this, which is why = I keep using them even though they routinely betray me by locking me out = of my account for some stupid little thing like lying about my niece's na= me because it's none of Yahoo's business or logging in from a new IP addr= ess and failing to tell Google about it in advance, forcing me to create = new account and lose any mail stored in the previous one that I didn't pa= ranoidly download an offline copy of after every mail session in anticipa= tion of their inevitable betrayal. At least Google let me back in after I= traveled back to where I could log in from the previous IP address again= . I'm telling you all this in order to waste your time from reading this = message so you'll feel my pain, or will at least tell me you do and I'll = vote for you or something.