[Portland] Bug#574131: xdg-utils: xdg-email never launchs a mua if desktop is not gnome neither kde neither xfce

Jonathan Nieder jrnieder at gmail.com
Sun Oct 24 22:44:12 PDT 2010


Per Olofsson wrote:

> I've applied two patches to the git repo now to add support for $MAILER
> and fallback to mutt. They're attached.

Nice.

> --- a/scripts/xdg-email
> +++ b/scripts/xdg-email
> @@ -504,6 +505,23 @@ open_xfce()
>      fi
>  }
>  
> +open_envvar()
> +{
> +    local OLDIFS="$IFS"
> +    IFS=:
> +    for i in $MAILER; do

This means that to use a mailer command including a colon, one would
write something like

	MAILER='vim -d con$(printf \072)20/30/600/150'

The more obvious “MAILER='vim -d con\:20/30/600/150'” doesn't work ---
it splits as (1) con\, (2) 20/30/600/150.

I can't see an easier way to cleanly support multiple alternative
mailers. I am very happy to have $MAILER working at all, so for what
it's worth, I like the patch.


More information about the Portland mailing list