syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.61k stars 4.89k forks source link

Spacemacs auto-mode-alist appears to be disabled #5732

Closed pmwhite closed 8 years ago

pmwhite commented 8 years ago

Description

I've been having this trouble for a little while. Whenever I open a new file in spacemacs, it always opens in fundamental mode. I'm on a clean install of spacemacs on windows 10 if that matters.

To see what the content of auto-mode-alist was, I opened the scratch buffer, started an inferior emacs lisp, typed the variable name, and pressed enter. I saw a lot of output, the first of which was the association of .el files with emacs-lisp-mode. So I tried opening a new .el file, but I still got fundamental mode. I then set auto-mode-alist to contain just the association of .el files with emacs-lisp-mode. I opened another new file, but I got the same result.

Note, non-spacemacs emacs works fine.

I should also note that when I open a file with windows line endings, I see lovely ^M characters at the end of all the lines. Without spacemacs, emacs picks up on the line endings and acts appropriately by hiding them.

Reproduction guide

I cloned the repo (I tried for both the master and develop branch). I set the HOME variable to the directory I had clone them into. I start emacs with emacs --insecure I waited until spacemacs was all set up. I opened an org file and a .*el file. Neither worked.

Also...

Because the steps are basically just the installation steps, I don't think it will be easy to reproduce the issue, otherwise someone would have reported it already.

So here is a question: is there a way to disable the auto mode choosing of emacs? Is there a setting that could possible interfere with it that I might have accidentally somehow set (but I'm on a clean spacemacs, so I don't know how it would happen)?

syl20bnr commented 8 years ago

Can you paste the content of SPC h d v auto-mode-alist RET you get when Emacs has finished to load ?

Also did you start with a fresh .spacemacs file ? What is your Emacs version and where did you find the binaries ?

pmwhite commented 8 years ago

Yup, fresh .spacemacs file. The emacs version I'm using is from the gnu website I believe, but I've also had this problem with a build from http://emacsbinw64.sourceforge.net/ (it was still emacs 24 though)

auto-mode-alist is a variable defined in `files.el'.
Its value is shown below.

  This variable may be risky if used as a file-local variable.

Documentation:
Alist of filename patterns vs corresponding major mode functions.
Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL).
(NON-NIL stands for anything that is not nil; the value does not matter.)
Visiting a file whose name matches REGEXP specifies FUNCTION as the
mode function to use.  FUNCTION will be called, unless it is nil.

If the element has the form (REGEXP FUNCTION NON-NIL), then after
calling FUNCTION (if it's not nil), we delete the suffix that matched
REGEXP and search the list again for another match.

The extensions whose FUNCTION is `archive-mode' should also
appear in `auto-coding-alist' with `no-conversion' coding system.

See also `interpreter-mode-alist', which detects executable script modes
based on the interpreters they specify to run,
and `magic-mode-alist', which determines modes based on file contents.

Value: (("\\*.el\\'" . emacs-lisp-mode)
 ("\\(\\.e?ya?ml$\\|\\.\\(yml\\|yaml\\)\\'\\|Procfile\\'\\)" lambda nil
  (configuration-layer//auto-mode 'yaml 'yaml-mode))
 ("\\(\\.ps[dm]?1\\'\\|\\.ps1$\\)" lambda nil
  (configuration-layer//auto-mode 'windows-scripts 'powershell-mode))
 ("\\(\\.bat$\\)" lambda nil
  (configuration-layer//auto-mode 'windows-scripts 'dos-mode))
 ("\\(_vimperatorrc\\'\\|_pentadactylrc\\'\\|\\.penta\\'\\|vimperatorrc\\'\\|\\.vimp\\'\\|pentadactylrc\\'\\)" lambda nil
  (configuration-layer//auto-mode 'vimscript 'dactyl-mode))
 ("\\(\\.vim\\'\\|[._]?g?vimrc\\'\\|\\.exrc\\'\\|_vimrc\\'\\|\\.vim[rc]?\\'\\)" lambda nil
  (configuration-layer//auto-mode 'vimscript 'vimrc-mode))
 ("\\(\\.ts$\\)" lambda nil
  (configuration-layer//auto-mode 'typescript 'typescript-mode))
 ("\\(\\.fish\\'\\|/fish_funced\\..*\\'\\)" lambda nil
  (configuration-layer//auto-mode 'shell-scripts 'fish-mode))
 ("\\(\\.swift\\'\\)" lambda nil
  (configuration-layer//auto-mode 'swift 'swift-mode))
 ("\\(\\.sql\\'\\)" lambda nil
  (configuration-layer//auto-mode 'sql 'sql-mode))
 ("\\(\\.s\\(ml\\|ig\\)\\'\\|\\.\\(sml\\|sig\\)\\'\\)" lambda nil
  (configuration-layer//auto-mode 'sml 'sml-mode))
 ("\\(\\.toml$\\)" lambda nil
  (configuration-layer//auto-mode 'rust 'toml-mode))
 ("\\(\\.rs\\'\\)" lambda nil
  (configuration-layer//auto-mode 'rust 'rust-mode))
 ("\\(\\(?:\\.rb\\|ru\\|rake\\|thor\\|jbuilder\\|gemspec\\|podspec\\|/\\(?:Gem\\|Rake\\|Cap\\|Thor\\|Vagrant\\|Guard\\|Pod\\)file\\)\\'\\|Puppetfile\\)" lambda nil
  (configuration-layer//auto-mode 'ruby 'ruby-mode))
 ("\\(\\.http\\'\\)" lambda nil
  (configuration-layer//auto-mode 'restclient 'restclient-mode))
 ("\\(\\.rkt[dl]?\\'\\)" lambda nil
  (configuration-layer//auto-mode 'racket 'racket-mode))
 ("\\(\\.py\\'\\)" lambda nil
  (configuration-layer//auto-mode 'python 'python-mode))
 ("\\(\\.pip\\'\\|requirements\\(?:.\\|\n\\)*\\.txt\\'\\)" lambda nil
  (configuration-layer//auto-mode 'python 'pip-requirements-mode))
 ("\\(\\.hy\\'\\)" lambda nil
  (configuration-layer//auto-mode 'python 'hy-mode))
 ("\\(\\.pyx\\'\\|\\.pxd\\'\\|\\.pxi\\'\\)" lambda nil
  (configuration-layer//auto-mode 'python 'cython-mode))
 ("\\(\\.purs\\'\\)" lambda nil
  (configuration-layer//auto-mode 'purescript 'purescript-mode))
 ("\\(\\.amk\\'\\|/Amkfile\\'\\|\\.phtml\\'\\|\\.php[s345t]?\\'\\|[^/]\\.\\(module\\|test\\|install\\|profile\\|tpl\\.php\\|theme\\|inc\\)\\'\\|\\.php\\'\\)" lambda nil
  (configuration-layer//auto-mode 'php 'php-mode))
 ("\\(\\.ml[ip]?\\'\\|\\.eliomi?\\'\\)" lambda nil
  (configuration-layer//auto-mode 'ocaml 'tuareg-mode))
 ("\\(\\.markdown\\'\\|\\.md\\'\\|\\.m[k]d\\)" lambda nil
  (configuration-layer//auto-mode 'markdown 'markdown-mode))
 ("\\(\\.m\\'\\)" lambda nil
  (configuration-layer//auto-mode 'octave 'octave-mode))
 ("\\(nginx\\.conf\\'\\|/nginx/.+\\.conf\\'\\)" lambda nil
  (configuration-layer//auto-mode 'nginx 'nginx-mode))
 ("\\(\\.lua$\\|\\.lua\\'\\)" lambda nil
  (configuration-layer//auto-mode 'lua 'lua-mode))
 ("\\(\\.json$\\)" lambda nil
  (configuration-layer//auto-mode 'javascript 'json-mode))
 ("\\(\\.js\\'\\)" lambda nil
  (configuration-layer//auto-mode 'javascript 'js2-mode))
 ("\\(\\.coffee\\'\\|\\.iced\\'\\|Cakefile\\'\\|\\.cson\\'\\)" lambda nil
  (configuration-layer//auto-mode 'javascript 'coffee-mode))
 ("\\(\\.idr$\\|\\.lidr$\\)" lambda nil
  (configuration-layer//auto-mode 'idris 'idris-mode))
 ("\\(\\.phtml\\'\\|\\.tpl\\.php\\'\\|\\.twig\\'\\|\\.html\\'\\|\\.htm\\'\\|\\.[gj]sp\\'\\|\\.as[cp]x?\\'\\|\\.eex\\'\\|\\.erb\\'\\|\\.mustache\\'\\|\\.handlebars\\'\\|\\.hbs\\'\\|\\.eco\\'\\|\\.ejs\\'\\|\\.djhtml\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'web-mode))
 ("\\(\\.slim\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'slim-mode))
 ("\\(\\.scss\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'scss-mode))
 ("\\(\\.sass\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'sass-mode))
 ("\\(\\.less\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'less-css-mode))
 ("\\(\\.jade\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'jade-mode))
 ("\\(\\.haml\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'haml-mode))
 ("\\(\\.css\\'\\)" lambda nil
  (configuration-layer//auto-mode 'html 'css-mode))
 ("\\(\\.[gh]s\\'\\|\\.hsc\\'\\)" lambda nil
  (configuration-layer//auto-mode 'haskell 'haskell-mode))
 ("\\(\\.cmm\\'\\)" lambda nil
  (configuration-layer//auto-mode 'haskell 'cmm-mode))
 ("\\(\\.dot\\'\\|\\.gv\\'\\|\\.diag\\'\\|\\.blockdiag\\'\\|\\.nwdiag\\'\\|\\.rackdiag\\'\\)" lambda nil
  (configuration-layer//auto-mode 'graphviz 'graphviz-dot-mode))
 ("\\(\\.go\\'\\)" lambda nil
  (configuration-layer//auto-mode 'go 'go-mode))
 ("\\(\\.fs[iylx]?$\\)" lambda nil
  (configuration-layer//auto-mode 'fsharp 'fsharp-mode))
 ("\\(\\.\\(ledger\\|ldg\\)\\'\\)" lambda nil
  (configuration-layer//auto-mode 'finance 'ledger-mode))
 ("\\(\\.erl$\\|\\.app\\.src$\\|\\.escript\\|\\.hrl$\\|\\.xrl$\\|\\.yrl\\|/ebin/.+\\.app\\|\\.erl\\'\\|\\.hrl\\'\\)" lambda nil
  (configuration-layer//auto-mode 'erlang 'erlang-mode))
 ("\\(\\.elm\\'\\)" lambda nil
  (configuration-layer//auto-mode 'elm 'elm-mode))
 ("\\.\\(ex\\|exs\\|elixir\\)\\'" lambda nil
  (configuration-layer//auto-mode 'elixir 'elixir-mode))
 ("\\(\\.d[i]?\\'\\)" lambda nil
  (configuration-layer//auto-mode 'd 'd-mode))
 ("\\(\\.[Cc][Ss][Vv]\\'\\)" lambda nil
  (configuration-layer//auto-mode 'csv 'csv-mode))
 ("\\(\\.cljx\\)" lambda nil
  (configuration-layer//auto-mode 'clojure 'clojurex-mode))
 ("\\(\\.cljc\\)" lambda nil
  (configuration-layer//auto-mode 'clojure 'clojurec-mode))
 ("\\(\\.cljs\\)" lambda nil
  (configuration-layer//auto-mode 'clojure 'clojurescript-mode))
 ("\\(\\.\\(clj\\|dtm\\|edn\\)\\'\\|\\(?:build\\|profile\\)\\.boot\\'\\|\\.boot\\'\\)" lambda nil
  (configuration-layer//auto-mode 'clojure 'clojure-mode))
 ("\\(\\.ahk\\'\\|\\.ahk$\\)" lambda nil
  (configuration-layer//auto-mode 'autohotkey 'ahk-mode))
 ("\\(\\.adoc?$\\)" lambda nil
  (configuration-layer//auto-mode 'asciidoc 'adoc-mode))
 ("\\(\\.jinja2\\'\\|\\.j2\\'\\)" lambda nil
  (configuration-layer//auto-mode 'ansible 'jinja2-mode))
 ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file)
 ("\\.elc\\'" . emacs-lisp-byte-code-mode)
 ("\\.dz\\'" nil jka-compr)
 ("\\.xz\\'" nil jka-compr)
 ("\\.lzma\\'" nil jka-compr)
 ("\\.lz\\'" nil jka-compr)
 ("\\.g?z\\'" nil jka-compr)
 ("\\.bz2\\'" nil jka-compr)
 ("\\.Z\\'" nil jka-compr)
 ("\\.vr[hi]?\\'" . vera-mode)
 ("\\(?:\\.rb\\|ru\\|rake\\|thor\\|jbuilder\\|gemspec\\|podspec\\|/\\(?:Gem\\|Rake\\|Cap\\|Thor\\|Vagrant\\|Guard\\|Pod\\)file\\)\\'" . ruby-mode)
 ("\\.re?st\\'" . rst-mode)
 ("\\.py\\'" . python-mode)
 ("\\.awk\\'" . awk-mode)
 ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode)
 ("\\.idl\\'" . idl-mode)
 ("\\.java\\'" . java-mode)
 ("\\.m\\'" . objc-mode)
 ("\\.ii\\'" . c++-mode)
 ("\\.i\\'" . c-mode)
 ("\\.lex\\'" . c-mode)
 ("\\.y\\(acc\\)?\\'" . c-mode)
 ("\\.[ch]\\'" . c-mode)
 ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)
 ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)
 ("\\.\\(cc\\|hh\\)\\'" . c++-mode)
 ("\\.\\(bat\\|cmd\\)\\'" . bat-mode)
 ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode)
 ("\\.svgz?\\'" . image-mode)
 ("\\.svgz?\\'" . xml-mode)
 ("\\.x[bp]m\\'" . image-mode)
 ("\\.x[bp]m\\'" . c-mode)
 ("\\.p[bpgn]m\\'" . image-mode)
 ("\\.tiff?\\'" . image-mode)
 ("\\.gif\\'" . image-mode)
 ("\\.png\\'" . image-mode)
 ("\\.jpe?g\\'" . image-mode)
 ("\\.te?xt\\'" . text-mode)
 ("\\.[tT]e[xX]\\'" . tex-mode)
 ("\\.ins\\'" . tex-mode)
 ("\\.ltx\\'" . latex-mode)
 ("\\.dtx\\'" . doctex-mode)
 ("\\.org\\'" . org-mode)
 ("\\.el\\'" . emacs-lisp-mode)
 ("Project\\.ede\\'" . emacs-lisp-mode)
 ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode)
 ("\\.l\\'" . lisp-mode)
 ("\\.li?sp\\'" . lisp-mode)
 ("\\.[fF]\\'" . fortran-mode)
 ("\\.for\\'" . fortran-mode)
 ("\\.p\\'" . pascal-mode)
 ("\\.pas\\'" . pascal-mode)
 ("\\.\\(dpr\\|DPR\\)\\'" . delphi-mode)
 ("\\.ad[abs]\\'" . ada-mode)
 ("\\.ad[bs].dg\\'" . ada-mode)
 ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
 ("Imakefile\\'" . makefile-imake-mode)
 ("Makeppfile\\(?:\\.mk\\)?\\'" . makefile-makepp-mode)
 ("\\.makepp\\'" . makefile-makepp-mode)
 ("\\.mk\\'" . makefile-gmake-mode)
 ("\\.make\\'" . makefile-gmake-mode)
 ("[Mm]akefile\\'" . makefile-gmake-mode)
 ("\\.am\\'" . makefile-automake-mode)
 ("\\.texinfo\\'" . texinfo-mode)
 ("\\.te?xi\\'" . texinfo-mode)
 ("\\.[sS]\\'" . asm-mode)
 ("\\.asm\\'" . asm-mode)
 ("\\.css\\'" . css-mode)
 ("\\.mixal\\'" . mixal-mode)
 ("\\.gcov\\'" . compilation-mode)
 ("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode)
 ("-gdb\\.gdb" . gdb-script-mode)
 ("[cC]hange\\.?[lL]og?\\'" . change-log-mode)
 ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode)
 ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
 ("\\.scm\\.[0-9]*\\'" . scheme-mode)
 ("\\.[ck]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
 ("\\.bash\\'" . sh-mode)
 ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode)
 ("\\(/\\|\\`\\)\\.\\(shrc\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
 ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode)
 ("\\.m?spec\\'" . sh-mode)
 ("\\.m[mes]\\'" . nroff-mode)
 ("\\.man\\'" . nroff-mode)
 ("\\.sty\\'" . latex-mode)
 ("\\.cl[so]\\'" . latex-mode)
 ("\\.bbl\\'" . latex-mode)
 ("\\.bib\\'" . bibtex-mode)
 ("\\.bst\\'" . bibtex-style-mode)
 ("\\.sql\\'" . sql-mode)
 ("\\.m[4c]\\'" . m4-mode)
 ("\\.mf\\'" . metafont-mode)
 ("\\.mp\\'" . metapost-mode)
 ("\\.vhdl?\\'" . vhdl-mode)
 ("\\.article\\'" . text-mode)
 ("\\.letter\\'" . text-mode)
 ("\\.i?tcl\\'" . tcl-mode)
 ("\\.exp\\'" . tcl-mode)
 ("\\.itk\\'" . tcl-mode)
 ("\\.icn\\'" . icon-mode)
 ("\\.sim\\'" . simula-mode)
 ("\\.mss\\'" . scribe-mode)
 ("\\.f9[05]\\'" . f90-mode)
 ("\\.f0[38]\\'" . f90-mode)
 ("\\.indent\\.pro\\'" . fundamental-mode)
 ("\\.\\(pro\\|PRO\\)\\'" . idlwave-mode)
 ("\\.srt\\'" . srecode-template-mode)
 ("\\.prolog\\'" . prolog-mode)
 ("\\.tar\\'" . tar-mode)
 ("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
 ("\\.oxt\\'" . archive-mode)
 ("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode)
 ("\\`/tmp/Re" . text-mode)
 ("/Message[0-9]*\\'" . text-mode)
 ("\\`/tmp/fol/" . text-mode)
 ("\\.oak\\'" . scheme-mode)
 ("\\.sgml?\\'" . sgml-mode)
 ("\\.x[ms]l\\'" . xml-mode)
 ("\\.dbk\\'" . xml-mode)
 ("\\.dtd\\'" . sgml-mode)
 ("\\.ds\\(ss\\)?l\\'" . dsssl-mode)
 ("\\.js\\'" . javascript-mode)
 ("\\.json\\'" . javascript-mode)
 ("\\.[ds]?vh?\\'" . verilog-mode)
 ("\\.by\\'" . bovine-grammar-mode)
 ("\\.wy\\'" . wisent-grammar-mode)
 ("[]>:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode)
 ("\\`\\..*emacs\\'" . emacs-lisp-mode)
 ("[:/]_emacs\\'" . emacs-lisp-mode)
 ("/crontab\\.X*[0-9]+\\'" . shell-script-mode)
 ("\\.ml\\'" . lisp-mode)
 ("\\.ld[si]?\\'" . ld-script-mode)
 ("ld\\.?script\\'" . ld-script-mode)
 ("\\.xs\\'" . c-mode)
 ("\\.x[abdsru]?[cnw]?\\'" . ld-script-mode)
 ("\\.zone\\'" . dns-mode)
 ("\\.soa\\'" . dns-mode)
 ("\\.asd\\'" . lisp-mode)
 ("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode)
 ("\\.\\(as\\|mi\\|sm\\)2\\'" . snmpv2-mode)
 ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode)
 ("\\.\\(dif\\|pat\\)\\'" . diff-mode)
 ("\\.[eE]?[pP][sS]\\'" . ps-mode)
 ("\\.\\(?:PDF\\|DVI\\|OD[FGPST]\\|DOCX?\\|XLSX?\\|PPTX?\\|pdf\\|djvu\\|dvi\\|od[fgpst]\\|docx?\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe)
 ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode)
 ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode)
 ("BROWSE\\'" . ebrowse-tree-mode)
 ("\\.ebrowse\\'" . ebrowse-tree-mode)
 ("#\\*mail\\*" . mail-mode)
 ("\\.g\\'" . antlr-mode)
 ("\\.mod\\'" . m2-mode)
 ("\\.ses\\'" . ses-mode)
 ("\\.docbook\\'" . sgml-mode)
 ("\\.com\\'" . dcl-mode)
 ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode)
 ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode)
 ("\\.\\(?:desktop\\|la\\)\\'" . conf-unix-mode)
 ("\\.ppd\\'" . conf-ppd-mode)
 ("java.+\\.conf\\'" . conf-javaprop-mode)
 ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode)
 ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode)
 ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode)
 ("[cC]hange[lL]og[-.][-0-9a-z]+\\'" . change-log-mode)
 ("/\\.?\\(?:gnokiirc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode)
 ("/\\.\\(?:enigma\\|gltron\\|gtk\\|hxplayer\\|net\\|neverball\\|qt/.+\\|realplayer\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode)
 ("/\\.\\(?:gdbtkinit\\|grip\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode)
 ("/\\.?X\\(?:default\\|resource\\|re\\)s\\>" . conf-xdefaults-mode)
 ("/X11.+app-defaults/" . conf-xdefaults-mode)
 ("/X11.+locale/.+/Compose\\'" . conf-colon-mode)
 ("/X11.+locale/compose\\.dir\\'" . conf-javaprop-mode)
 ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t)
 ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t)
 ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode-maybe)
 ("\\.[1-9]\\'" . nroff-mode)
 ("\\.tgz\\'" . tar-mode)
 ("\\.tbz2?\\'" . tar-mode)
 ("\\.txz\\'" . tar-mode))
syl20bnr commented 8 years ago

Thank you, I don't think that auto-mode-alist is the cause, we have to look somewhere else.

Since you said that you started with a fresh .spacemacs file I have no idea where this bug comes from. This is dumb but I would ask you to double check that your dotfile is not modified. Delete it from your home directory and restart Emacs.

pmwhite commented 8 years ago

I just did it, but it didn't work of course.

Possibilites:

  1. The auto-mode-alist (as well as line ending recognition) feature has been turned off. Is this even possible?
  2. Somehow some function is triggered after all the mode recognition and stuff that reverts all of it, or
  3. The function that opens the file explicitly specifies the mode (I don't know if that makes sense).

None of these address why I'm getting this problem and no one else is; I'm baffled

pmwhite commented 8 years ago

I found out that I can execute normal-mode, and then it will correctly set the mode based on the file extension. You can draw your own conclusions about that. I don't know if there is a similar command for line endings; do you know of any?

pmwhite commented 8 years ago

Aaaaaauuuggghhh. This problem has been bothering me for such a long time. I just found the solution and it is sooooo simple. I was pressing SPC f l which I guess does something different than SPC f f I didn't give you that information, so you really couldn't have helped me. Sorry for wasting your time.

TheBB commented 8 years ago

Hahaha :-)

Yeah, that's what SPC fl does: open files with fundamental mode. It's meant for large data files where syntax highlighting and other functionality would cause lag.