[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Language identification
From: |
Stephen J. Turnbull |
Subject: |
Re: Language identification |
Date: |
Sat, 29 Aug 2009 13:11:27 +0900 |
Stefan Monnier writes:
> > The great majority that I see are correctly identified by file(1) (I
> > believe using libmagic), however, by parsing the shebang.
>
> Oh, so they're executables with a shebang. That's OK we don't need
> `file' for that since we have interpreter-mode-alist. Emacs should
> already DTRT for them.
Sure. Maybe there's a better way. Maybe libmagic is it. Maybe not.
However, you asked "how often do you see files containing programming
languages without an extension?" The answer is, it's very common, but
the most common case is Unix command scripts with shebangs, which file
handles just as well as Emacs does.
> I've had
>
> (setq auto-mode-alist (append auto-mode-alist '(("\\.[^/.]+\\'" ignore
> t))))
>
> in my .emacs for eons to cover such cases.
Well, maybe it's time to move it from your .emacs to core emacs?
- Re: using libmagic in Emacs?, (continued)
- Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/21
- Re: using libmagic in Emacs?, Andreas Schwab, 2009/08/21
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/20
- Re: using libmagic in Emacs?, Reiner Steib, 2009/08/20
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/21
- Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/21
Language identification (was: using libmagic in Emacs), Juri Linkov, 2009/08/27
Re: Language identification, Richard Stallman, 2009/08/28
Re: Language identification, Stephen J. Turnbull, 2009/08/29
Re: Language identification, Stefan Monnier, 2009/08/29
Re: Language identification, Stephen J. Turnbull, 2009/08/29
Re: Language identification, Richard Stallman, 2009/08/30
Re: Language identification, Juri Linkov, 2009/08/28
Re: Language identification, Stefan Monnier, 2009/08/28
Re: Language identification, Richard Stallman, 2009/08/30
Re: Language identification, Richard Stallman, 2009/08/29