Emacs shortcuts specific for a file type -


is there way different shortcut different file types?
tipically use f12 compile. runs make -f. i'd have f12 running

m-x org-export-as-html

when i'm on org-mode.
how should edit .emacs file? it's just:

(global-set-key [f12] 'compile)

thanks,
hamen

add mode hook org-mode local-set-key instead of global-set-key

(add-hook 'org-mode-hook (lambda () (local-set-key [f12] 'org-export-as-html))) 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -