From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18263 invoked by alias); 19 Jan 2016 08:29:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37687 Received: (qmail 6129 invoked from network); 19 Jan 2016 08:29:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=/+q0Ms/rn03DewESKwOeJqAWhUkmW39/Kwhi2m/Ff1k=; b=u29dvk3z+uTBj1pvKuo4kW8hoEGuMzyJ5e0TPiqR4Wsine7BEIFHX84qrUI2lVxBpX rx3wAC70T5yoUEtRnFWAUh4BoRf7ZYPUNrnX3s8f6P3UCDsr8BU6/N0ilTxueLKf7QsS p90vhGP3KVKEvv7jEgxQoxDoDbaXwGaNC1Kio77pP9kvB07paMuGlY/COB5hmKQtu76w kcg43NLvy4neftxGAi2E0GV/UsBxu6K6XZTE1SPgewqE72eIFB/LBQT5wtgfGTWGxkEC aVPw5dsGcUVkUMxvVWHVFTVxJOX1OMdfIpfImGuWlPUL7U6cB2s9u7k20dTz99ieR0mr 7GAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=/+q0Ms/rn03DewESKwOeJqAWhUkmW39/Kwhi2m/Ff1k=; b=fT2zysHSA1WwZEoT7IAHLr8VLTb5P6SJKYaNs1VF4aZQAl6DDgXEIJUJpUyx/V+vpO Vj7dGVOS99JJlR6qOxLge0yVt205Ov/Am+LlmzxpLJEO/0Qlet+U45Stb3ajtB0gH+ZC ftc6gOM7X3PT7TgJBQSumcHweFErec4+6fJV7/bvm4oshCcL3fFNstJFCsfOYKps2Bbk kKGGBDu4C2LspaTMXkfIvgJEoZkmktxPT5ZWUObdyMbWCdkR7NupJVq09yD68vwslZNU qAObgegon6Ybx/qOsGs9TZ4zZI60gUyZ2LAZD7oMXS4N9qNqb7Bq9GI+NBSxc1CNZK3k gLpg== X-Gm-Message-State: ALoCoQkwNDlr65UEPy9AbNyW5cnor2fuYBfYvKztTEztgFyBt4JBBCuqgY8gm4Q8pC029IWUUm3AiP/MjXa7CWYxzYR50C2Q+A== X-Received: by 10.112.199.41 with SMTP id jh9mr10198895lbc.125.1453192136587; Tue, 19 Jan 2016 00:28:56 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <160118223126.ZM28565@torch.brasslantern.com> References: <160111233259.ZM6719@torch.brasslantern.com> <160118223126.ZM28565@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Tue, 19 Jan 2016 09:28:37 +0100 Message-ID: Subject: Re: "drop-in replacement" and transpose-words-match To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 19 January 2016 at 07:31, Bart Schaefer wrote: > [I would probably save CURSOR and MARK, set CURSOR to zero, then loop > on "zle forward-word" until I reached or passed the old CURSOR, rather > than try to match up the results of (Z:n:) to $BUFFER. Then restore > CURSOR and MARK, of course.] This would miss spaces. zew-pb remembers white space before each word. This allows to preserve them when rebuilding buffer after e.g. word swapping I'm now writing a shell division function that would be used instead of pure (Z+n+), in zew-pb. The point is to have a meaningful word division in case if user enters '$(( 0 + 1 abc $(( 0 + 2' and tries to complete after '$(( 0 + 1' or '$(( 0 + 2'. A tedious task, will call (z) in number slightly greater than number of letters. My point is that Zsh could provide more information (besides LBUFFER) to Zle and compsys, and also zsh-syntax-highlighting. Not completely sure yet what the information should be. Zsh-syntax-highlighting can be slow, which can be seen by editing ~400 lines function with zed -f. Maybe it's because it's doing various things to compensate not that rich information provided by Zsh. Best regards, Sebastian Gniazdowski