0

It's my first time using Emacs. I like the massive range of commands and I'd like to get used to it. And while learning Haskell, maybe I'll learn two things at once.

But even starting out I have a problem.

Using Emacs 24.5 and following a couple of simple guides, firstly I couldn't find my init file, and I created one in the root folder, .emacs, and just incase one in bin .emacs, both with the same simple Lisp

(require 'package)
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-archives
   (quote
    (("gnu" . "http://elpa.gnu.org/packages/")
     ("melpa-stable" . "http://stable.melpa.org/packages/")))))

However,

M-x package-refresh-contents

doesn't seem to refresh list of available packages, because

M-x package-install <RETURN> haskell-mode

doesn't find it in the refreshed list.

Using

M-: find-file user-init-file 

doesn't open my init file like it supposedly should, either. I get the error:

Trailing garbage following expression

What am I doing so wrong? All I want to do is get some packages through the command line, without the use of another package manager like cabal or happy. I'd just like haskell-mode, and probably erlang-mode and elixir-mode in the future.

mitbanip
  • 179
  • 3
  • 13
  • 2
    Are you sure you weren't meant to say `M-: (find-file user-init-file)`? The parentheses are important in Emacs Lisp. – Ulrich Schwarz Oct 28 '15 at 21:46
  • That was exactly it... Trying this again. Thanks! – mitbanip Oct 28 '15 at 21:48
  • This may be of general use to you: http://stackoverflow.com/a/10545955/324105 – phils Oct 29 '15 at 11:15
  • Do you find the packages you're interested in with `M-x list-packages` ? – Ehvince Oct 29 '15 at 17:02
  • The problem was resolved, thank you. I'm starting from scratch though and using Stack. Seems like much less of a pain, specially if I have 100 different library dependencies to do one thing :) – mitbanip Oct 29 '15 at 21:42

0 Answers0