OK, so here is what I have done that seems to have resolved the issue. Let me add the disclaimer that I tried a lot of things, so it is possible that I did something else that affected the outcome, but is not listed here, but I am trying to include all the relevant steps.
All of this is for emacs 26.1
2) was the easier, including the line
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
in .emacs
did the job. The idea of doing this came from @Manuel Uberti's answer to another question.
To solve issue 1) I tried his other suggestion, but that does not seem to work with the newest emacs version, but a variation of it led to a solution.
So, first one needs to add okular
to the TeX-view-program-list variable. This can be done by M-x customize-variable
. One little trick is that one has to add the command at two places, once for "command" and once, after selecting "one executable" for that.
Next, set the TeX-view-program-selection variable to okular. An important detail is that one needs to choose it from a dropdown menu and trying to write it directly from .emacs
doesn't help. I also had to restart emacs to have it listed. I suppose one can do a refresh instead.
As far as the auctex integration is concerned, it must be included in the emacs26 package, because I uninstalled the version (11.91) that I had installed using synaptic. In emacs25, the listed package version is 12.1. I guess the alternative is that (k)ubuntu is behind in including it in their distro. Perhaps I should add that the latest emacs in synaptic (or rather ubuntu) is version 25.2, I installed emacs version 26.1 from the gnu.org source file.
M-x list-packages
to see what is available by default, and checkout some threads that describe how to add other source data bases to the package manager such as MELPA. I would suggest first getting AucTeX installed and then see if any of your questions are still relevant ... If you successfully install AucTeX and the questions are still relevant, then please edit the question title and the body of the question and clarify what issues remain unresolved.tab
have been changed towindow
, which is Emacs lingo...