0
votes

There's a huge literature on the topic, but, nevertheless, I cannot get this done. My ultimate goal is to work with fstar on Microsoft Windows.

C-x C-f resolves ~ as C:/Users/myname which is in line with my HOME environment variable in the Environmental variables Windows section.

(expand-file-name user-emacs-directory), as described here yields, C:/Users/myname/.emacs.d/

In C:/Users/myname/.emacs.d/ I have placed .emacs.el and init.el with the suggested script:

(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (package-initialize)

However M-x returns undefined, no matter if I start Emacs with or without the -q flag (see here). My "Messages" buffer is empty".

1
What do you mean "M returns undefined" ??phils
Emacs loads only one init file. You don't need (or want) to have both .emacs.el and init.el.phils
I try "M-x" for example and all I see is a "M-x is undefined". Re the .el, I tried both alternativesNoIdeaHowToFixThis
It's difficult to believe this would happen (certainly under emacs -q), so I wonder if there's confusion over what M-x means. Can you describe in detail exactly which keys on your keyboard you are typing? I would expect on Windows that you would hold the left Alt key and press x. Failing that, does ESC then x behave differently?phils
Well, I type Alt and then x. In the meanwhile, I tried the very same installation steps on a different machine and everything works. I think I will close this question - it's just too much of a hard work to get this fixed and have no idea how to move forward.NoIdeaHowToFixThis

1 Answers

2
votes

A couple of things you could try:

  • Check the value of the variable user-init-file (use C-h v). That should tell you if Emacs loads the file you want it to load. If you started Emacs with the -q option, the value of this variable should be nil.
  • The error M-x is undefined can be caused by rebinding the Escape key. (That's because pressing a key while holding down the "Meta" key is equivalent to first pressing Escape and then the key in question.) Is there something in the init file that might cause this to happen?
  • Try starting Emacs with -Q instead of -q. This makes Emacs skip "site-wide" init files. I can't really think of a reason why your system would have any of those, but it might be worth ruling this out.

You could edit your question and include your entire init file (surround it with ``` on a line by itself), so we could have a look.