[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML rendering and docview not

From: Tomas Nordin
Subject: Re: HTML rendering and docview not
Date: Sat, 13 May 2017 20:15:00 +0200

Emanuel Berg <address@hidden> 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
I learned that one can get suggestions in a similar manner by going into
the future history, using M-n. Again, awesome. (see

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]