From: Tomas Nordin <tomasn@posteo.net>
To: Emanuel Berg <moasen@zoho.com>, help-gnu-emacs@gnu.org
Subject: Re: HTML rendering and docview not
Date: Sat, 13 May 2017 20:15:00 +0200 [thread overview]
Message-ID: <87mvagpqsb.fsf@fliptop> (raw)
In-Reply-To: <yw.86fugdp9pu.fsf@zoho.com>
Emanuel Berg <moasen@zoho.com> writes:
> Without using whatever it is you are using, you
Do you mean notmuch. I use notmuch, it shares a lot with Gnus in how it
displays messages I think.
> can always browse the code for the function that brings up the PDF. It
> should pretty early extract or assemble a path (or URL?) to that file,
> and you can use this function do to the very same, only you use it as
> an argument to an external process wich runs xpdf, evince or whatever
> you want instead. It should be a two-or-three line interface/wrapper,
> or so!
I didn't find it so easy. I figured out that if I fiddle with the
variable mailcap-mime-data in the following way, doc-view-mode will not
be used by notmuch-show-view-part.
(eval-after-load 'notmuch-show
;; disable docview as a viewer by the test in mailcap-mime-data
;; has no effect in a dired buffer
'(dolist (minor (cdr (assoc "application" mailcap-mime-data)))
(if (equal (cdr (assoc 'viewer minor)) 'doc-view-mode)
(setcdr (assoc 'test minor) '(and nil t)))))
(there seem to be something wrong with the notmuch mailing list)
I think this variable (mailcap-mime-data) might be pending some
customize options, I don't know. On the way I learned some stuff
new. For example this function, notmuch-show-view-part, is behind a
prefix `.' followed by a `v'. There is another follower `o', which /lets
me pick a viewer by M-n/, awesome. It gives alternatives from the
mailcap config files and probably something more.
Also, everybody knows about the shebang in a dired buffer on a filename
`!'. But from a write-up by Drew
https://emacs.stackexchange.com/questions/3105/how-to-use-an-external-program-as-the-default-way-to-open-pdfs-from-emacs
I learned that one can get suggestions in a similar manner by going into
the future history, using M-n. Again, awesome. (see
dired-guess-shell-alist-default)
Feeling of control restored, no reason to panic.
Still, if, say I would like to (for some reason) visit a typical
doc-view file for editing, starting from a dired buffer, I actually
don't really know how to do. (if not using C-c C-c via doc-view-mode
that is). Ok, one way is to start emacs -nw I just realized.
I am tempted to make a poll somehow. Assume point on a "doc" kind of
filename, what is the dwim when user hit RET?
Best regards
--
Tomas
next prev parent reply other threads:[~2017-05-13 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 21:24 HTML rendering and docview not Tomas Nordin
2017-05-10 4:58 ` Tomas Nordin
2017-05-10 5:22 ` Emanuel Berg
2017-05-13 18:15 ` Tomas Nordin [this message]
2017-05-15 21:53 ` Emanuel Berg
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvagpqsb.fsf@fliptop \
--to=tomasn@posteo.net \
--cc=help-gnu-emacs@gnu.org \
--cc=moasen@zoho.com \
/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.
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).