[Reportbug-maint] Bug#788045: reportbug: patch - use the default desktop mua
steele at debian.org
Thu Jun 29 04:03:39 UTC 2017
On Wed, Jun 28, 2017 at 10:19 PM, Paul Wise <pabs at debian.org> wrote:
> On Wed, 2017-06-28 at 10:41 -0400, David Steele wrote:
> > The attached patch adds a "desktop-default" option
> I might be wrong but I think individual options for choosing an MUA are
> deprecated and you should instead use a parameter to the --mua option.
I followed the convention for the other options in the code, supported by the
current documentation. The --mua option feels pretty useless to me
> I also think you should call it xdg-email not desktop-default for
> precision about what it does, there is no /usr/bin/desktop-default
reportbug has a mode called NOVICE. This felt like a better description -
xdg comes later. But, I could be persuaded.
> > via xdg-open and a "mailto" URI.
> I'd strongly suggest using xdg-email *not* xdg-open, the latter might
> not work for mailto but the former is more likely to work.
I've worked quite a bit with xdg-open with the mailto scheme, and know
how it will interpret the URI. I'm not so sure with xdg-email, and had
problems controlling text quoting for the individual arguments. I suspect
that the two are equivalent for mailto's, but this way I didn't have to check.
> In addition, xdg-email allows you to specify attachments, which IIRC
> reportbug can sometimes use. xdg-open cannot add attachments.
Actually, it can. There is broad support for an attachment keyword in
the mailto URI scheme, though at one point there was disagreement
on the name of the tag. That may or may not be fixed (Evolution was
the holdout, IIRC).
In any case, there's a 4+-year old comment in the reportbug source
stating that attachments are not (yet) supported for mua's. If that
changes, I would be willing to revisit it.
> > Note that this drops headers that are not
> I don't think that is acceptable since reportbug sets a number of other
> headers. mailto URLs can contain arbitrary headers anyway.
I just reread rfc2368. You shouldn't expect a mailto interface to respect
very many headers. Mine doesn't (gmail api, via gnome-gmail). I didn't
encounter any issues beyond X-Debbugs-CC, and I would worry about
side effects from feeding them all to all mailers. This way I am controlling
the issue at the source.
> > "X-Debbugs-Cc" would need to be moved to a pseudo-header.
> I think this should happen anyway, so that people receiving XCCs
> understand why they are getting a bug they did not expect.
I also think this is an issue that's independent of mailto support.
> PS: I think use of ui.system breaks this under the GTK+ UI.
> PPS: I note that the emacsclient MUA and viewing in a pager use it too.
> PPPS: *never* run external commands from python via os.system or
> equivalent (such as ui.system) unless you are using a hard-coded string
> for the command. Using dynamically calculated or user-provided data is
> likely to create issues when there are shell meta-characters present.
I'm trying not to break new ground beyond supporting the standard mailer.
The Mua class uses ui.system(). Note that all externally collected mailto
data is url-quoted before the call.
> PPPPS: if you are interested in expanding the MUA support of reportbug,
> I would suggest looking at reportbug-ng, which even supports webmail
> like gmail.com (in commented-out code that actually works).
You really should take a look at gnome-gmail.
> I think the MUA handling code of both reportbug and reportbug-ng needs
> to be factored out into a Python library that both tools can use.
Fair enough. Let's see how much friction there is in the process.
My immediate goal is modest - to make reportbug useful to me, and
make moot the question "Where did the message file go?".
Thanks for the prompt feedback.
AE0D BF5A 92A5 ADE4 9481 BA6F 8A31 71EF 3661 50CE
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: GooPG digital signature
More information about the Reportbug-maint