Working in Ubuntu with Emacs/Auctex, I switched to Okular because it has a night-mode with less contrast than simply inverting colors. I added the following lines in my .emacs file following this suggestion:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(TeX-source-correlate-method (quote synctex))
'(TeX-source-correlate-mode t)
'(TeX-source-correlate-start-server t)
'(TeX-view-program-selection (quote (((output-dvi has-no-display-manager) "dvi2tty") ((output-dvi style-pstricks) "dvips and gv") (output-pdf "Okular") (output-dvi "xdvi") (output-pdf "Evince") (output-html "xdg-open"))))
'(delete-selection-mode nil)
'(mark-even-if-inactive t)
'(scroll-bar-mode (quote right))
'(transient-mark-mode 1))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
However, now I am unable to work on multiple projects across multiple workspaces:
If I have A.pdf open in workspace A, then ask emacs to open B.pdf in workspace B, my system jumps back to workspace A, closes A.pdf, and opens B.pdf in the existing window instead of opening B.pdf in a new window in workspace B.
Is there a way to amend this behaviour? I don't mind giving up forward and backward search for it.
My question relates to the following previous questions: link 1, link 2, link 3
edit: I can work around my problem by opening the pdfs manually and never invoking the view command from emacs. In that sense the problem is not critical, but it would still be nice to have a proper fix.