Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76502

Adapt bash readline operate-and-get-next

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '+++': 0.03; 'static': 0.04; 'diff': 0.07; 'granted,': 0.07; 'initialize': 0.07; '#endif': 0.09; '+/*': 0.09; 'assuming': 0.09; 'bash': 0.09; 'content-type:text/x-diff': 0.09; 'function,': 0.09; 'received:151': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'mostly': 0.14; '(int': 0.16; '+#define': 0.16; '+#endif': 0.16; '+#if': 0.16; '+#ifndef': 0.16; '-1;': 0.16; 'command.': 0.16; 'count,': 0.16; 'emanuele': 0.16; 'fluent': 0.16; 'mercurial,': 0.16; 'module?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'xxx:': 0.16; 'attach': 0.16; ':-)': 0.16; 'do,': 0.16; 'wrote:': 0.18; 'library': 0.18; 'ticket': 0.19; '(where': 0.19; 'code,': 0.22; 'memory': 0.22; 'aug': 0.22; 'shell': 0.22; 'skip:+ 20': 0.22; 'header:User-Agent:1': 0.23; 'char': 0.24; 'mon,': 0.24; '---': 0.24; "i've": 0.25; '(see': 0.26; '+0200': 0.26; 'equivalent': 0.26; 'possibly': 0.26; 'skip:" 20': 0.27; 'header:X -Complaints-To:1': 0.27; 'tried': 0.27; 'appreciated.': 0.29; '0);': 0.29; 'patch': 0.29; 'related': 0.29; 'skip:( 20': 0.30; "i'm": 0.30; 'work.': 0.31; 'code': 0.31; 'complete,': 0.31; "d'aprano": 0.31; 'default,': 0.31; 'enabled': 0.31; 'skip:! 10': 0.31; 'steven': 0.31; 'subject:next': 0.31; 'writes:': 0.31; 'open': 0.33; 'not.': 0.33; 'there,': 0.34; "i'd": 0.34; '+0200,': 0.36; 'next': 0.36; 'should': 0.36; 'positive': 0.37; 'skip:o 20': 0.38; 'apple': 0.38; 'filled': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'does': 0.39; 'use.': 0.39; 'to:addr:python.org': 0.39; 'system.': 0.39; 'received:org': 0.40; 'even': 0.60; 'che': 0.60; 'eventually': 0.60; 'forum': 0.61; 'skip:o 30': 0.61; 'full': 0.61; 'first': 0.61; 'hear': 0.63; 'determine': 0.67; 'hints': 0.68; 'line,': 0.68; 'skip:r 40': 0.68; 'default': 0.69; 'skip:r 30': 0.69; 'opinions': 0.70; 'jul': 0.74; 'touch': 0.74; 'goal': 0.75; 'subject:get': 0.81; 'quando': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Lele Gaifax <lele@metapensiero.it>
Subject Adapt bash readline operate-and-get-next
Date Mon, 18 Aug 2014 20:49:13 +0200
Organization Nautilus Entertainments
References <232acf45-096d-466a-aa75-06d8c378b128@googlegroups.com> <53cc376e$0$2898$e4fe514c@news.xs4all.nl> <53926733-5e65-482f-96bc-0171c6a93d59@googlegroups.com> <mailman.12102.1405904534.18130.python-list@python.org> <4882fd4d-b772-4ebb-8aaa-0c20be6051b6@googlegroups.com> <mailman.12108.1405910327.18130.python-list@python.org> <lqj806$52h$1@reader1.panix.com> <CAPTjJmr8q-nQvgiwY7eWp8zMMZDi-OdvmrOKs-xCs=M4O2jR5Q@mail.gmail.com> <mailman.12130.1405958264.18130.python-list@python.org> <53cd47fc$0$6574$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type multipart/mixed; boundary="=-=-="
X-Gmane-NNTP-Posting-Host 151.62.28.218
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux)
Cancel-Lock sha1:zsON0z132Ldro4k/gFdBvreMcPI=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.13110.1408387774.18130.python-list@python.org> (permalink)
Lines 136
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1408387774 news.xs4all.nl 2952 [2001:888:2000:d::a6]:50186
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:76502

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Steven D'Aprano <steve+comp.lang.python@pearwood.info> writes:

> On Mon, 21 Jul 2014 17:57:22 +0200, Lele Gaifax wrote:
>> Granted, the readline library exposes a "operate-and-get-next" function,
>> by default bound to \C-o...
>
> Have you actually got that working in Python with the readline module? 
> I've tried and tried and cannot get it to work. Any hints gratefully 
> appreciated.

This is just a first attempt to adapt the Bash code to the Python
readline.c module: I'm very surprised that the half-an-hour I spent on
it, mostly to locate related code, actually full filled the goal :-)

The patch isn't complete, in particular, it does not work on Apple's
libedit, because I have no way to try it on that system. Also, I'm not
fluent with Mercurial, so this is just a "hg diff".

Even if I know this is not the right forum and I should (and I
eventually do, assuming a positive feedback) instead open a ticket and
attach the patch there, I'd like to hear opinions on whether this should
be enabled by default, and possibly get in touch with some Apple
owner...

ciao, lele.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-20 14:14 -0700
  Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-20 22:36 +0100
  Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2014-07-20 23:40 +0200
    Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-20 15:44 -0700
      Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-21 11:02 +1000
        Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-20 19:06 -0700
          Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Tim Chase <python.list@tim.thechases.com> - 2014-07-20 21:30 -0500
          Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-21 12:38 +1000
            Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Grant Edwards <invalid@invalid.invalid> - 2014-07-21 14:27 +0000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Shiyao Ma <i@introo.me> - 2014-07-21 22:40 +0800
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Grant Edwards <invalid@invalid.invalid> - 2014-07-21 16:51 +0000
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Grant Edwards <invalid@invalid.invalid> - 2014-07-21 16:57 +0000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-22 00:48 +1000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-22 00:51 +1000
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Grant Edwards <invalid@invalid.invalid> - 2014-07-21 16:55 +0000
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-22 03:56 +1000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Monte Milanuk <memilanuk@invalid.com> - 2014-07-21 14:55 +0000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-21 16:19 +0100
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Grant Edwards <invalid@invalid.invalid> - 2014-07-21 16:56 +0000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-22 01:27 +1000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Lele Gaifax <lele@metapensiero.it> - 2014-07-21 17:57 +0200
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-21 17:03 +0000
                Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Lele Gaifax <lele@metapensiero.it> - 2014-07-21 19:40 +0200
                Adapt bash readline operate-and-get-next Lele Gaifax <lele@metapensiero.it> - 2014-08-18 20:49 +0200
                Re: Adapt bash readline operate-and-get-next Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-19 10:17 +1000
                Re: Adapt bash readline operate-and-get-next Chris Angelico <rosuav@gmail.com> - 2014-08-19 10:32 +1000
                Re: Adapt bash readline operate-and-get-next Lele Gaifax <lele@metapensiero.it> - 2014-08-19 10:49 +0200
                Re: Adapt bash readline operate-and-get-next Lele Gaifax <lele@metapensiero.it> - 2014-08-19 11:51 +0200
                Re: Adapt bash readline operate-and-get-next Skip Montanaro <skip@pobox.com> - 2014-08-18 14:06 -0500
                Re: Adapt bash readline operate-and-get-next Lele Gaifax <lele@metapensiero.it> - 2014-08-19 10:44 +0200
                Re: Adapt bash readline operate-and-get-next Skip Montanaro <skip@pobox.com> - 2014-08-19 07:45 -0500
                Re: Adapt bash readline operate-and-get-next Lele Gaifax <lele@metapensiero.it> - 2014-08-19 15:10 +0200
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-22 02:05 +1000
              Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Terry Reedy <tjreedy@udel.edu> - 2014-07-21 15:16 -0400
            RE: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! "Coll-Barth, Michael" <Michael.Coll-Barth@VerizonWireless.com> - 2014-07-21 10:51 -0400
          Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-21 03:45 +0100
          Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Terry Reedy <tjreedy@udel.edu> - 2014-07-20 23:05 -0400
          Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Chris Angelico <rosuav@gmail.com> - 2014-07-21 13:09 +1000
          Re: PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"! Martin S <shieldfire@gmail.com> - 2014-07-21 09:51 +0200
    Re: Tabbed IDLE (was PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!) Tim Chase <python.list@tim.thechases.com> - 2014-07-20 19:56 -0500
    Re: Tabbed IDLE (was PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!) Chris Angelico <rosuav@gmail.com> - 2014-07-21 11:04 +1000
    Re: Tabbed IDLE (was PyWart(2.7.8) IDLE is more buggy than "Joe's apartment"!) Tim Chase <tim@thechases.com> - 2014-07-20 19:55 -0500
  Idle open file dialogs (was ...) Terry Reedy <tjreedy@udel.edu> - 2014-07-20 22:59 -0400

csiph-web