0

I'm going to try to make my situation as clear as possible.

Basically, I want to make changes to my .emacs init file so that I can add on new features to emacs, however any changes I make do not change the way emacs operates.

This is what I did. First I cd into my .emacs.d directory, this directory contains the following files (hidden and not hidden) :

ls -a .emacs.d

.    ..    auto-save-list

As you can see, there is no .emacs init file in this directory, so I made one, and added the following code to it:

(global-set-key (kbd "<f10>") 'execute-extended-command)

In this example, I'm simply adding a second-key-binding to a specific command. I've tried adding all kinds of different code to my .emacs file, but still nothing works. Can anyone tell me why, it makes no sense why this shouldn't work...

buydadip
  • 8,890
  • 22
  • 79
  • 154

1 Answers1

1

The Emacs manual says this about initialization files:

When Emacs is started, it normally tries to load a Lisp program from an initialization file, or init file for short. This file, if it exists, specifies how to initialize Emacs for you. Emacs looks for your init file using the filenames ~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el; you can choose to use any one of these three names (see Find Init). Here, ~/ stands for your home directory.

You are trying to combine two of these methods. Instead, use ~/.emacs (a hidden file in your home directory), or ~/.emacs.d/init.el (a non-hidden file, in a hidden directory, in your home directory)

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257