Comparison of Python modes for Emacs

后端 未结 2 1310
执笔经年
执笔经年 2020-12-12 21:55

So I have Emacs 24.3 and with it comes a quite recent python.el file providing a Python mode for editing.

But I keep reading that there is a pytho

2条回答
  •  余生分开走
    2020-12-12 22:47

    Being heavily involved in developing python-mode.el last years, my comment probably is biased: Recommend to stay with python.el for Emacs beginners. Also its author deserves credit for some useful approaches.

    python-mode.el is designed to boost edits productivity. It makes it easy to run or execute via python2 and python3 or IPython shells in parallel.

    It reduces number of needed keystrokes providing tailored commands. It makes edits faster, assists programming by speech, macro-driven input etc.

    Supports Python language features not known from python.el currently:

    py-up, py-down - travelling nested blocks

    Avoid typos fetching forms at point, a clause for example:

    py-backward-clause
    py-copy-clause
    py-down-clause
    

    ...

    No need to customize when testing different versions:

    py-execute-clause-python2
    py-execute-clause-python3
    py-execute-clause-ipython
    

    ...

    • notion of finer grained parts - py-expression, py-minor-expression
    • commands running versioned and paralleled (I)Python-executables, no need to re-define the default Python
    • largely removing the need of an active region marked before, see py-execute-line and a whole bunch more

    To get an overview, have a look at the menu. Directory "doc" lists commands.

    As the quality of code is raised: a way to compare both modes probably is checking for the bugs listed in http://debbugs.gnu.org/. See for example bug #15510, #16875; or http://lists.gnu.org/archive/html/help-gnu-emacs/2014-04/msg00250.html

    Commented at "rough granularity of commit" already: While tkf basically is right looking for smaller pieces, sometimes conditions make me leave the rule. Considerable parts are not written by hand, but by programs residing in directory "devel". They create files used in development branch frist - i.e. components-python-mode. When starting a new feature it's often not obvious if the path chosen is fruitful. After a hundred would-be-commits or so it still might turn out impossible or not so recommendable. Instead of posting all the meanders, used to keep that experimental branch for several days in these cases and check in when tests passed.

    BTW assume tkf refers not to compile-errors --which would be looked for instantly-- but compiler warnings. Unfortunately Emacs mixes warning about backed style preferences with real errors.

提交回复
热议问题