[issue22228] Adapt bash readline operate-and-get-next function

2020-12-20 Thread Lele Gaifax
Lele Gaifax added the comment: Hey, recompiling current master against readline 8.1 gives an interpreter where this is already working: rl_operate_and_get_next() is bound to Control-o in the standard emacs keymap! http://git.savannah.gnu.org/cgit/readline.git/tree/emacs_keymap.c?h=readline-8

[issue22228] Adapt bash readline operate-and-get-next function

2020-12-17 Thread Lele Gaifax
Lele Gaifax added the comment: Apparently, now the operate-and-get-next function has been moved to the readline library, so hopefully it will be easier to get its advantage. See point 2.j in https://lwn.net/Articles/839213/ -- ___ Python tracker

[issue22228] Adapt bash readline operate-and-get-next function

2019-02-08 Thread Lele Gaifax
Lele Gaifax added the comment: I rebased my work on current master of the cpython git repository, cherry picking the changes from the old branch (that was based on a at the time unofficial git mirror of the mercurial repository). To avoid any ambiguity I called it "issue8_3", so it is n

[issue22228] Adapt bash readline operate-and-get-next function

2019-02-06 Thread Lele Gaifax
Lele Gaifax added the comment: Luckily the referenced branch is still around on GH: https://github.com/lelit/cpython-hg-mirror/tree/issue8_2 As the name says, it is not related to modern CPython' git repo though. -- ___ Python tracker

[issue22228] Adapt bash readline operate-and-get-next function

2019-02-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: If the licencing issue is resolved, can we reconsider this for 3.8? -- versions: +Python 3.8 -Python 3.6 ___ Python tracker ___

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-22 Thread Martin Panter
Martin Panter added the comment: It looks like ctypes uses ffi_closure_alloc() to allocate an executable function on demand. So it should be possible for readline to also call libffi and do this, but certainly not trivial. >>> from ctypes import * >>> @CFUNCTYPE(c_int, c_int, c_int) ... def op

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-22 Thread Lele Gaifax
Lele Gaifax added the comment: I addressed Martin's comments (thank you!) in https://github.com/lelit/cpython/commits/issue8_2, removing pointless usage of a macro and avoiding usage of module's state to store the "next line index", keeping it in a plain static variable. Let me know how it l

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-21 Thread Martin Panter
Martin Panter added the comment: For the record, this “operate-and-get-next” function is documented in Bash at . It is supposed to finish entering the current

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : -- Removed message: http://bugs.python.org/msg268811 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : -- Removed message: http://bugs.python.org/msg268812 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : -- Removed message: http://bugs.python.org/msg268809 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : -- Removed message: http://bugs.python.org/msg268808 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : -- components: -Tests nosy: -Daniel Griffin, Daniel Griffin, Daniel Griffin ___ Python tracker ___ ___ Py

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file43453/bugreport-2016-05-18-03-28-01.txt ___ Python tracker ___ ___ Python-

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file43454/bugreport-2016-05-18-03-28-01.txt ___ Python tracker ___ ___ Python-

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Berker Peksag
Changes by Berker Peksag : Removed file: http://bugs.python.org/file43455/bugreport-2016-05-18-03-28-01.txt ___ Python tracker ___ ___ Python-

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Lele Gaifax
Lele Gaifax added the comment: Daniel, are these misplaced comments, or should your quite big attachments tell me something I'm missing? -- ___ Python tracker ___ ___

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Daniel Griffin
Daniel Griffin added the comment: example -- components: +Tests nosy: +Daniel Griffin, Daniel Griffin, Daniel Griffin Added file: http://bugs.python.org/file43455/bugreport-2016-05-18-03-28-01.txt ___ Python tracker

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Daniel Griffin
Daniel Griffin added the comment: http://creativecommons.org/licenses/by/4.0/";>https://i.creativecommons.org/l/by/4.0/88x31.png"; />This work is licensed under a http://creativecommons.org/licenses/by/4.0/";>Creative Commons Attribution 4.0 International License. -- nosy: +Daniel Grif

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Daniel Griffin
Daniel Griffin added the comment: http://creativecommons.org/licenses/by/4.0/";>https://i.creativecommons.org/l/by/4.0/88x31.png"; />This work is licensed under a http://creativecommons.org/licenses/by/4.0/";>Creative Commons Attribution 4.0 International License. -- components: +Tests

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-18 Thread Lele Gaifax
Lele Gaifax added the comment: In https://github.com/lelit/cpython/commit/3e5e557a876831a99c21f5a173623cb05ff48abf I reimplemented the functionality in a slightly different and hopefully better way, rebasing it on current master. IANAL, but I think that the new approach is different enough from

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-17 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-16 Thread Lele Gaifax
Lele Gaifax added the comment: I will try to address your concerns. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-16 Thread Martin Panter
Martin Panter added the comment: I will try to have a closer look at this some time, but my immediate worry is it looks like you are directly copying Bash code (GPL) into Python (less restrictive license). Perhaps a more general solution would be to expose rl_add_defun() to native Python code

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-16 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +martin.panter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-16 Thread Berker Peksag
Berker Peksag added the comment: The review comments are at http://bugs.python.org/review/8/#ps12743 (you can also click to the 'review' link above) -- ___ Python tracker __

[issue22228] Adapt bash readline operate-and-get-next function

2016-06-16 Thread Lele Gaifax
Lele Gaifax added the comment: The patch does not apply cleanly anymore, with current 3.6a3. If there is any chance it could be taken into consideration, I will try to rebase it on top of current version. @Berker: as I don't use Rietveld, is it possible for me to reach the comment you mention

[issue22228] Adapt bash readline operate-and-get-next function

2015-10-11 Thread Berker Peksag
Berker Peksag added the comment: I left a comment on Rietveld. If I remember correctly, Modules/readline.c is basically a wrapper around libreadline and libedit. I'm not sure if we can add custom behaviors likes this. Perhaps we can expose some of the libreadline functions in Modules/readline.

[issue22228] Adapt bash readline operate-and-get-next function

2015-10-10 Thread Chris Angelico
Chris Angelico added the comment: Any other interest in this? It'd be nice to get this in trunk and start being able to recommend it to people. -- ___ Python tracker ___ ___

[issue22228] Adapt bash readline operate-and-get-next function

2014-08-20 Thread Chris Angelico
Chris Angelico added the comment: Patch applies nicely to current default, and works for me on amd64 Linux. I'm liking how this is looking. -- ___ Python tracker ___ ___

[issue22228] Adapt bash readline operate-and-get-next function

2014-08-19 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +BreamoreBoy, Rosuav ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue22228] Adapt bash readline operate-and-get-next function

2014-08-19 Thread Lele Gaifax
New submission from Lele Gaifax: Bash implements an handy extension to the history/readline library called "operate-and-get-next" bound by default to Ctrl-O that lets you repeat an arbitrary sequence of input lines possibly editing some of them. This patch adapts the extension to the Python re