Problem 1
I’m trying to customize my Emacs with the init file.
I found the correct place of my init file, and tried to write some code in it to change Emacs behavior.
Following the document examples, I wrote the following line of code
(setq fill-column 20)
Then saved the file. But when I start Emacs, the fill-column variable is still set to 70 as default. If I modify that variable on the fly, Emacs accepts the new value instead as normal.
I wonder if I’m missing something about the init file. Should I explicit tell Emacs to load it? Should I include other code statements to make it applying the changes?
Problem 2
To refer to your HOME directory in Emacs, you have to use the tilde symbol at the beginning of the path, for example when you want to find your init file position via Emacs, like this
~/.emacs.d/init.el
But how is it possible to type such a character if it’s not present on my keyboard and ALT codes aren’t working (because ALT followed by numbers is being treated as a command input)?
(1) Is your init file actually executed? Here’s how you find out: Put something syntactically incorrect into it. If emacs complains on startup, it’s executing the file – otherwise the problem is that you and emacs disagree about where your home directory is.
(2) Every Windows keyboard layout I know of has a binding for ~ – it may be on an AltGr combination, on a dead key etc., but it’s always there. The Windows system control panel can help you verify and select your keyoard layout. But if you really don’t have a binding for ~, you can always type
in emacs instead (176 is the octal for 126, the ASCII code of ~).