Kevin Brubeck Unhammer <[email protected]> writes: >> $ xdg-email --version >> xdg-email 1.1.0 rc1 >> >> $ cat /tmp/xdg-test >> #!/bin/bash >> >> echo "$@" > /tmp/xdg-test.log >> >> $ xdg-email [email protected] >> >> $ cat /tmp/xdg-test.log >> mailto:[email protected] > > Weird, when I try, I get without mailto. > > $ xdg-email --version > xdg-email 1.1.0 rc3 > $ cat ~/bin/emacsmail > #!/bin/bash > > echo "$@">/tmp/xdg-test.log > $ xdg-email [email protected] ;cat /tmp/log > [email protected] > > This seems to be because open_gnome3 in that script uses > xdg-mime query default "x-scheme-handler/mailto" > which on my system for some reason gives thunderbird.desktop > instead of what I set it to in Xfce, and open_thunderbird does > MAILTO=$(echo "$2" | sed 's/^mailto://') > I guess that's one for the xdg-email authors. > > > > [...] > >> >> Hmm... Do you mean that I have to open a bug report? I am not familiar >> with GNU Emacs’ development customs, but a common sense suggests me that >> a feature request had better be filed by one who could ground its >> usefulness, while I hardy could. >> >> Anyway, I think it worth to change it a bit more in order to make it try >> to guess mime-type: >> >> >> diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el >> index a4d47f6..dca81fe 100644 >> --- a/lisp/net/browse-url.el >> +++ b/lisp/net/browse-url.el >> @@ -1597,7 +1597,8 @@ used instead of `browse-url-new-window-flag'." >> (if (not mml-mode) >> (error "Enable MML mode if you want to attach files") >> (dolist (attach attaches) >> - (mml-attach-file attach nil nil "attachment")))))))) >> + (mml-attach-file attach (mm-default-file-encoding attach) >> + nil "attachment")))))))) >> >> ;; --- Random browser --- >> >> >> >>> I don't know how attachments are handled by other mailto-users though – >> >> For instance, Icedove (Thunderbird) does not support attaches in >> ‘mailto:’ at all and this is considered a feature [0]. >> >> [0] https://bugzil.la/99055#c6 > > Aha, that makes sense.
Not for the authors of xdg-email(1). It seems that the whole point of above-mentioned quirk about special handling of Thunderbird® is to silently override that limitation. At least I have no other explanation on why to convert something like: --8<---------------cut here---------------start------------->8--- mailto:[email protected]?subject=bar&attach=%2Ftmp%2Fatt --8<---------------cut here---------------end--------------->8--- into --8<---------------cut here---------------start------------->8--- -compose to='"[email protected]",',subject=bar,attachment='/tmp/att' --8<---------------cut here---------------end--------------->8--- And that is exactly what ‘run_thunderbird()’ does. > Hmm, now I'm not so sure I should be feature requesting this; even for > hardened Emacs users, it's easy to hit C-c C-c too quickly. I'll > probably continue using your patch myself though … However, if a feature would be considered potentially hazardous, it always might be done as an option that is disabled by default. >>> multiple identical hfname's or some separator in the hfvalue like with >>> the "to" header? >> >> The former seems to be the only way if we want to use xdg-email(1), >> since it requires that argument of ‘--attach’ should be existing file, >> not an arbitrary string and in particular not a comma separated list of >> files. >> >> $ xdg-email [email protected] --attach hfsdg >> xdg-email: file 'hfsdg' does not exist > > Not necessarily; xdg-email could turn multiple --attach arguments into a > single delimiter-separated list of file paths. But it does not. Or did I miss something? > But I'd rather not > suggest a new standard without having done a full survey in case other > programs support multiple mailto:-attachments in various ways :) _______________________________________________ info-gnus-english mailing list [email protected] https://lists.gnu.org/mailman/listinfo/info-gnus-english
