Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* How to have 'mailto' (clicking addresses) open a new email in Gnus?
@ 2012-08-10 18:36 Marius Hofert
  2012-08-10 19:13 ` Charles Philip Chan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Marius Hofert @ 2012-08-10 18:36 UTC (permalink / raw)
  To: info-gnus-english

Sometimes, email addresses on websites are links, which, when clicked, open a new email (with corresponding address) in the default email program. I figured out that Firefox has a setting (Preferences -> Applications -> mailto) but how can I set it to open a new email in Gnus?

I found some solutions, but they seem pretty old and not so easy to understand:

https://groups.google.com/forum/#!searchin/gnu.emacs.gnus/mailto$20firefox/gnu.emacs.gnus/DaJTxALQoDw/N_xm3Uoe86kJ[1-25]
http://article.gmane.org/gmane.emacs.help/49827

Is there any easier way? (Emacs 24; Ubuntu 12.04; Firefox 14.0.1; Gnus 5.13)

Cheers,

Marius

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
  2012-08-10 18:36 How to have 'mailto' (clicking addresses) open a new email in Gnus? Marius Hofert
@ 2012-08-10 19:13 ` Charles Philip Chan
       [not found] ` <mailman.6737.1344626097.855.info-gnus-english@gnu.org>
  2012-08-11  5:12 ` Teemu Likonen
  2 siblings, 0 replies; 11+ messages in thread
From: Charles Philip Chan @ 2012-08-10 19:13 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 698 bytes --]

Marius Hofert <marius.hofert@math.ethz.ch> writes:

> Sometimes, email addresses on websites are links, which, when clicked,
> open a new email (with corresponding address) in the default email
> program. I figured out that Firefox has a setting (Preferences ->
> Applications -> mailto) but how can I set it to open a new email in
> Gnus?

You need a script and set Firefox's mailto handler to use it. For
example:

#!/bin/sh
mailaddr="`echo $1 | cut -d : -f 2`"
emacsclient -n --eval "(compose-mail-other-frame \"$mailaddr\" \"$2\")"

Charles

-- 
"I once witnessed a long-winded, month-long flamewar over the use of
mice vs. trackballs...It was very silly."
(By Matt Welsh)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 162 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
       [not found] ` <mailman.6737.1344626097.855.info-gnus-english@gnu.org>
@ 2012-08-10 23:28   ` Marius Hofert
  2012-08-10 23:46   ` Marius Hofert
  1 sibling, 0 replies; 11+ messages in thread
From: Marius Hofert @ 2012-08-10 23:28 UTC (permalink / raw)
  To: gnu.emacs.gnus; +Cc: info-gnus-english

Dear Charles,

*excellent*, many thanks.

Marius

On Friday, August 10, 2012 9:13:48 PM UTC+2, Charles Philip Chan wrote:
> Marius Hofert writes:
> 
> 
> 
> > Sometimes, email addresses on websites are links, which, when clicked,
> 
> > open a new email (with corresponding address) in the default email
> 
> > program. I figured out that Firefox has a setting (Preferences ->
> 
> > Applications -> mailto) but how can I set it to open a new email in
> 
> > Gnus?
> 
> 
> 
> You need a script and set Firefox's mailto handler to use it. For
> 
> example:
> 
> 
> 
> #!/bin/sh
> 
> mailaddr="`echo $1 | cut -d : -f 2`"
> 
> emacsclient -n --eval "(compose-mail-other-frame \"$mailaddr\" \"$2\")"
> 
> 
> 
> Charles
> 
> 
> 
> -- 
> 
> "I once witnessed a long-winded, month-long flamewar over the use of
> 
> mice vs. trackballs...It was very silly."
> 
> (By Matt Welsh)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
       [not found] ` <mailman.6737.1344626097.855.info-gnus-english@gnu.org>
  2012-08-10 23:28   ` Marius Hofert
@ 2012-08-10 23:46   ` Marius Hofert
  2012-08-10 23:59     ` Charles Philip Chan
       [not found]     ` <mailman.6753.1344643232.855.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 11+ messages in thread
From: Marius Hofert @ 2012-08-10 23:46 UTC (permalink / raw)
  To: gnu.emacs.gnus; +Cc: info-gnus-english

Dear Charles,

It works great, thanks. The only thing I realized is if Emacs is closed, clicking a link does not open Emacs (instead, if Emacs is open, then clicking a link openes Gnus etc.). Do you know a solution to this?

Cheers,

Marius


On Friday, August 10, 2012 9:13:48 PM UTC+2, Charles Philip Chan wrote:
> Marius Hofert writes:
> 
> 
> 
> > Sometimes, email addresses on websites are links, which, when clicked,
> 
> > open a new email (with corresponding address) in the default email
> 
> > program. I figured out that Firefox has a setting (Preferences ->
> 
> > Applications -> mailto) but how can I set it to open a new email in
> 
> > Gnus?
> 
> 
> 
> You need a script and set Firefox's mailto handler to use it. For
> 
> example:
> 
> 
> 
> #!/bin/sh
> 
> mailaddr="`echo $1 | cut -d : -f 2`"
> 
> emacsclient -n --eval "(compose-mail-other-frame \"$mailaddr\" \"$2\")"
> 
> 
> 
> Charles
> 
> 
> 
> -- 
> 
> "I once witnessed a long-winded, month-long flamewar over the use of
> 
> mice vs. trackballs...It was very silly."
> 
> (By Matt Welsh)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
  2012-08-10 23:46   ` Marius Hofert
@ 2012-08-10 23:59     ` Charles Philip Chan
       [not found]     ` <mailman.6753.1344643232.855.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Charles Philip Chan @ 2012-08-10 23:59 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 514 bytes --]

Marius Hofert <marius.hofert@math.ethz.ch> writes:

Hello Marius:

> It works great, thanks. The only thing I realized is if Emacs is
> closed, clicking a link does not open Emacs (instead, if Emacs is
> open, then clicking a link openes Gnus etc.). Do you know a solution
> to this?

http://www.emacswiki.org/emacs/EmacsClient#toc5

Regards,
Charles

-- 
Running Windows on a Pentium is like having a brand new Porsche but only
be able to drive backwards with the handbrake on.
(Unknown source)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 162 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
  2012-08-10 18:36 How to have 'mailto' (clicking addresses) open a new email in Gnus? Marius Hofert
  2012-08-10 19:13 ` Charles Philip Chan
       [not found] ` <mailman.6737.1344626097.855.info-gnus-english@gnu.org>
@ 2012-08-11  5:12 ` Teemu Likonen
  2 siblings, 0 replies; 11+ messages in thread
From: Teemu Likonen @ 2012-08-11  5:12 UTC (permalink / raw)
  To: Marius Hofert; +Cc: info-gnus-english

Marius Hofert [2012-08-10 11:36:12 -0700] wrote:

> Sometimes, email addresses on websites are links, which, when clicked,
> open a new email (with corresponding address) in the default email
> program.

I wrote and use the solution described here:

http://www.emacswiki.org/emacs/MailtoHandler

I'm talking about sections 1-3. Sections 4 and 5 have been added by
others. I'm not sure what they do.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
       [not found]     ` <mailman.6753.1344643232.855.info-gnus-english@gnu.org>
@ 2012-08-11  6:13       ` Marius Hofert
  2012-08-11  8:48         ` Charles Philip Chan
       [not found]         ` <mailman.6764.1344675537.855.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Marius Hofert @ 2012-08-11  6:13 UTC (permalink / raw)
  To: gnu.emacs.gnus; +Cc: info-gnus-english

Dear Charles,

many thanks. I can now start Emacs by clicking an email address, but it throws me in an empty buffer "~/(compose-mail-other-frame "my-email-address" ""). [So Gnus is not started]. Any idea for that?

Cheers,

Marius

On Saturday, August 11, 2012 1:59:56 AM UTC+2, Charles Philip Chan wrote:
> Marius Hofert writes:
> 
> 
> 
> Hello Marius:
> 
> 
> 
> > It works great, thanks. The only thing I realized is if Emacs is
> 
> > closed, clicking a link does not open Emacs (instead, if Emacs is
> 
> > open, then clicking a link openes Gnus etc.). Do you know a solution
> 
> > to this?
> 
> 
> 
> http://www.emacswiki.org/emacs/EmacsClient#toc5
> 
> 
> 
> Regards,
> 
> Charles
> 
> 
> 
> -- 
> 
> Running Windows on a Pentium is like having a brand new Porsche but only
> 
> be able to drive backwards with the handbrake on.
> 
> (Unknown source)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
  2012-08-11  6:13       ` Marius Hofert
@ 2012-08-11  8:48         ` Charles Philip Chan
       [not found]         ` <mailman.6764.1344675537.855.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Charles Philip Chan @ 2012-08-11  8:48 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 749 bytes --]

Marius Hofert <marius.hofert@math.ethz.ch> writes:

Hello Marius:

> many thanks. I can now start Emacs by clicking an email address, but
> it throws me in an empty buffer "~/(compose-mail-other-frame
> "my-email-address" ""). [So Gnus is not started]. Any idea for that?

Since I live in Emacs, I have never encountered this problem. I will
take a look at it and get back to you.

However, I highly recommend that you put:

,----
| emacs --daemon
`----

in your "~/.profile". This will start the emacs server once in the
background when you login. You can subsequently connect to it by just
using emacsclient.

Charles

-- 
"Besides, I think [Slackware] sounds better than 'Microsoft,' don't you?"
(By Patrick Volkerding)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 162 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
       [not found]         ` <mailman.6764.1344675537.855.info-gnus-english@gnu.org>
@ 2012-08-11 16:33           ` Marius Hofert
  2012-08-11 18:26             ` Charles Philip Chan
       [not found]             ` <mailman.6802.1344709625.855.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 11+ messages in thread
From: Marius Hofert @ 2012-08-11 16:33 UTC (permalink / raw)
  To: gnu.emacs.gnus; +Cc: info-gnus-english

Dear Charles,

If I put emacs --daemon in ~/.profile, then nothing happens anymore if I click a link, not even Emacs is opened. If I remove it again from ~/.profile, then I get the same behavior as before (with the compose-mail-other-frame... "error"). 

I use Ubuntu 12.04 on a MacBook Air 4,1 (in case this matters). 

Cheers,

Marius

On Saturday, August 11, 2012 10:48:31 AM UTC+2, Charles Philip Chan wrote:
> Marius Hofert writes:
> 
> 
> 
> Hello Marius:
> 
> 
> 
> > many thanks. I can now start Emacs by clicking an email address, but
> 
> > it throws me in an empty buffer "~/(compose-mail-other-frame
> 
> > "my-email-address" ""). [So Gnus is not started]. Any idea for that?
> 
> 
> 
> Since I live in Emacs, I have never encountered this problem. I will
> 
> take a look at it and get back to you.
> 
> 
> 
> However, I highly recommend that you put:
> 
> 
> 
> ,----
> 
> | emacs --daemon
> 
> `----
> 
> 
> 
> in your "~/.profile". This will start the emacs server once in the
> 
> background when you login. You can subsequently connect to it by just
> 
> using emacsclient.
> 
> 
> 
> Charles
> 
> 
> 
> -- 
> 
> "Besides, I think [Slackware] sounds better than 'Microsoft,' don't you?"
> 
> (By Patrick Volkerding)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
  2012-08-11 16:33           ` Marius Hofert
@ 2012-08-11 18:26             ` Charles Philip Chan
       [not found]             ` <mailman.6802.1344709625.855.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Charles Philip Chan @ 2012-08-11 18:26 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 670 bytes --]

Marius Hofert <marius.hofert@math.ethz.ch> writes:

Hello Marius:

> If I put emacs --daemon in ~/.profile, then nothing happens anymore if
> I click a link, not even Emacs is opened. If I remove it again from
> ~/.profile, then I get the same behavior as before (with the
> compose-mail-other-frame... "error").

I have never started Emacs this way before- I prefer to have Emacs open
at all times. However, I just tried this out, you need to add "-c" to
the emacslient command.

Cheers,
Charles

-- 
"We all know Linux is great...it does infinite loops in 5 seconds."
(Linus Torvalds about the superiority of Linux on the Amterdam
Linux Symposium)

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 162 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: How to have 'mailto' (clicking addresses) open a new email in Gnus?
       [not found]             ` <mailman.6802.1344709625.855.info-gnus-english@gnu.org>
@ 2012-08-11 20:11               ` Marius Hofert
  0 siblings, 0 replies; 11+ messages in thread
From: Marius Hofert @ 2012-08-11 20:11 UTC (permalink / raw)
  To: gnu.emacs.gnus; +Cc: info-gnus-english

Very good, Charles, it works great!

Many thanks for helping.

Cheers,

Marius


On Saturday, August 11, 2012 8:26:13 PM UTC+2, Charles Philip Chan wrote:
> Marius Hofert writes:
> 
> 
> 
> Hello Marius:
> 
> 
> 
> > If I put emacs --daemon in ~/.profile, then nothing happens anymore if
> 
> > I click a link, not even Emacs is opened. If I remove it again from
> 
> > ~/.profile, then I get the same behavior as before (with the
> 
> > compose-mail-other-frame... "error").
> 
> 
> 
> I have never started Emacs this way before- I prefer to have Emacs open
> 
> at all times. However, I just tried this out, you need to add "-c" to
> 
> the emacslient command.
> 
> 
> 
> Cheers,
> 
> Charles
> 
> 
> 
> -- 
> 
> "We all know Linux is great...it does infinite loops in 5 seconds."
> 
> (Linus Torvalds about the superiority of Linux on the Amterdam
> 
> Linux Symposium)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-08-11 20:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-10 18:36 How to have 'mailto' (clicking addresses) open a new email in Gnus? Marius Hofert
2012-08-10 19:13 ` Charles Philip Chan
     [not found] ` <mailman.6737.1344626097.855.info-gnus-english@gnu.org>
2012-08-10 23:28   ` Marius Hofert
2012-08-10 23:46   ` Marius Hofert
2012-08-10 23:59     ` Charles Philip Chan
     [not found]     ` <mailman.6753.1344643232.855.info-gnus-english@gnu.org>
2012-08-11  6:13       ` Marius Hofert
2012-08-11  8:48         ` Charles Philip Chan
     [not found]         ` <mailman.6764.1344675537.855.info-gnus-english@gnu.org>
2012-08-11 16:33           ` Marius Hofert
2012-08-11 18:26             ` Charles Philip Chan
     [not found]             ` <mailman.6802.1344709625.855.info-gnus-english@gnu.org>
2012-08-11 20:11               ` Marius Hofert
2012-08-11  5:12 ` Teemu Likonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).