From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: RMAIL, MIME-related bug Date: Thu, 23 Oct 2003 12:24:44 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3F981CEC.607@yahoo.com> References: <200310121947.h9CJlhKH006102@oak.pohoyda.family> <874qy4vbg7.fsf@mail.jurta.org> <3F9471FB.4000609@yahoo.com> <87u163up4n.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1066933992 7326 80.91.224.253 (23 Oct 2003 18:33:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2003 18:33:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Oct 23 20:33:10 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACkGk-0000LV-00 for ; Thu, 23 Oct 2003 20:33:10 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACkGk-0000vc-00 for ; Thu, 23 Oct 2003 20:33:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACk9A-0002um-D2 for emacs-devel@quimby.gnus.org; Thu, 23 Oct 2003 14:25:20 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ACk91-0002uD-7H for emacs-devel@gnu.org; Thu, 23 Oct 2003 14:25:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ACk8U-0002du-0P for emacs-devel@gnu.org; Thu, 23 Oct 2003 14:25:10 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ACk8T-0002cs-5f for emacs-devel@gnu.org; Thu, 23 Oct 2003 14:24:37 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ACk8R-0005vQ-00 for ; Thu, 23 Oct 2003 20:24:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACk8Q-0005vI-00 for ; Thu, 23 Oct 2003 20:24:34 +0200 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1ACk8Q-0001c4-00 for ; Thu, 23 Oct 2003 20:24:34 +0200 Original-Lines: 72 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17376 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17376 Juri Linkov wrote: > Kevin Rodgers writes: >>I did a little work on this issue about 2 1/2 years ago. My approach >>was to define a bookmark as a URL whose protocol is "mailmessage", so >>that I could use Emacs' url.el library to parse it and ange-ftp.el to >>access remote //[USER@]HOST folders. However, I wrote it as an add-on >>to VM, so the code that actually views the folder and selects the >>message would have to be converted to Rmail. And it would have to be >>extended to handle IMAP folders (cf. file folders). > > Using URL for references to messages is a good solution, but instead > of inventing ad hoc protocol name, it's better to use standard name > "mid" defined by http://www.ietf.org/rfc/rfc2392.txt. Thanks for the pointer, but I find that document somewhat disappointing. For one thing, I was confused by this: A "cid" URL is converted to the corresponding Content-ID message header [MIME] by removing the "cid:" prefix, converting the % encoded character to their equivalent US-ASCII characters, and enclosing the remaining parts with an angle bracket pair, "<" and ">". For example, "cid:foo4%25foo1@bar.net" corresponds to Content-ID: Reversing the process and converting URL special characters to their % encodings produces the original cid. A "mid" URL is converted to a Message-ID or Message-ID/Content-ID pair in a similar fashion. Shouldn't "%25" have been converted to "%": Content-ID: But more importantly, the mid and cid URLs do not actually specify a LOCATION: that makes them more like a URN than a URL. > Then, for example, opening the link > should start a mail reader, find corresponding message by its > Message-ID, prepare article buffer and switch to it (e.g. in case of > Gnus to call the function `gnus-summary-goto-article'; other mail > readers should have a similar function). Shouldn't the cid and mid schemes specify a location via the Common Internet Scheme Syntax defined in RFC 1738? That way, you could specify a folder file, or a POP or IMAP server (and user and password). > I'm not sure yet, where this could be implemented: url.el is not part > of Emacs (BTW: Why?); thingatpt.el mentions this protocol name, but > that's all; perhaps this should be done partially in ffap.el. As long as it respects the read-mail-command variable. To do that correctly, I think we would need to define an interface like compose-mail that would accept all the arguments that might be necessary to specify a message (folder file and format; or server, protocol, user, and password; plus message id); then a new utility define-read-mail-command (analogous to define-mail-user-agent) that would associate each read-mail-command to a function that supports that interface. Otherwise, how would Emacs know where to search for the Message-Id? -- Kevin Rodgers