From: "Rudolf Adamkovič" <salutis@me.com>
To: Jean Louis <bugs@gnu.support>, Ag Ibragimov <agzam.ibragimov@gmail.com>
Cc: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org
Subject: Re: 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly
Date: Wed, 26 Oct 2022 15:00:02 +0200 [thread overview]
Message-ID: <m2k04m210t.fsf@me.com> (raw)
In-Reply-To: <Y1jvkOKVVmnvi6Np@protected.localdomain>
Jean Louis <bugs@gnu.support> writes:
>> This should be trivial to do, I think.
+1 and I say: consider contributing to EWW!
I noticed that the EWW manual says
PDFs are viewed inline, by default, with doc-view-mode, but this can
be customized by using the mailcap (see mailcap in Emacs MIME Manual)
mechanism, in particular mailcap-mime-data.
For some reason, it made me think that EWW uses MIME correctly.
So, I evaluated
(add-to-list 'mailcap-mime-data
(list "org"
(cons 'viewer 'org-mode)
(cons 'type "text/x-org")))
but it did not work. What the hack!
To satisfy my curiosity, I decided to look at the source code.
In eww.el, the eww-render procedure parses the content-type header and
stores its value in a local let binding. After that, it dispatches to
the various "display" procedures EWW comes with, such as
((equal (car content-type) "application/pdf")
(eww-display-pdf))
The eww-display-pdf procedure then looks up the MIME viewer for the
application/pdf MIME type specifically.
If no dispatch fits, EWW ends up calling eww-display-raw.
TL;DR EWW hard-codes a couple of MIME types.
You could improve the situation in various ways.
For example, you could
(1) patch EWW to expose the eww-content-type for the user to use, or
(2) patch EWW to look up MIME for not just the PDF.
You could hack something local to you as well, but a patch would make
EWW better for all of us. So, win-win!
Rudy
--
"Programming reliably -- must be an activity of an undeniably
mathematical nature […] You see, mathematics is about thinking, and
doing mathematics is always trying to think as well as possible."
-- Edsger W. Dijkstra, 1981
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
next prev parent reply other threads:[~2022-10-26 13:00 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 12:06 29.0.50; [WISH]: Let us make EWW browse WWW Org files correctly Jean Louis
2022-10-25 15:02 ` Dr. Arne Babenhauserheide
2022-10-25 19:56 ` bug#58774: " Jean Louis
2022-10-25 19:56 ` Jean Louis
2022-10-25 21:54 ` Dr. Arne Babenhauserheide
2022-10-26 7:57 ` bug#58774: " Jean Louis
2022-10-26 7:57 ` Jean Louis
2022-10-26 11:55 ` bug#58774: " Dr. Arne Babenhauserheide
2022-10-26 11:55 ` Dr. Arne Babenhauserheide
2022-10-26 12:20 ` Jean Louis
2022-10-26 12:45 ` bug#58774: " Andreas Schwab
2022-10-26 12:45 ` Andreas Schwab
2022-10-26 13:19 ` bug#58774: " Jean Louis
2022-10-26 13:55 ` Andreas Schwab
2022-10-26 13:55 ` Andreas Schwab
2022-10-26 17:36 ` Jean Louis
2022-10-27 7:58 ` Andreas Schwab
2022-10-27 8:40 ` Jean Louis
2022-10-27 11:22 ` Andreas Schwab
2022-10-27 11:22 ` Andreas Schwab
2022-10-27 11:23 ` Dr. Arne Babenhauserheide
2022-10-27 11:23 ` Dr. Arne Babenhauserheide
2022-10-27 8:40 ` Jean Louis
2022-10-27 7:58 ` Andreas Schwab
2022-10-26 17:36 ` Jean Louis
2022-10-26 13:19 ` Jean Louis
2022-10-26 7:59 ` Jean Louis
2022-10-26 7:59 ` Jean Louis
2022-10-25 23:03 ` Ihor Radchenko
2022-10-26 6:07 ` bug#58774: " Stefan Kangas
2022-10-26 6:52 ` Ihor Radchenko
2022-10-26 6:52 ` Ihor Radchenko
2022-10-26 8:24 ` Jean Louis
2022-10-26 8:24 ` Jean Louis
2022-10-26 20:22 ` indieterminacy
2022-10-26 20:22 ` indieterminacy
2022-10-26 11:30 ` Dr. Arne Babenhauserheide
2022-10-26 21:41 ` Tim Cross
2022-10-27 10:43 ` Dr. Arne Babenhauserheide
2022-10-26 11:30 ` Dr. Arne Babenhauserheide
2022-10-26 13:15 ` Stefan Kangas
2022-10-26 13:15 ` Stefan Kangas
2022-10-26 8:21 ` Jean Louis
2022-10-26 8:21 ` Jean Louis
2022-10-26 17:07 ` Max Nikulin
2022-10-26 17:07 ` Max Nikulin
2022-10-26 18:37 ` Jean Louis
2022-10-26 18:37 ` Jean Louis
2022-10-26 21:16 ` Dr. Arne Babenhauserheide
2022-10-26 21:16 ` Dr. Arne Babenhauserheide
2022-10-27 4:25 ` tomas
2022-10-27 11:10 ` Dr. Arne Babenhauserheide
2022-10-26 21:56 ` indieterminacy
2022-10-26 21:56 ` indieterminacy
2022-10-26 20:00 ` Tim Cross
2022-10-26 6:07 ` Stefan Kangas
2022-10-25 22:13 ` Ag Ibragimov
2022-10-26 8:28 ` Jean Louis
2022-10-26 13:00 ` Rudolf Adamkovič [this message]
2022-10-26 13:42 ` bug#58774: " Jean Louis
2022-10-26 13:42 ` Jean Louis
2022-10-27 4:55 ` Jean Louis
2022-10-27 4:55 ` Jean Louis
2022-10-27 11:13 ` bug#58774: " Dr. Arne Babenhauserheide
2022-10-27 11:13 ` Dr. Arne Babenhauserheide
2022-10-27 17:41 ` bug#58774: " Jean Louis
2022-10-27 17:41 ` Jean Louis
2022-10-27 21:43 ` bug#58774: " Dr. Arne Babenhauserheide
2022-10-27 21:43 ` Dr. Arne Babenhauserheide
2022-10-27 15:35 ` bug#58774: " Max Nikulin
2022-10-27 17:58 ` Jean Louis
2022-10-27 17:58 ` Jean Louis
2022-10-27 21:49 ` Dr. Arne Babenhauserheide
2022-10-27 21:49 ` Dr. Arne Babenhauserheide
2022-10-27 18:25 ` Jean Louis
2022-10-27 18:25 ` Jean Louis
2022-10-27 19:53 ` Quiliro Ordóñez
2022-10-27 19:53 ` Quiliro Ordóñez
2022-10-27 19:58 ` Quiliro Ordóñez
2022-10-27 19:58 ` Quiliro Ordóñez
2022-10-27 21:57 ` Dr. Arne Babenhauserheide
2022-10-27 22:18 ` Jean Louis
2022-10-27 22:18 ` Jean Louis
2022-10-27 23:14 ` Dr. Arne Babenhauserheide
2022-10-27 23:14 ` Dr. Arne Babenhauserheide
2022-10-27 23:20 ` Ihor Radchenko
2022-10-28 8:28 ` Dr. Arne Babenhauserheide
2022-11-02 4:09 ` Ihor Radchenko
2022-11-02 4:09 ` Ihor Radchenko
2022-10-28 8:28 ` Dr. Arne Babenhauserheide
2022-10-27 23:20 ` Ihor Radchenko
2022-10-27 21:57 ` Dr. Arne Babenhauserheide
2022-10-27 15:35 ` Max Nikulin
2023-09-02 8:53 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k04m210t.fsf@me.com \
--to=salutis@me.com \
--cc=agzam.ibragimov@gmail.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=bugs@gnu.support \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.