[ESS] How to Duplicate Previous Functionality/Workflow

Tyler Smith ty|er @end|ng |rom p|@nt@rum@c@
Fri Sep 22 04:32:26 CEST 2023


On Thu, Sep 21, 2023, at 9:43 PM, Bassett Jr,Roland L via ESS-help wrote:
>
>   1.  How can I customize the exporter to use my preferred PDF viewer 
> (evince) instead of DocView?

I think the current default is for Emacs to open the exported file itself. To change this, you need to configure Emacs to send pdf files to an external program to open. You can do this with the `openwith` package:

  (require 'openwith)
  (openwith-mode t)
  (setq openwith-associations '(("\\.pdf\\'" "evince" (file))))

You'll need to install `openwith`. It's available on Melpa (https://melpa.org/#/?q=openwith). 

Note this will make Emacs do this for all pdf files, not just ones from polymode. So if you use Docview to open pdf files in other contexts, this won't work anymore. 

(You probably didn't do this, because Docview isn't great for pdfs. The now abandoned package pdf-tools was a great option for reading pdfs inside Emacs).

See also: 

https://emacs.stackexchange.com/questions/3105/how-to-use-an-external-program-as-the-default-way-to-open-pdfs-from-emacs

- ty



More information about the ESS-help mailing list