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

Per Olofsson pelle at dsv.su.se
Fri Oct 22 15:45:39 PDT 2010


Hi,

> Also, $BROWSER does (at least by some programs[1]) get parsed into a
> list of colon-separated commands which are tried in order until the
> first one succeeds, this we could do to $MAILER too. I didn't implement
> that because:
> a) My shell-fu is not good enough to survive the resulting quoting mess,
>    I'd have to drop (jump?) to haskell/python for that.

We could simply copy the code that parses $BROWSER (it's in upstream but
not the Debian package).

> Also, in the current proposal, the argument list of $MAILER necessarily
> starts with "mailto:". If the programs being put in MAILER check that
> and fail on unrecognized arguments, we have a way to introduce, up- and
> downward-compatibly (by falling back to mailto: if necessary), any new
> protocol we can find a unique name for.
> (I realize that part was not a particularly compelling argument, and
> wouldn't further object if you guys felt XDG_MAILER was the more
> conservative/better approach and went with that. I'm just explaining why
> I felt, and feel, that grabbing MAILER here and now is reasonable.)

Agreed.

> 
>> >  - What happens if the mailer contains shell metacharacters?
> I'd hope they get expanded, once, by a posix-compatible /bin/sh, but I'm
> squeamish that way. Your
> | eval "$XDG_MAILER" '"$@"'
> looks as if it allows more evi^Wnifty quoting tricks than my mere
> |  $XDG_MAILER "$1"
> but I think the most important consideration would be to mimic existing
> BROWSER/EDITOR behavior, assuming there's such a thing. Again, [1].

You don't have to eval anything. Simply don't quote $MAILER when you
invoke it. Then the shell will parse it.

> [1] Anyone know of a good documentation for BROWSER/EDITOR/VISUAL/PAGER?

http://catb.org/~esr/BROWSER/

-- 
Pelle


More information about the Portland mailing list