With my Emacs 26.1 on my 10.13.6 Mac, I want Emacs to systemically open my file located at /Users/ewandelanoy/Documents/html_files/Printable/latinized_agreda2.txt with the mac-roman-mac encoding, without changing Emacs' normal behavior on other files.
Following the advice given in this answer, I added the line (modify-coding-system-alist "/Users/ewandelanoy/Documents/html_files/Printable/latinized_agreda2.txt" 'mac-roman-mac) to my init.el file, but it seems that this is incorrect since when I restart emacs I get the following (somewhat unclear) error message :
Warning (initialization): An error occurred while loading ‘/Users/ewandelanoy/.emacs.d/init.el’: Wrong number of arguments: #[(target-type regexp coding-system) \306>\204�\307\310"\210 ;\204 �\311=\203� \250\204 �\307\312 "\210 9\2036�\313 !\204@�\314 !\210 \211B\202@�\314 @!\210\314 A!\210\315\267\202v�\316 "\211\203U� \241\202\� BB\211)\207\316 "\211\203m� \241\202t� B B\211)\207\316 "\211\203\206� \241\202\217� BB\211)\207 [target-type regexp coding-system file-coding-system-alist slot process-coding-system-alist (file process network) error Invalid target type: %s network Invalid regular expression: %s fboundp check-coding-system #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (file 70 process 94)) assoc network-coding-system-alist] 4 2267173], 2 To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace. When I start Emacs with the --debug-init option as advised, I get the following error message :
Debugger entered--Lisp error: (void-function global-linum-mode) (global-linum-mode t) eval-buffer(#<buffer *load*<2>> nil "/Users/ewandelanoy/Documents/Bash_scripts/init.el" nil t) ; Reading at buffer posit$ load-with-code-conversion("/Users/ewandelanoy/Documents/Bash_scripts/init.el" "/Users/ewandelanoy/Documents/Bash_scripts/i$ load("~/Documents/Bash_scripts/init.el") eval-buffer(#<buffer *load*> nil "/Users/ewandelanoy/.emacs.d/init.el" nil t) ; Reading at buffer position 42 load-with-code-conversion("/Users/ewandelanoy/.emacs.d/init.el" "/Users/ewandelanoy/.emacs.d/init.el" t t) load("/Users/ewandelanoy/.emacs.d/init" t t) #[nil "^H\205\276^@ \306=\203^Q^@\307^H\310Q\202A^@ \311=\2033^@\312\307\313\314#\203#^@\315\202A^@\312\307\313\316#\203$ command-line() normal-top-level() The second error message is not really any clearer than the first. What did I do wrong ?