emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: URL


From: Juri Linkov
Subject: Re: URL
Date: 27 Oct 2003 15:03:35 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Kevin Rodgers <address@hidden> 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: <address@hidden>
> 
> Shouldn't "%25" have been converted to "%":
> 
>       Content-ID: <address@hidden>

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:address@hidden  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:<message-id> URL scheme.  But
> there is also a nntp://<host>:<port>/<newsgroup>/<article> URL
> scheme, which I think is closer to what we need.
> 
> > Then, for example, opening the link <mid:address@hidden>
> > 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:[//address@hidden/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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]