From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: direct link to mails in gmail Date: Thu, 20 Oct 2011 09:06:16 +0200 Message-ID: References: <4E9F8A54.5070007@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6551d5cbfb8a404afb597be Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGmhp-0000Op-O4 for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 03:06:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGmhl-0003mU-SU for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 03:06:21 -0400 Received: from mail-qw0-f41.google.com ([209.85.216.41]:54514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGmhl-0003mG-MW for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 03:06:17 -0400 Received: by qadc11 with SMTP id c11so35297qad.0 for ; Thu, 20 Oct 2011 00:06:16 -0700 (PDT) In-Reply-To: <4E9F8A54.5070007@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: Torsten Wagner Cc: Org Mode Mailing List --0016e6551d5cbfb8a404afb597be Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 20, 2011 at 4:41 AM, Torsten Wagner wrote: > Hi, > I just figured out some kind of very interesting possibility. > All the personal data and security feelings aside, I use a gmail account > since I share it between many different computers. > > In my org-files, I would sometimes like to link to a particular mail e.g., > for reference purpose. > Today I noticed that each email in my google mail account has a unique and > fixed URL. > Thus, I gave it a try > > 1. Open your gmail account (log-in) > 2. Open the mail you like to refer too. > 3. Copy the URL > 4. Add the URL as a link (C-c C-l) to your org-file > > After that, clicking on the link will open the mail directly in your > standard webbrowser. If you logged out from google mail in between, you are > ask to log-in first, after that select the link again. > > That is really nice - and I used it to link to gmail emails from rtm - but there is one thing youi should be aware of: the link is only valid, if the mail keeps the label. As an example: If I copy the link from the inbox, paste it into an org file, and *then* archive the mail, the link is, to my knowledge, not valid any more, as it contains the label in it. So: it works, but it is essential to copy either the link when the label is selected which will be permanent, or, saver, copy the url in the All Mail folder. Cheers and thanks for the tip, Rainer > But it is getting even better. You are not only able to link to particular > mails within org-mode, but also to google mail labels (folders) or search > results. > > To make it even more org-mode friendly one can set-up org-capture in your > webbrowser [1]. > > I added the following to the org-capture-templates list > ("g" "Gmail-link" entry (file+headline "~/org/work.org" "Gmail-links") > "%A") > > Thus, pressing the assigned button in your browser and emacs will ask you > what kind of link you want to add to your file. Press g for gmail and enter > the description for the link (this could be done automatically, but I find > it to long and not helpful). You will find the link in your capture buffer > in emacs for further processing > > I really like it and I hope others find this useful too. > Not sure about the safety issue to link to URLs within your gmail account. > Maybe others can comment on this. > > All the best > > Totti > > > [1] http://orgmode.org/worg/org-**contrib/org-protocol.html > > > > > > > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --0016e6551d5cbfb8a404afb597be Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Oct 20, 2011 at 4:41 AM, Torsten= Wagner <t= orsten.wagner@gmail.com> wrote:
Hi,
I just figured out some kind of very interesting possibility.
All the personal data and security feelings aside, I use a gmail account si= nce I share it between many different computers.

In my org-files, I would sometimes like to link to a particular mail e.g., = for reference purpose.
Today I noticed that each email in my google mail account has a unique and = fixed URL.
Thus, I gave it a try

1. Open your gmail account (log-in)
2. Open the mail you like to refer too.
3. Copy the URL
4. Add the URL as a link (C-c C-l) to your org-file

After that, clicking on the link will open the mail directly in your standa= rd webbrowser. If you logged out from google mail in between, you are ask t= o log-in first, after that select the link again.


That is really nice - and I used it to link to gm= ail emails from rtm - but there is one thing youi should be aware of: the l= ink is only valid, if the mail keeps the label. As an example: If I copy th= e link from the inbox, paste it into an org file, and *then* archive the ma= il, the link is, to my knowledge, not valid any more, as it contains the la= bel in it.

So: it works, but it is essential to copy either the link when the labe= l is selected which will be permanent, or, saver, copy the url in the All M= ail folder.

Cheers and thanks for the tip,

Rainer

=A0
But it is getting even better. You are not only able to link to particular = mails within org-mode, but also to google mail labels (folders) or search r= esults.

To make it even more org-mode friendly one can set-up org-capture in your w= ebbrowser [1].

I added the following to the org-capture-templates list
("g" "Gmail-link" entry (file+headline "~/org/work.org" "Gmail-li= nks") "%A")

Thus, pressing the assigned button in your browser and emacs will ask you w= hat kind of link you want to add to your file. Press g for gmail and enter = the description for the link (this could be done automatically, but I find = it to long and not helpful). You will find the link in your capture buffer = in emacs for further processing

I really like it and I hope others find this useful too.
Not sure about the safety issue to link to URLs within your gmail account. = Maybe others can comment on this.

All the best

Totti


[1] http://orgmode.org/worg/org-contrib/org-protocol.html









--
Rainer M. Krug, PhD (Co= nservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Ger= many)

Centre of Excellence for Invasion Biology
Stellenbosch Univ= ersity
South Africa

Tel : =A0 =A0 =A0 +33 - (0)9 53 10 27 44
Cell: =A0 = =A0 =A0 +33 - (0)6 85 62 59 98
Fax (F): =A0 =A0 =A0 +33 - (0)9 58 10 27 = 44

Fax (D): =A0 =A0+49 - (0)3 21 21 25 22 44

email: =A0 =A0 = =A0
Rainer@krugs.de=

Skype: =A0 =A0 =A0RMkrug

--0016e6551d5cbfb8a404afb597be--