From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Including linked emails during export (was Re: Integration of notmuch email references in notes in org-mode) Date: Mon, 18 Feb 2013 22:41:25 +0100 Message-ID: <20130218214125.GC25900@kuru.dyndns-at-home.com> References: <5122316C.7070706@gmail.com> <20130218151250.GE18291@kuru.dyndns-at-home.com> <512249D9.10002@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7YSo-0008Tb-P1 for emacs-orgmode@gnu.org; Mon, 18 Feb 2013 16:41:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7YSn-00016z-Ko for emacs-orgmode@gnu.org; Mon, 18 Feb 2013 16:41:30 -0500 Received: from mail-ee0-f49.google.com ([74.125.83.49]:48463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7YSn-00016U-EF for emacs-orgmode@gnu.org; Mon, 18 Feb 2013 16:41:29 -0500 Received: by mail-ee0-f49.google.com with SMTP id d4so3113604eek.22 for ; Mon, 18 Feb 2013 13:41:28 -0800 (PST) Content-Disposition: inline In-Reply-To: <512249D9.10002@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: Nicolas Goaziou , emacs-orgmode@gnu.org Hi, On Mon, Feb 18, 2013 at 04:33:45PM +0100, Rainer M Krug wrote: > On 18/02/13 16:12, Suvayu Ali wrote: > > On Mon, Feb 18, 2013 at 02:49:32PM +0100, Rainer M Krug wrote: > >> > >> - From time to time, I have to include email references in notes in org. There is obviously > >> org-notmuch.el, but I am not to happy with it as, when exporting the notes, the link is shown > >> but neither clickable nor the resulting email is shown in the exported document (both > >> understandable). > >> > > > > This has also been an irritation of mine. I think I will take your second idea (include the > > email on export) and see if I can come-up with a patch for org-notmuch. Since I'm still a > > newbie elisp programmer, this might take a while. :-p > > If there is a solution in sight, I am happy to wait a bit - email in export, possibly in a block > so that it is set apart from the rest of the document, would be brilliant. Possibly having an > option which can be set to have links exported as links or expanded on export, would be really nice. The option to open the link is out of the question since different people read their emails differently. There is no way for a library to get everything right, specially since the link won't be in Emacs. It is in the exported file (e.g. html, pdf, txt). Now to include the email during the export at first I thought it should be possible to write a filter, but then I realised I need to insert an email quote block after whatever parent greater-element holds the link and then redirect the link to this new block. A filter allows you a way to modify an element, but nothing more. So I think the correct approach here would be to write a derived backend. This complicates things quite significantly since now you need to support each backend separately. I wonder if there is any easier (generic) way to do the above for all present and future backends. I have CC'd Nicolas, lets see what he has to say. Cheers, -- Suvayu Open source is the future. It sets us free.