I read somewhere the two files were interchangeable, so I cut/paste the content of the former, shown below, to the latter. But then Xreader was missing when I tried to view a document generated by AUCTEX, which tells me they are not interchangeable.
(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-view-program-list (quote
(("Xreader" ("xreader %o") "xreader")))) '(TeX-view-program-selection
(quote
(((output-dvi has-no-display-manager)
"dvi2tty")
((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-pdf "Xreader")
(output-html "xdg-open"))))) (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. ) (put 'upcase-region 'disabled nil)
What are the different purposes of .emacs and .emacs.d/init.el?
UPDATE:
Here's the content of .emacs.d/init.el after the modification discussed above:
(require 'package)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(require 'org)
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(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-view-program-list (quote (("Xreader" ("xreader %o") "xreader"))))
'(TeX-view-program-selection
(quote
(((output-dvi has-no-display-manager)
"dvi2tty")
((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-pdf "Xreader")
(output-html "xdg-open")))))
(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.
)
(put 'upcase-region 'disabled nil)

~/.emacsfile then~/.emacs.d/init.elwill not be read at all. – phils Feb 21 '19 at 00:28.emacsto.emacs.d/init.eland deleted the former, and that does not solve the problem. The suggested post is that from which I got the idea to put init code in the second file. – Feb 21 '19 at 01:32C-h v TeX-view-program-listandC-h v TeX-view-program-selectioninclude your Xreader values? If so your problem is presumably something other than that config. – phils Feb 21 '19 at 02:43custom-set-variablesset only in.emacs, the value of the first variable is(("Xreader" ("xreader %o") "xreader")). With.emacs.d/init.elset only incustom-set-variables, the same command returns 'no match'. This is consistent with the problem I have described. – Feb 21 '19 at 04:22C-h v user-init-fileshow you what you expect? – phils Feb 21 '19 at 05:36/home/er/.emacc, which is not a file that exists. – Feb 21 '19 at 06:41.emacs.dis/home/er/.emacs.d, right? If not, it should be! – Fran Burstall Feb 21 '19 at 07:16.emaccwas a typo on your part? Yes, clearly Emacs sees your home directory as/home/er/, so/home/er/.emacs.dis correct. Check file permissions? If~/.emacs.d/init.elisn't readable by Emacs, it would fall back to the default~/.emacspath (whether or not that latter file exists). – phils Feb 21 '19 at 07:28~/.emacs.d $ echo $PWDprints/home/er/.emacs.d. File permissions of either.emacsand/emacs.d/init.elare -rw-rw-r-- – Feb 21 '19 at 07:33