From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: Re: HTML rendering and docview not Date: Sat, 13 May 2017 20:15:00 +0200 Message-ID: <87mvagpqsb.fsf@fliptop> References: <87y3u5ohae.fsf@fliptop> <87r2zxnw8c.fsf@fliptop> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494699353 19411 195.159.176.226 (13 May 2017 18:15:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 May 2017 18:15:53 +0000 (UTC) To: Emanuel Berg , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 13 20:15:47 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9bZy-0004u2-NS for geh-help-gnu-emacs@m.gmane.org; Sat, 13 May 2017 20:15:46 +0200 Original-Received: from localhost ([::1]:58531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9ba1-0000Nk-IJ for geh-help-gnu-emacs@m.gmane.org; Sat, 13 May 2017 14:15:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9bZX-0000Ne-Rn for help-gnu-emacs@gnu.org; Sat, 13 May 2017 14:15:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9bZU-00085N-Nt for help-gnu-emacs@gnu.org; Sat, 13 May 2017 14:15:19 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:33223) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d9bZU-0007uS-Gj for help-gnu-emacs@gnu.org; Sat, 13 May 2017 14:15:16 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CF5FD2042E for ; Sat, 13 May 2017 20:15:04 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3wQFPL5LbLzyqC; Sat, 13 May 2017 20:15:02 +0200 (CEST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113025 Archived-At: Emanuel Berg 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