I found here that the following disables DocView mode for a specific file type, like PDF:
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . fundamental-mode))
But how can DocView mode be disabled completely, for any file type? (on GNU Emacs 26.1)
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Other than the
(rassq-delete-all #'doc-view-mode-maybe auto-mode-alist) suggested by Tyler (but note you need to use
...-maybe), you can also be more drastic:
;; Die, Doc-View-mode! die! (defalias 'doc-view-mode #'doc-view-fallback-mode) ;Or fundamental-mode, ...