I was doing following solution for markdown files: How do I associate a file extension with a specific mode?
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t) (setq auto-mode-alist (cons '("\\.md" . markdown-mode) auto-mode-alist)) I want to do it same operation for text show up when I want to commit a message for git. When I type git commit a COMMIT_EDITMSG file shows up which has Fundamental mode. Since COMMIT_EDITMSG does not have any extention I was not able to match it into markdown-mode as I done for *.md files.
CRM Buffer Size Mode File . COMMIT_EDITMSG 1259 Fundamental ~/folder/.git/COMMIT_EDITMSG My .gitconfig file setup:
[core] pager = less -r editor = TERM=xterm-256color emacsclient -t [Q] Is there a way to open git's COMMIT_EDITMSG file in markdown-mode?
COMMIT_EDITMSGor any generated file fromgitat.git/without an extention will considered as an binary file