News and announcements
6.2.1
Written for python-mode.el by Andreas Roehler on 2015-10-02
- Handle PEP 492 async coroutines
- Logic of py-indent-region WRT lp:1426903
In case first line accepts an indent,
keep the remaining lines' relative.
Otherwise lines in region get outmost indent,
same with optional argument
- Commands
- py-match-paren
If at a beginning, jump to end and vice versa.
Matches lists, block, statement, string and comment
- ipython2.7
- ipython3
- py-beginning-
- py-beginning-
- py-end-
- py-end-
- py-flycheck-mode - toggle `flycheck-mode' from menu "Checks"
- py-execute-section - execute arbitrary chunks of code
- py-execute-
- py-execute-
- py-execute-
- py-execute-
- py-execute-
- py-execute-
- py-execute-
- py-sectionize-
- py-backward-section
- py-forward-section
- py-narrow-to-block
- py-narrow-
- py-narrow-to-class
- py-narrow-to-clause
- py-narrow-to-def
- py-narrow-
- py-narrow-
- New helper functions, like
- py--end-
- py--end-
etc.
Functions in a boolean sense just stating if being at an end or
start no longer a command. Renamed as interanal
functions with prefix `py--' now.
- TAB-indent from column zero: go to outmost first, lp:1375122
- (I)Python-shell setup made more reliable
New customizables:
- py-imenu-max-items, default is 99
Sets `imenu-max-items'
- py-python-
When not empty, fontify according to Python version specified.
- py-pdb-executable, default is nil
Indicate PATH/TO/pdb.
- py-update-
If pdb should provide suggestions WRT file and pdb-path.
- py-split-
Don't split when max number of displayed windows is reached.
Renamed:
- py-beginning-
- py-narrow-to-defun --> py-narrow-to-def
New in version 6.2.0
Written for python-mode.el by Andreas Roehler on 2014-11-28
- Support for large output
new commands py-fast-process, py-fast-...
Fixes: large output makes Emacs freeze, lp:1253907
Python code now might be processed by an
- interactive Python shell (DEFAULT)
- non-interactive Python (`py-fast-
Both processes might run in
- session, i.e. start from possible previous state (DEFAULT)
- dedicated, (`py-dedicated-
- TAB bound to `py-indent-
Calls to `tab-to-tab-stop' removed, as these would conflict.
Use `C-q TAB' to insert a literally TAB-character.
- py-fast-complete
Complete word before point, if any, use `py-fast-process'
- `py-shell-
In shell: complete or indent depending on the context.
If cursor is at current-indentation and further indent
seems reasonable, indent. Otherwise try to complete.
- Python specific hide-show
py-hide-region
py-show-region
py-hide-statement
py-show-statement
py-hide-block
py-show-block
py-hide-clause
py-show-clause
py-hide-
py-show-
py-hide-def
py-show-def
py-hide-class
py-show-class
py-hide-
py-show-
py-hide-
py-show-
py-hide-line
py-show-line
py-hide-top-level
py-show-top-level
- `py-shell' uses new `py-shell-mode', `py-shell-mode-map'
M-x describe-mode RET mentions edit available commands
Menu "Py-Shell"
- Improved customization of Python2, Python3, IPython executables
receive defaults depending from system
py-python-command - defaults to python2
py-python2-
py-python3-
py-ipython-
py-python-
py-python2-
py-python3-
py-ipython-
- info-lookup-symbol made working with Python
patched python-info.el available at
https:/
See also INSTALL-INFO-FILES
- `py-backward-
While `py-up' will go upward from beginning of block, this travels
same level, but goes up if no element left in level. If callled
from inside a string or list, go to its beginning.
- `py-kill-
With optional argument SHELL, otherwise kill default
(I)Python shell.
- py-info-
Calls `info-lookup-
- py-toggle-
If window is splitted vertically or horizontally.
Sets customizable variable
`py-split-
Also in menu Python/
- py-symbol-at-point
Return the Python symbol under cursor
- py-report-
Display Py-shell' comint-mode variables of interest.
- variables-state
Diplays state of python-mode variables in an org-mode buffer
- py-kill-
Kill buffer unconditional; kill also any buffer-process.
Setting docstring style simplified; a style is all needed.
New commands
-py-set-
-py-set-
-py-set-
-py-set-
-py-set-
-py-set-
- new indent feature/behavior, lp:1280982
If an empty line was dedented deliberatly, this is
honored by next lines indent
- py-object-
commonly "self" or "cls", inherits default face
- py-error
In case of error, list messages from Python process
- `py-split-
Not a boolean any more, new option 'just-two: When code is send to
interpreter, split screen into source-code buffer and current
--maybe reused-- py-shell. When set to `t' --default--, python-mode
will keep existing windows and split only if needed. Alternatively
if a multitude of python-
manually and set `py-keep-
If `always' split according to settings of `split-
- For completeness some commands user might expect
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
py-execute-
- `py-unload-
Normally commands delivered by python.el are usable alongside with
python-mode.el. Some old version of python.el might write skeletons into
python-
Internally used functions preferably are prefixed `py--':
py--statement
py--statement
New variable `py-ipython-
Boolean `py-set-
Fill according to `py-docstring-
`py-comment-
`py-font-
lp:1314921
New booleans
- py-fast-process-p
If `t', stuff is executed through `py-fast-...'-
commands, suitable for large output. Result arrives
in py-fast-
- py-shell-
If `t', open output buffers, split windows according to settings of
`py-split-
Removed commands
-toggle-
-py-nil-
-py-nil-
-toggle-
-py-onetwo-
-py-onetwo-
-toggle-
-py-pep-
-py-pep-
-toggle-
-py-pep-
-py-pep-
-toggle-
-py-symmetric-
-py-symmetric-
-toggle-
-py-django-
-py-django-
Some commands not so useful made common functions, like
-py-statement-
-py-statement-
Dropped booleans:
`py-start-
`py-start-
`py-pylint-
`py-paragraph-
`py-enforce-
`py-cleanup-
New in version 6.1.3
Written for python-mode.el by Andreas Roehler on 2014-01-28
- PEP8 indent-alternatives when closing a list implemented
Boolean `py-close-
my_list = [
1, 2, 3,
4, 5, 6,
]
result = some_function_
'a', 'b', 'c',
'd', 'e', 'f',
)
When non-nil, it will be lined up under the first character of the line that starts the multi-line construct, as in:
my_list = [
1, 2, 3,
4, 5, 6,
]
result = some_function_
'a', 'b', 'c',
'd', 'e', 'f',
)
- Keys C-M-a, C-M-e usable for all top-level form, lp:1191078
Boolean `py-defun-
If non-nil, beginning- end-of-defun forms will use
`py-beginning
mark-defun marks top-level form at point etc.
Keys C-M-a, C-M-e usable for all top-level form, lp:1191078
- New commands:
py-beginning-
"Reach the beginning of block which starts at current column "
py-beginning-
py-beginning-
py-end-
py-mark-top-level
py-copy-top-level
py-delete-
py-kill-top-level
py-execute-
py-top-
py-comment-
py-beginning-
- `minor-block' commands added
A minor block is started by a `for', `if', `try' or `with',
while block covers also `def' or `class'
- variable `py-keep-
Setting `py-keep-
restore windows-
`py-switch-
`py-split-
an error occurs, it's displayed.
To suppres window-changes due to error-signaling
also, set `py-keep-
- boolean empty-line-
When non-nil, dedent after empty line following block
If non-nil, a C-j from empty line would dedent.
if True:
print("Part of the if-statement")
print("Not part of the if-statement")
- boolean py-debug-p, default is nil
When non-nil, keep resp. store information useful for
debugging. Temporary files are not deleted. Other
functions might implement some logging etc.
- heuristic exit
new var `py-max-
py-end-
`py-max-
a hang from a possibly eternal loop.
- `py-statement' no longer refferred to `py-copy-statement'
Same with block, def, expression etc. `py-statement' made
own command, which returns statement, a string.
- boolean `py-max-
If "*Python-
Updated .
New in version 6.1.2
Written for python-mode.el by Andreas Roehler on 2013-09-02
- simplified menu
- `py-execute-
Controlled by boolean `py-store-
When non-nil, put resulting string of `py-execute-...' into kill-ring, so it might be yanked.
- commands deleting all commented lines:
`py-delete-
`py-delete-
`py-delete-
`py-delete-
- boolean `py-indent-
If non-nil, indents elements of list a value of `py-indent-offset' to first element:
def foo():
if (foo &&
baz):
bar()
Default lines up with first element:
def foo():
if (foo &&
baz):
bar()
- `py-output-buffer' made customizable
See boolean `py-enforce-
- exceptions following executed regions made point to source
- command `py-empty-
Deletes all elements from list before point
With when cursor after
mystring[0:1]
-------------^
==>
mystring[]
---------^
In result cursor is insided emptied delimited form."
- `py-minor-
grasps keyword-arguments
- boolean `py-electric-
If behind a delimited form of braces, brackets or parentheses,
`py-electric-
- py-flakes8-run, flakes8 API
- customizable `py-backslashed
- boolean `py-pylint-
If current buffers file should be offered for check.
Otherwise `py-pylint-run' looks up filename from history
- boolean `py-prompt-
When called interactively, ask for save before a
changed buffer is sent to interpreter.
- customizable `py-closing-
Number of chars, closing parenthesis outdent from opening
- customizable `py-uncomment-
When non-nil, after uncomment indent lines.
- boolean `py-load-
If skeleton definitions should be loaded
- boolean `py-if-
Allows execution of code inside blocks started by
if __name__== '__main__'
- boolean `py-highlight-
When py-execute-... commands raise an error, respective code in source-buffer will be highlighted.
- `py-remove-
Remove overlays as set when `py-highlight-
- `py-which-
- unused variable `py-backspace-
- Bundled third-party-stuff removed as reported conflicting at emacs-mirror, lp:1153998
affects autopair.el, smart-operator.el
Kept menu switches resp. commands will issue a warning
- dropped `py-paragraph-
- `py-set-
If non-nil, $PAGER is set to 'cat'
- in directory doc customizable variables are listed:
variables-
Caveat: Please save buffer before C-c C-c, otherwise a bug shows up.
Bug is fixed in current trunk.
Updated .
python-mode.el-6.1.1
Written for python-mode.el by Andreas Roehler on 2013-02-23
New in version 6.1.1
-------
- comment-related commands:
py-uncomment
py-comment-block, py-comment-clause,
py-comment-
py-comment-class, py-comment-
py-comment-
- boolean `py-set-
If `t', enables use Python specific `fill-column' according to
`py-docstring
and `py-comment-
- boolean `py-tab-
when `t', TAB will indent/cycle the region, not just the current line.
- boolean `py-tab-
when `t', when first TAB doesn't shift, `indent-region' is called
- command from RET customizable via `py-return-key':
`py-newline-
- boolean `py-use-
If non-nil, documention strings get `font-lock-
- boolean `py-newline-
Delete trailing whitespace maybe left by `py-newline-
- `py-electric-
- py-up minor API change
If inside a delimited form --string or list-- go to it's beginning
If not at beginning of a statement or block, go to it's beginning
If at beginning of a statement or block, go to beginning one level above of c
- py-down minor API change:
Go to beginning of one level below of compound statement or definition at point.
If no statement or block below, but a delimited form --string or list-- go to it's beginning.
Repeated call from there will behave like down-list.
- commands make underscore syntax changes easier:
toggle-
py-underscore
py-underscore
- py-update-imports removed
Do not maintain a static variable containing needed imports
Determine imports on the fly rather, as it might change
the very moment
- variable `py-fill-