Bug 6615 - xdg-email could support MAILER environment variable
Summary: xdg-email could support MAILER environment variable
Status: RESOLVED FIXED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: Other other
: high enhancement
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2006-04-16 05:51 UTC by gsr.bugs
Modified: 2015-09-23 01:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xdg-email-envvar.diff (1.17 KB, patch)
2011-01-14 01:22 UTC, Per Olofsson
Details | Splinter Review
xdg-email-mutt-detect.diff (661 bytes, patch)
2011-01-14 01:23 UTC, Per Olofsson
Details | Splinter Review
mailer-envvar.patch (1.13 KB, patch)
2015-09-20 06:26 UTC, Per Olofsson
Details | Splinter Review

Description gsr.bugs 2006-04-16 05:51:07 UTC
What the subject says, in line with the use of BROWSER for other things.
Maybe it could even do some parameter rearrangement depending in which mailer
app would be used, in case they accept different parameters for things
like subject.
Comment 1 Waldo Bastian 2006-06-16 16:36:16 UTC
Will require some heuristics to map executable names to command line options. Is 
$MAILER used by anyone today? 
Comment 2 Waldo Bastian 2006-06-16 18:46:54 UTC
I'm a bit worried that $MAILER my interfere with historical uses of the same. (E.g. it could 
point to a command line mailer like mutt or something) 
 
See also: 
http://swtch.com/plan9port/man/man1/web.html 
http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html 
http://www.mkssoftware.com/docs/man1/calendar.1.asp 
 
It might be worth introducing $XDG_MAILER, trying to configure KDE to use evolution as 
default mailer for example seems pretty much impossible for mortals: you have to enter 
"gnome-open %u" in the Email Client Component Chooser 
 
The other option is to document these montrocities 
Comment 3 Waldo Bastian 2006-07-27 12:38:20 UTC
Started a page on how to configure your favourite mail composer:
http://portland.freedesktop.org/wiki/EmailConfig
Comment 4 Per Olofsson 2011-01-14 01:22:52 UTC
Created attachment 42006 [details] [review]
xdg-email-envvar.diff
Comment 5 Per Olofsson 2011-01-14 01:23:21 UTC
Created attachment 42007 [details] [review]
xdg-email-mutt-detect.diff
Comment 6 Per Olofsson 2011-01-14 01:25:48 UTC
I've added two patches for this.

The first one adds support for the $MAILER variable to xdg-email.

The second patch also adds some magic which makes xdg-email use mutt if (1) no other MUA is available and (2) the user has a ~/.muttrc. This only works on Debian and derivs though.
Comment 7 Timo A. Hummel 2011-07-04 11:16:25 UTC
Can you add the patches anytime soon? This bug is open for over 5 years, and castrates use of alternative DE/Window Manager combinations
Comment 8 Rex Dieter 2011-07-05 09:31:35 UTC
patch1 looks acceptable, I can look into integrating that.

patch2 I would rather not start including code to detect/guess any specific mailers as a fallback.
Comment 9 Jon Gjengset 2013-09-06 11:01:40 UTC
Two years later; any progress on this?
Comment 10 Per Olofsson 2015-09-13 07:39:01 UTC
(In reply to Rex Dieter from comment #8)
> patch2 I would rather not start including code to detect/guess any specific
> mailers as a fallback.

Well, you already have special code for Thunderbird now.
Comment 11 Per Olofsson 2015-09-20 06:26:14 UTC
Created attachment 118368 [details] [review]
mailer-envvar.patch

It turns out that automatic detection of Mutt was not such a good idea. Let's skip that.

I have attached a new version of the patch that applies cleanly to the git repo. Or you can just:

  git pull git://anonscm.debian.org/git/collab-maint/xdg-utils.git feature/mailer-envvar
Comment 12 Per Olofsson 2015-09-23 01:42:04 UTC
Fixed in git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.