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#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c# - Making TableLayoutPanel Act Like An HTML Table (Cells That Resize Automatically Around Text) -