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)
~/.emacs
file then~/.emacs.d/init.el
will not be read at all. – phils Feb 21 '19 at 00:28.emacs
to.emacs.d/init.el
and 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-list
andC-h v TeX-view-program-selection
include your Xreader values? If so your problem is presumably something other than that config. – phils Feb 21 '19 at 02:43custom-set-variables
set only in.emacs
, the value of the first variable is(("Xreader" ("xreader %o") "xreader"))
. With.emacs.d/init.el
set 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-file
show 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.d
is/home/er/.emacs.d
, right? If not, it should be! – Fran Burstall Feb 21 '19 at 07:16.emacc
was a typo on your part? Yes, clearly Emacs sees your home directory as/home/er/
, so/home/er/.emacs.d
is correct. Check file permissions? If~/.emacs.d/init.el
isn't readable by Emacs, it would fall back to the default~/.emacs
path (whether or not that latter file exists). – phils Feb 21 '19 at 07:28~/.emacs.d $ echo $PWD
prints/home/er/.emacs.d
. File permissions of either.emacs
and/emacs.d/init.el
are -rw-rw-r-- – Feb 21 '19 at 07:33