* RFC: desktop entry for xdg-email
@ 2019-11-02 0:55 Antoine Beaupré
2019-11-02 2:49 ` Daniel Kahn Gillmor
2019-11-02 14:37 ` Jorge P. de Morais Neto
0 siblings, 2 replies; 3+ messages in thread
From: Antoine Beaupré @ 2019-11-02 0:55 UTC (permalink / raw)
To: notmuch
On my system, if I click on mailto: links in my web browser (yes, those
still exist), Thunderbird starts up. Oh the horror!
Wouldn't it be nice if notmuch-emacs-mua would start instead?
Worry not my notmuch friends! I have a solution for you!11!!!
First, you need to drop something like this in /usr/share/applications/notmuch-emacs-mua.desktop
[Desktop Entry]
Categories=Office;Network;Email;
Comment=Notmuch mail
Exec=notmuch-emacs-mua --client --create-frame --auto-daemon %u
Name=notmuch-emacs-mua
MimeType=x-scheme-handler/mailto;
Type=Application
Liberally inspired by mutt.desktop and probably horribly wrong in many
ways:
* missing an icon (do we ship one of those?)
* doesn't handle message/rfc822something (a job for
notmuch-slurp-something?)
* might hurt your cat (poor tokenized thing)
* do you like .INI files? me neither!
* what the heck is that thing anyways and how do I include that in a
Debian package?
I know right? It's great. Once you have figured out all that good stuff,
the next step is to hook that up in your web browser. You will be happy
to know there is a "standard" (as in "it starts with X so it *must* be
cool because mutants are cool") that defines how that work, from the
"Cross Desktop Group"
https://specifications.freedesktop.org/mime-apps-spec/latest/index.html
(The "Cross" in this context probably refers to:
11. Hence: A mixing of breeds or stock, especially in cattle
breeding; or the product of such intermixture; a hybrid
of any kind.
... and obviously not:
1. A gibbet, consisting of two pieces of timber placed
transversely upon one another, in various forms, as a T,
or +, with the horizontal piece below the upper end of the
upright, or as an X. It was anciently used in the
execution of criminals.
... and probably not:
3. Affiction regarded as a test of patience or virtue; trial;
disappointment; opposition; misfortune.
... anyways, I disgress.)
Apparently, to figure out the current setting, you (obviously) will need
to run something like this:
xdg-mime query default x-scheme-handler/mailto
It will probably not show you notmuch. Sad face. At that point, you will
probably launch whatever control panel, dashboard, settings app,
resource editor, or whatever that thing is called these days, and set
your prefered app. If you are an old obstinate grumpy graybeard like me
that refuse any sort of progress and is stuck in a mostly black and
white "GUI" full of text that no one understands, you know everyone
fundamentally hates each other and the world is pain, so *obviously* you
will need to edit another text file to make the above behave.
So head over your favorite text editor (let's not discuss that further
shall we) to .config/mimeapps.list and add a line like this:
x-scheme-handler/mailto=notmuch-emacs-mua.desktop
You'll note the file probably already exists if you use any modern web
browser because those folks *love* to fight with each other (told you,
hate, hate everywhere) for supremacy over that file. Just add that line
somewhere meaningful until `xdg-email` and the above `xdg-mime` query
works correctly.
Then you can thank me the next (last?) time you ever encounter a mailto:
link. It's going to be a funny surprise!
Oh, and the next time you find a contact form to send email, just fax
bomb it or something.
Have a good weekend.
A.
PS: I tried to make this one entertaining, sorry if it's a bit long or
offensive to some, let me know if I went too far. :)
--
Perl is "some assembly required". Python is "batteries included". PHP
is "kitchen sink, but it’s from Canada and both faucets are labeled C".
- Alex Munroe, PHP: a fractal of bad design
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: desktop entry for xdg-email
2019-11-02 0:55 RFC: desktop entry for xdg-email Antoine Beaupré
@ 2019-11-02 2:49 ` Daniel Kahn Gillmor
2019-11-02 14:37 ` Jorge P. de Morais Neto
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Kahn Gillmor @ 2019-11-02 2:49 UTC (permalink / raw)
To: Antoine Beaupré, notmuch
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
On Fri 2019-11-01 20:55:19 -0400, Antoine Beaupré wrote:
> On my system, if I click on mailto: links in my web browser (yes, those
> still exist), Thunderbird starts up. Oh the horror!
>
> Wouldn't it be nice if notmuch-emacs-mua would start instead?
Please see https://bugs.debian.org/918975 (resolved in 0.29-2).
And keep the standup comedy coming!
♥,
--dkg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: RFC: desktop entry for xdg-email
2019-11-02 0:55 RFC: desktop entry for xdg-email Antoine Beaupré
2019-11-02 2:49 ` Daniel Kahn Gillmor
@ 2019-11-02 14:37 ` Jorge P. de Morais Neto
1 sibling, 0 replies; 3+ messages in thread
From: Jorge P. de Morais Neto @ 2019-11-02 14:37 UTC (permalink / raw)
To: Antoine Beaupré, notmuch
Hello.
Em [2019-11-01 sex 20:55:19-0400], Antoine Beaupré escreveu:
> So head over your favorite text editor (let's not discuss that further
> shall we) to .config/mimeapps.list and add a line like this:
>
> x-scheme-handler/mailto=notmuch-emacs-mua.desktop
Instead of directly editing ~~/.config/mimeapps.list~, why don't you use
the xdg command?
$ xdg-mime default notmuch-emacs-mua.desktop x-scheme-handler/mailto
Regards
--
- <https://jorgemorais.gitlab.io/justice-for-rms/>
- I am Brazilian. I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-02 14:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-02 0:55 RFC: desktop entry for xdg-email Antoine Beaupré
2019-11-02 2:49 ` Daniel Kahn Gillmor
2019-11-02 14:37 ` Jorge P. de Morais Neto
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).