I want autocompletion and refactoring in emacs with python.
I gather that I need rope to do this. To do this with emacs, I need ropemacs. Ropmacs depends on pymacs.
Pymacs is hard to install...or at least the instructions are not clear to me.
Do I need to do two things? Install pymacs and then install a file that tells emacs to talk to pymacs? I've already installed rope and ropemacs super easily, with
pip install rope ropemacs
Here's what I did:
pip install -e "git+https://github.com/pinard/Pymacs.git#egg=Pymacs"
This installs ok on mac os x mountain lion according to PIP.
But I have a feeling that I am not done--or am I?
How do I test to see if pymacs and rope and ropemacs are all working?
I think the easiest way to install ropemacs is to use el-get: M-x el-get-install ropemacs. It installs and build Pymacs, rope and ropemacs. I know that it works on Linux. See the el-get document for more information. (disclaimer: I wrote the installation recipe for el-get so obviously I am biased to my solution)
The difference from the solution using pip is that it setups the Emacs side of Pymacs correctly.
Installation section of Pymacs manual is fairly straightforward — don't be afraid to refer to it if unsure. Below are the steps to install Pymacs in Emacs 24. First, in shell, run:
sudo pip install rope ropemacs
After that in Emacs install Elisp side of Pymacs by adding Marmalade repository and then running package-install pymacs. As of February 2014 you can't install Pymacs via pip, therefore:
git clone http://github.com/pinard/pymacs
cd pymacs
make check
sudo make install
make check ensures the prerequisites. sudo make install puts Pymacs module in Python local modules path, usually /usr/local/lib/python2.7/dist-packages/. People generally frown upon make install, because if you lose the Makefile, it can become hard to cleanly uninstall. But you shouldn't fear it, as pip uses the same directory, so pip uninstall pymacs will work.
In ~/.emacs.d/init.el put:
;; Pymacs
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
(autoload 'pymacs-autoload "pymacs")
Evaluate this with eval-region and try running Python expressions with pymacs-eval. You're good to go.
clone pymacs github, go to folder and proceed tutorial from author. http://pymacs.progiciels-bpi.ca/pymacs.html is now offline, if still so see tutorial at https://web.archive.org/web/20130627154513/http://pymacs.progiciels-bpi.ca/pymacs.html . Look at chapter "2.4) Install the Pymacs proper" and "2.5 Prepare your .emacs file". Chapters are small, have testing and recomendations for windows user.
Related
I am using spacemacs and I am attempting to install packages with M-x "package install $package-name". The particular package I am trying to install is SLY, A newer implementation of The SLIME REPL for Common Lisp. When I Install the package when I start up spacemacs it works fine. However when exiting spacemacs it somehow gets deleted. After googling this issue I found this page https://develop.spacemacs.org/doc/FAQ.html. I followed the instructions and changed my .spacemacs config. I added the line dotspacemacs-install-packages 'used-but-keep-unused. What am I doing wrong.
You should add your personal packages to dotspacemacs-additional-packages
I'm trying to setup elpy for emacs on my windows system, on which I'm using Winpython 3.4.3.
I have installed all the dependencies such as rope, flake8, etc... using pip. When I type M-x elpy-config in emacs, I get "Neither easy_install nor pip found".
If I run (executable-find "python") then I get the correct path to my Winpython installation.
What might be the problem?
On Windows 7 with Emacs 24.5 and Python 2.7 it worked for me to include the actual directory containing pip (Scripts) in the exec-path; using M-x customize-variable exec-path. Apparently, including just the directory of the python executable was not enough.
After many changes on my Debian Jessie, when I launch the command emacs I receive an error libgnutls.so.26 : cannot open shared object file: No such file or directory.
If I launch instead the command emacs24 everything is allright.
I have emacs in /usr/local/bin
I have emacs24 in /usr/bin.
So, for now I created an alias to launch emacs24 as emacs, but i don't like and, for example, i have to change the git setting to open the default ide cause emacs is not availlable yet.
The question is where is the correct position of the command ? I have to change my PATH ?
Consider that libgnutls.so.26 is not installable from apt.
Thanks for any suggest or advice.
This is very strange, because a simple sudo dnf install emacs should suffice (I use fedora, so you probably use apt-get instead of dnf). Maybe it is best to just reinstall emacs (backup your .emacs to be safe) using apt-get? Anyhow, in fedora the emacs executable is located at /usr/bin/emacs (which is also the one used in the terminal when you use the emacs command).
I'm trying to install common lisp on an Ubuntu system with no success so far . I'm newbie in emacs and linux . I tried using lispbox by downloading the tar ball and running sh lispbox.sh command but the shell reports Bad substitution error . What I need is step-by-step instruction on how to get common lisp running with emacs so that I can start programming .
Use your package manager to install SBCL (Steel Bank Common Lisp).
Download Quicklisp from http://quicklisp.org. There are complete instructions there, but I shall try to filter the important steps:
Run sbcl --load "quicklisp.lisp".
At the SBCL prompt, run (quicklisp-quickstart:install).
At the SBCL prompt, run (ql:add-to-init-file) (press Enter to confirm).
At the SBCL prompt, run (ql:quickload "quicklisp-slime-helper"). This will create a file that you can load in your .emacs to setup Slime.
Now you can open your Emacs, do M-x slime and hack away. Be sure to read the documentation for Quicklisp and Slime.
go to https://portacle.github.io/ (a newer lispbox-like ready-to-use emacs/SLIME-sbcl-quicklisp system).
download and install it and start it following instructions there.
For ubuntu 64 bit:
wget https://github.com/portacle/portacle/releases/download/1.2b/lin-portacle.tar.xz
tar xJf lin-portacle.tar.xz
cd portacle
./portacle.run
# enjoy :)
Minimal set of commands needed to program common lisp in SLIME by me
I just downloaded Emacs and Cygwin for Windows(Vista in my case). Have no idea how to set them up.
Any help would be appreciated !
Thanks !
I use these libraries, in this order:
(require 'cygwin-mount)
(require 'setup-cygwin)
They are both available on EmacsWiki:
http://www.emacswiki.org/emacs/cygwin-mount.el
http://www.emacswiki.org/emacs/setup-cygwin.el
Step 1: Install libraries
http://www.emacswiki.org/emacs/cygwin-mount.el
http://www.emacswiki.org/emacs/setup-cygwin.el
Step 2: Install cygwin to C:\cygwin (This requirement is hardcoded in setup-cygwin.el, so just do it unless you are willing to modify setup-cygwin.el).
Step 3: Add following code into your .emacs or .emacs.d/init.el. Please note the variable cygwin-mount-cygwin-bin-directory is not set by default in cygwin-mount.el, I suggest using hard coded path (I mean "c:/cygwin/bin" actually) since the cygwin install path is already hardcoded by setup-cygwin.el.
(setq *win32* (eq system-type 'windows-nt) )
;; win32 auto configuration, assuming that cygwin is installed at "c:/cygwin"
(if *win32*
(progn
(setq cygwin-mount-cygwin-bin-directory "c:/cygwin/bin")
(require 'setup-cygwin)
;(setenv "HOME" "c:/cygwin/home/someuser") ;; better to set HOME env in GUI
))
Maybe try posting your question on http://superuser.com
But:
Installing Emacs on Windows 95/98/2K/NT/ME/XP/Vista/Windows 7
Quick Start Guide for those more experienced with Windows
Use cygwin-mount.el to integrate Cygwin with Emacs:
http://www.khngai.com/emacs/cygwin.php
You might also want to replace the DOS Shell with the Cygwin bash, that's also covered.
You can find instructions here.
There're several way to integrate emacs with cygwin as follows:
emacs-nox under cygwin. Not attractive!
emacs-X11 under cygwin. An X server is needed like XMing or Cygwin/X. A bit slow and heavy.
emacs-w32 under cygwin.
emacs under windows. You need some configuration to make emacs recognize the cygwin environment. Difficult for beginners.
I'd recommend using emacs-w32 with cygwin, which uses native Windows GUI so that you don't have to start an xserver just to run emacs and you don't need to write/download any tricky code to make emacs aware of cygwin env as other answers do.
Just install emacs-w32 and run it from mintty and here you go. FYI, if you want to start emacs "independently", write a .bat file with D:\cygwin\bin\run.exe /usr/bin/bash.exe --login -i -c /usr/bin/emacs-w32.exe inside or, as I do, write a .ahk script to start emacs with hotkey F12.