Clear steps to install pymacs with emacs 24?

前端 未结 3 2090
我在风中等你
我在风中等你 2020-12-05 16:45

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 pyma

相关标签:
3条回答
  • 2020-12-05 17:20

    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.

    0 讨论(0)
  • 2020-12-05 17:31

    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.

    0 讨论(0)
  • 2020-12-05 17:32

    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.

    0 讨论(0)
提交回复
热议问题