Since I moved to emacs 25 (25.3.2 at the moment) in every context (org-mode, gnus, latex, browsing url, direct access to file) I access pdf-files in emacs, they are displayed in doc-view. I basically would want in all cases except the last one display them in my system pdf viewer or the viewer in my mailcap file. And I would prefer an easy way to achieve this.
I found four suggestions so far to achieve this. Three of them work well for org-mode, browsing, not so well for gnus and not at all for latex.
You find them here: https://lists.gnu.org/archive/html/info-gnus-english/2016-04/msg00001.html (adding "(require 'mailcap)" before), here: https://lists.gnu.org/archive/html/info-gnus-english/2016-04/msg00002.html and here: Org-mode: How to disable automatic doc-view on emacs-25
All three proposals work well for org-mode and browsing, but for gnus there is an annoying problem: If I click on a pdf link in gnus the pdf file is displayed twice. (Also: internal and external view lead to the same external viewer. I would prefer if external view would lead to my system choice and internal view to doc-view, which would be consistent with the idea of "internal" and "external".)
None of the three proposals lead to a change in the case of the display of pdf files in the context of latex. For this (fourth suggestion) I have to install auctex and set the variable "TeX View Progam Selection" for "output-pdf" to the desired program.
Any suggestion how I could have pdf files displayed in my external viewer of choice in org-mode, url-browsing and gnus, but shown only once in all cases, including gnus?
Any suggestion how I could I revert in a simple way to a situation where pdf files a are never shown in doc-view but always in my system choice or my mailcap file? (Of course allways only once.)
Any suggestion how I could achieve in a simple way the ideal solution: org-mode and url browsing display pdf files with my system/mailcap viewer; gnus display pdf files with my system/maildcap viewer if I click them or if I ask for external view, but with doc-view if I ask for internal display; latex displays compiled pdf files in my system/mailcap viewer; opening a pdf file directly in emacs opens it in doc-view.