From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: URL Date: 27 Oct 2003 15:03:35 +0200 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfqbdw8e.fsf_-_@mail.jurta.org> References: <200310121947.h9CJlhKH006102@oak.pohoyda.family> <874qy4vbg7.fsf@mail.jurta.org> <3F9471FB.4000609@yahoo.com> <87u163up4n.fsf@mail.jurta.org> <3F981CEC.607@yahoo.com> <3F98329D.9070603@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067269708 3121 80.91.224.253 (27 Oct 2003 15:48:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2003 15:48:28 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Oct 27 14:24:04 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 1AE7Lo-0000V3-00 for ; Mon, 27 Oct 2003 14:24:04 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AE7Ln-0006VO-00 for ; Mon, 27 Oct 2003 14:24:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AE7Ek-0001i4-R3 for emacs-devel@quimby.gnus.org; Mon, 27 Oct 2003 08:16:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AE7AA-0000Rd-4D for emacs-devel@gnu.org; Mon, 27 Oct 2003 08:12:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AE77M-00085L-OX for emacs-devel@gnu.org; Mon, 27 Oct 2003 08:09:39 -0500 Original-Received: from [64.246.52.232] (helo=ns5.tangramltd.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AE73r-00075H-1w for emacs-devel@gnu.org; Mon, 27 Oct 2003 08:05:31 -0500 Original-Received: from 80-235-37-79-dsl.mus.estpak.ee ([80.235.37.79] helo=mail.jurta.org) by ns5.tangramltd.com with esmtp (Exim 4.20) id 1AE73j-0003rf-98 for emacs-devel@gnu.org; Mon, 27 Oct 2003 15:05:24 +0200 Original-To: emacs-devel@gnu.org In-Reply-To: <3F98329D.9070603@yahoo.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Lines: 92 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns5.tangramltd.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jurta.org 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:17460 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17460 Kevin Rodgers writes: > Juri Linkov wrote: > > 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: > > Shouldn't "%25" have been converted to "%": > > Content-ID: Yes, it should, as it was correctly written in the older version at http://www.ietf.org/rfc/rfc2111.txt. > But more importantly, the mid and cid URLs do not actually specify a > LOCATION: that makes them more like a URN than a URL. Yes, I agree that mid and cid could be rather defined as URN, e.g. urn:mid:foo@bar.net. However, according to the contemporary view (http://www.w3.org/TR/uri-clarification/) the distinction between URL and URN is blurred now. > And it makes them similar to the news: URL scheme. But > there is also a nntp://://
URL > scheme, which I think is closer to what we need. > > > 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). > > We could define separate URL schemes for mbox, POP, and IMAP access, > but I think for now I'm going to pursue my origial idea, but rename > it to conform to the standard for experimental schemes: > > x-mid:[//[user@]host]/path/to/folder#message-id I think it's impossible to define such generic URL scheme, because messages can be accessed only by mail agents, but every mail agent has its own message location schemes. > > 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? It is a good idea to define an interface like `compose-mail'. But I think it's enough to specify only Message-Id to unambiguously find a needed message: (defun goto-mail (&optional message-id) (interactive "sMessage-Id: ") (let ((function (get read-mail-command 'gotofunc))) (and function (funcall function message-id)))) Now, the main problem is how to implement a user-agent specific functions that will look up the message by its Message-Id. Gnus has the function `gnus-summary-goto-article' (which currently works only within the selected folder). Does a similar function exist in rmail? -- http://www.jurta.org/emacs/