[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47575: python-shell-completion-at-point omits %magic commands
From: |
Lars Ingebrigtsen |
Subject: |
bug#47575: python-shell-completion-at-point omits %magic commands |
Date: |
Thu, 06 May 2021 13:05:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
JD Smith <jdtsmith@gmail.com> writes:
> When using iPython as the inferior shell of python.el,
> `python-shell-completion-at-point' skips a `simple-operator’ regexp which
> include
> ?%. In iPython, magic commands begin with ‘%’, and the fallback completion
> method happily provides them for completion:
>
> In [67]: __PYTHON_EL_get_completions("%ru")
> Out[91]: ['%%ruby', '%run’]
>
> python-shell-completion-at-point trims this to “ru”, which also provides the
> same
> completions above, but which `try-completions’ rejects as non-matching. So
> that:
>
> In [1]: %ru[Tab]
>
> Leads to “No matches”.
>
> The solution would be to not skip the ?% character if it is at the start of
> the line. The
> modulo operator cannot occur there in any case.
The simple-operator was added to fix bug#37808 in:
commit 51d3c95147efa80fd3e09c90705439517e8fb6ca
Author: Andrii Kolomoiets <andreyk.mad@gmail.com>
AuthorDate: Fri Oct 18 16:04:32 2019 +0300
I've added Andrii to the CCs.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#47575: python-shell-completion-at-point omits %magic commands,
Lars Ingebrigtsen <=