Proposal: Extended link capabilities to Wanderlust messages for Orgmode Below you will find three proposals to extend Orgmode's capabilities to store links to Wanderlust messages. Wanderlust is a mail user agent for Emacsen, entirely written in elisp. For the proposed modifications there is an experimental implementation in the branch org-wl+ of my personal working copy of the Orgmode repository on github: http://github.com/dmj/org-mode/tree/org-wl+ They work with simple folder definitions and I am currently setting up more complex folder definitions for testing. As these modifications would require a larger patch to org-wl.el the necessary paper work is initiated. 1.1 Messages in filter folders ------------------------------- A filter folder is a virtual folder that displays messages that match a particular filter condition. * Examples - /flag:unread/%Inbox Show only unread messages in my default imap account's inbox. - /tocc:maus.david@gmail.com/%list.emacs-orgmode.gnu.org Show only messages that where sent to me, depending on the To: and Cc: header field. * Problem with current solution Currently `org-wl-store-link' includes the filter condition in the target folder name. As this is no problem if the filter condition refers to properties the message bears on itself (i.e. header fields) it causes trouble if the filter condition refers to the message's state inside the user agent (i.e. flagged unread, important etc.). If a link is stored to a message that is displayed in the folder /flag:unread/%Inbox -- the link breaks as soon as the message in question is read and hence cannot be found in this folder. * Proposed modification Introduce a new customization variable `org-wl-link-remove-filter'. If set to t, filter conditions are removed when storing a link to a message that is displayed in a filter folder. 1.2 Messages in shimbun folders -------------------------------- A shimbun folder's messages are news items that are scraped out of web-pages and presented as messages. A shimbun folder is accompanied by a corresponding elisp library that fetches a page using w3m, parses it for news items and generates the messages. There also exist generic shimbun processors for Atom and RSS feeds. The source page of a shimbun message is indicated by a Xref header field with a web link to the original item. * Examples - @heise.telepolis Retrieves news items for the german online magazine "Telepolis" * Problem with current solution A shimbun folder is a virtual folder: The messages that are displayed are virtual in the sense that they are transformed news items of a webpage. If these items vanish from the page that is parsed they are out of reach. When reading RSS and Atom feeds or, more general, pages with dynamic content this is expected to happen. I don't know how many users of Orgmode actually use this folder type; I use it to read Atom and RSS feeds and sometimes I'd like to store a reference to a web source with an interesting article. That is: I don't want a link to the virtual shimbun message but a link to the message's source. * Proposed modification Introduce new customization variable `org-wl-link-shimbun-to-xref'. If set to t, org-wl does not create an Wanderlust link but a regular http-link that points to the url of the news item as indicated by the Xref header field with the shimbun message's subject as description. 1.3 Link to thread ------------------- Sometimes I'd like to store a link not just to a particular message but to a whole discussion thread. * Problem with current solution It is currently not possible to store a link to a discussion thread. * Proposed modification This is in the moment the toughest part to implement: Using a filter folder whos filter condition limits the messages displayed to the thread in question seems the way to go. The main problem is how to determine the messages that are part of a discussion thread. It is possible to find the message that started the thread and create a filter that matches all messages that have this message's message-id either in the in-reply-to or the references header field. /message-id:|in-reply-to:|references:/ Alas, for this filter condition to work properly it is assumed that the mail user agents of the thread's participants use both headers (in-reply-to and references) as described in the specs (rfc2822, section 3.6.4). That is: This filter condition won't find messages deep in the thread that only use the in-reply-to header and hence do not bear a property that links back to the message that started the thread.[1] The best solution seems to be a patch or extension to Wanderlust for a new filter condition that uses Wanderlust's built-in capabilities to display threads; as long as such a filter condition does not exist using the approach above maybe considered "good enough" for referencing a discussion thread. Regards -- David [1] Something David Abrahams pointed out to me on http://lists.airs.net/wl-en/archive/200912/msg00067.html -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... maus.david@gmail.com ICQ....... 241051416