I am trying to learn common lisp and following the installation process from https://lisp-lang.org/learn/getting-started/
The website says to add something to my ~/.emacs file, but I do not find it. Does someone now where I can find that?
enter image description here
Seems like you want to install a custom slime to use Common Lisp on Linux. Maybe one should install it from a given distribution, it would be easier.
I would suggest the following steps:
1. Setup Emacs to use MELPA repository:
M-x customize-variable
Customize Variable: package-archives
Then, simply add melpa with the URL https://melpa.org/packages
Then press the button Apply and Save.
2. Install slime from the package manager
M-x list-packages
Search for slime, press i for install and then press x to proceed. You should have a proper version of slime installed.
3. Happily hack Common Lisp!
EDIT:
I missed this installation method that you probably followed. In this case, I believe that the init directory has a typo and is missing a dot (.)
(load (expand-file-name "~/.quicklisp/slime-helper.el"))
^
\---- HERE
(setq inferior-lisp-program "sbcl")
Related
Update
Apparently, the auto-complete package is not the culprit.
Emacs fails to download melpa archive.
A quick google search indicates that this is a reappearing problem both on windows and unix machines.
As there are already threads concerning failed to download 'melpa' archive (none of which helped unfortunately) this thread may or may not be closed.
Inital Question
I'm trying to set up emacs for Common Lisp.
I installed sbcl and the slime package.
Some time ago I used to have auto completion for Common Lisp keywords in emacs such that - while typing - it suggested a word via a greyed out completion (TAB for acceptance) or via drop down or both. (I can't remember exactly.)
I'm struggling to get this working again.
At https://github.com/purcell/ac-slime it is suggested to first install auto-complete but when I type package-list-packages there is no such package. (But there are plenty named auto-complete-*).
(I set up Melpa with:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/")))
The provided link http://cx4a.org/software/auto-complete/ is dead as well.M-x install-package [RET] auto-complete [RET] also fails. Emacs says: [No match]
So my question is:
If there is no auto-complete package anymore, what is a good way to set up Common Lisp auto completion in emacs in the way mentioned above (greyed out word or dropdown)?
The current home-page for auto-complete is https://github.com/auto-complete/auto-complete
Installing it should be enough to allow you to use ac-slime (there is also a completion version using company).
Here is how I got it to work.
Download the .ZIP archive with repository here.
Unzip
Run M-x package-install-file
On the prompt, specify the path to the downloaded repository and the file named auto-complete.el.
Make sure that installation returns something along the lines of "Successful"
Add this line to your Emacs initialization file (.emacs):
(ac-config-default)
To auto-complete in SLIME, follow similar step to install ac-slime (requires SLIME and Auto-complete)
P.S. There is another package called company (stands for Complete Anything), which is quite good as an alternative. I am trying it out now. Getting it to work was very simple.
I am new to emacs and am looking for an emacs package that supports multiple cursors a'la sublime. I have tried to install magnars/multiple-cursors but without success. I can't even install the package directly. The following code does not work for me .
M-x package-install multiple-cursors
(emacs says no match, but in the ~/.emacs.d/elpa/archives/marmalade/archive-contents file, I can find references to that package.)
I have the required repositories in init.el and also run M-x package-refresh-contents
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
I then installed the package via a package that requires it (in my case I installed clj-refactor, this brings in the dependency to multiple-cursors. When I eval (require 'multiple-cursors) I get the following error
File error: Cannot open load file, no such file or directory, multiple-cursors
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
This is strange because in the folder ~/.emacs.d/elpa/multiple-cursors-20141026.503 contains the file multiple-cursors.el
I got very used to that sublime feature and would really appreciate to use multiple cursors in emacs. Has anyone has a similar problem with the mentioned package or knows how to solve it? A link to a similar package would also be appreciated.
Thank you
Edit:
I Use emacs for mac v24.3.1
Edit:
I have just noticed that I don't need to eval (require 'multiple-cursors). The package is indeed installed (via the dependency) and I use it, great! The question remains why I can't directly install it.
I installed dired+ through list-packages (the folder was put in the elpa folder), and put '(add-to-list 'load-path "~/.emacs.d/elpa/")' in my init file (which I created myself), and '(require 'dired+) under. When I open emacs, I get an error telling me there's an error in my init file. If I remove the '(require 'dired+) line, the error stops, but again dired+ doesn't work when I call dired mode. The actual folder that was downloaded when I installed it is 'dired+-20130206.1702'. So I tried '(require dired+-20130206.1702), which again gave me an error on startup.
I'm at my wits end. I've tried everything I can think of, gone through the GNU emacs docs, googled the problem, looked at the answers here at Stack, and no luck. Does anyone have any suggestions? I'm using Windows XP.
It's impossible to say for certain without seeing all the code, but you appear to be quoting your forms for no reason.
i.e., these:
'(add-to-list 'load-path "~/.emacs.d/elpa/")
'(require 'dired+)
should be:
(add-to-list 'load-path "~/.emacs.d/elpa/")
(require 'dired+)
However that should just make them ineffectual, rather than causing errors directly.
Show us the code and the error message.
Edit:
Adding the /dired+/ to the end seemed to fix it ... Although I have no idea why. Any thoughts?
load-path holds a list of directories in which Emacs will look for libraries. It does not automatically descend into sub-directories, so you need to specify all relevant directories for your libraries. Your dired+ library is clearly in the ~/.emacs.d/elpa/dired+/ directory.
For menubarplus, you will similarly need to check to see which directory the library is in.
To be honest, I had thought that the package management in Emacs 24 would take care of this automatically; but as I've not been using it, I'm not certain.
Edit 2:
Yes, I suspect you have some other problem here. I just experimented with installing a library via the package manager (albeit from the default package repository, which doesn't include a dired+ package), and after restarting Emacs load-path contained the path for the new library without any intervention on my part.
I think Phils answered your question wrt loading Dired+ (specify the right directory, the one where you put dired+.el).
Wrt Menu-bar+, the feature name is menu-bar+, not menubarplus and not menu-barplus. So change your (require 'menubarplus) to (require 'menu-bar+).
I install el-get by typing this into my buffer, highlighting, and hitting C-j:
(url-retrieve
"https://raw.github.com/dimitri/el-get/master/el-get-install.el"
(lambda (s)
(goto-char (point-max))
(eval-print-last-sexp)))
...according to the installation documentation.
I can then install things using M-x el-get commands. Great so far.
However, when I close emacs and restart, M-x el-get cannot be found, nor can any of the packages I installed with it. When I try to reinstall el-get in the method above, installation says the git package already exists:
fatal: destination path 'el-get' already exists and is not an empty directory.
I can delete the el-get directory in my emacs.d/ folder and get back to the beginning, but can't seem to get el-get to stay installed beyond the first time. What am I missing or misunderstanding?
Also---I'm only using el-get in the first place to be able to install auto-complete for using emacs for python development. If you have an easier or better easy-installation recipe for that, I'd appreciate that suggestion, too.
(Never used el-get myself, but...)
a) You should add the code from one of the examples in the Basic Setup section. It includes forms like (add-to-list 'load-path ...) and (require 'el-get ...), which are more or less essential for loading Emacs packages.
b) You can just as well install auto-complete from Marmalade or Melpa. I think this is the recommended option if you're using Emacs 24. Add at least one of the repositories to package-archives, press M-x list-packages RET, look for auto-complete, press i, then x.
I just git cloned auto-complete from GitHub. When I typed
make
I got:
emacs -Q -L . -batch -f batch-byte-compile auto-complete.el auto-complete-config.el
In toplevel form:
auto-complete.el:49:1:Error: Cannot open load file: popup
In toplevel form:
auto-complete-config.el:31:1:Error: Cannot open load file: popup
make: *** [byte-compile] Error 1
I didn't see anything in the auto-complete documentation that says that I have to install popup. I don't remember running into this problem before. Is this a new dependency? Is popup a package that is required by auto-complete?
If you use Emacs 24 (which you probably should by now) you can use the command M-x package-install and install auto-complete through there. This will install it correctly and is the best method of installing packages.
popup.el should have been included with your copy of auto-complete though, if not check here https://github.com/auto-complete/popup-el to get the appropriate copy.
To enable packages you can add something like this to your .emacs:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(setq url-http-attempt-keepalives nil)
The last line is simply to keep the downloads of large packages from timing out sometimes.
Had the same problem than you did, find you post struglgle a little before to find why it wasn't working: I had forgot to initate the submodules... reason why Make wasn't finding popup and crashing
so to solve it, go in your autocomplete repo and run
git submodule update --init
this will build the three lib you need to compile autocomplete