1

How can I make sure that Emacs opens files with extension *.rec as normal text files?

When I try to open a file with the extnsion *.rec, I get the error message Running someFile.rec...done without the file being opened.

Screenshot

I assume that rec-mode is not installed because its status is Available from gnu (see below).

Status of the rec-mode package

What can I do in order for Emacs to open *.rec files as plain, normal text files?

Drew
  • 75,699
  • 9
  • 109
  • 225
Glory to Russia
  • 225
  • 2
  • 9
  • 2
    Check the variable `auto-mode-alist`. – NickD Nov 21 '20 at 14:26
  • Does this answer your question? [Make emacs automatically open binary files in hexl-mode](https://emacs.stackexchange.com/questions/10277/make-emacs-automatically-open-binary-files-in-hexl-mode) – Drew Nov 21 '20 at 23:13
  • @Drew My rec files are not binary, they are text files with the extension `rec`. – Glory to Russia Nov 22 '20 at 08:31
  • That doesn't matter. `auto-mode-alist` is for any extension and mode. Please consult the doc, and please read that duplicate Q&A. – Drew Nov 22 '20 at 16:07

2 Answers2

2

To tell Emacs that *.rec files should be opened in text-mode:

(add-to-list 'auto-mode-alist '("\\.rec\\'" . text-mode))
phils
  • 48,657
  • 3
  • 76
  • 115
1

Use M-x find-file-literally Emacs will use fundamental-mode as the major mode. Then change to txt mode.

Paul Brennan
  • 111
  • 3