(1) Emacs encoding:
This is definitely the king of obscure Emacs key combinations. To change the encoding of an existing file, use C-x RET f RET.
Tab-completion works for the encoding. “utf-8″ is the one I use most often, but “unix” and “dos” are also useful.
To make Emacs open files in UTF-8 per default, use the following snippet in .emacs:
The load-path is just a list of places where Emacs looks when it needs
to load something, not a list of places where it loads everything when
you didn't tell it to. Usually, you set up things by saying (autoload
'foo-mode "foo") in the .emacs file. Then when you call the function
named foo-mode for the first time, emacs looks for "foo.el" in the
load-path.
Calling the function is done either by typing "M-x foo-mode" or typing
a key combination that you set to 'foo-mode by define-key or
set-local-key (see those functions' docs).
So try to find out the function you're supposed to invoke, find out
the name of the file containing its definition, and write an autoload
entry. Most packages will usually say either on its download page or
in the beginning comments of the main file what autoload command to
add to .emacs.
If this still doesn't work, the last resort is to say (load "foo") in
your .emacs; then every time Emacs starts up, it will look for foo.el
in the load-path and load it. This slows down startup though, so you
should do it sparingly.
This is definitely the king of obscure Emacs key combinations. To change the encoding of an existing file, use C-x RET f
Tab-completion works for the encoding. “utf-8″ is the one I use most often, but “unix” and “dos” are also useful.
To make Emacs open files in UTF-8 per default, use the following snippet in .emacs:
(setq locale-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (prefer-coding-system 'utf-8)
(2) Emacs load-path
The load-path is just a list of places where Emacs looks when it needs
to load something, not a list of places where it loads everything when
you didn't tell it to. Usually, you set up things by saying (autoload
'foo-mode "foo") in the .emacs file. Then when you call the function
named foo-mode for the first time, emacs looks for "foo.el" in the
load-path.
Calling the function is done either by typing "M-x foo-mode" or typing
a key combination that you set to 'foo-mode by define-key or
set-local-key (see those functions' docs).
So try to find out the function you're supposed to invoke, find out
the name of the file containing its definition, and write an autoload
entry. Most packages will usually say either on its download page or
in the beginning comments of the main file what autoload command to
add to .emacs.
If this still doesn't work, the last resort is to say (load "foo") in
your .emacs; then every time Emacs starts up, it will look for foo.el
in the load-path and load it. This slows down startup though, so you
should do it sparingly.
No comments:
Post a Comment