From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21942 invoked by alias); 21 Nov 2014 10:42:07 -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: 33739 Received: (qmail 5437 invoked from network); 21 Nov 2014 10:41:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1416566158; bh=aytor6+nq4buTbdf+LCRiFW0T/JvExYxK0xBjQeCC80=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=rhL/FvGqiMK8xRcWXG87CmcDOu+qTUp9q6HMHAMmm7DBDciYn/I6MMgUOds53Z1ewaNenpLVs0hZnuBU6a0lXTU3mH7qSVUtIyaIXUh5/Pj64oMFE33WhiMSGZ7a1EtQeYHJYnREa4ScKE0ccgZFyC8c/89fmtjBe0t0xL7MLLzRab0QBHyjZBQUrXQPo82qXMDod8fQ8vxcY94sxrTOXRJ5rNijZ72fqeG9Usn43ca69DqWcZBJ7XQ7eLdygDEfe+r1Y19Ca32gMfod8A9DvpEq04rI5hdsyzvsyUar5Xm6JB5dnJFKQj/7tbWbGJsHLLhB42mvbrlOIqHX6sID8w== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.co.uk; b=dbxh/9jIDdvlG7+trDZSX1puOeF1Br+03W458opEwedSqZheLCgpQKOMBcFs7XPSXBeumZoCTZ3AUvnHeOt0h+nVzHOUErQVWDklUBh1V++jZ8J0udtFsmsxS2Sjb+BFSmJwmrbByukA9PfgkX7RyeczHo4Lth30qy59C9b05mm/P12RC8GVlRLXpY7BgmCuH7yI3TY7AOiPW91yhcsSCfQyi/UJu4pm9KfBeuNysUJm2JH2ISfTpFCLaWkqmziXOWYBrSfRIHdQsr06Bbr6lxbJwIHs1OXqxFHWbdHpz3ieUpMXUg9DRO5Mjs1t3biTrJ+bsfmMLZqEX+kZuUZTyA==; X-Yahoo-Newman-Id: 469243.27574.bm@smtp106.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: U7_zaUAVM1l7VHis5iacfjOWk_knbrYBba981MuxH03qjwA DwSVXSVYvCrVYfQuAmpgO7agMzTPwTn3giWG1EegDTOLt1QJRBc5qhp0gQ7H koXsGThfwcvR1vNWsaF.kNVx3nZwBicawx5duTXsoLRxdT8Hqm7_sYuy6iQ6 bItj2prg3V7JDE.sn23c6Gu8dLbU6..SpL6kBN3.RBHAdWllh1s2MyoJyz3v Ddd621Str6bF8wXpDGrPKGUUAOYLJngMYdQWtTiT.kZWbmYOdcj9Jgec5bCM 7v3UrqsS0PIM.PDT585Rxk94SZ7Rqz7s4De6X_a2D9wvUJYFT0hNT7KvWdVW x6mPlnw6juqG8c7X0F2vTRF39XU.JZkEWvEMfFB4BYk3g.iSlr8QyRQ00GxP 2k_D0AZQGxsqA5PFiK_MMb8HAZ34ywDhRMsBqMea1N3sBXkA.pKAcKe6E3xI wGJGjFayuz1S1r6VpnTts1CIABTK7RFcSsTJPdVGG7dTPa8nhn7LwOtwE8cL FWPI1sS13gCni26_euqzQwE0w624tKg-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <141120164942.ZM3953@torch.brasslantern.com> From: Oliver Kiddle References: <930.1416260160@thecus.kiddle.eu> <42F4E5F2-97E7-4803-87CB-B1C67CD943B2@kba.biglobe.ne.jp> <15511.1416528068@thecus.kiddle.eu> <141120164942.ZM3953@torch.brasslantern.com> To: "zsh-workers@zsh.org" Subject: Re: PATCH: key bindings, fixes, docs, tests for vi stuff MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18014.1416566148.1@thecus.kiddle.eu> Date: Fri, 21 Nov 2014 11:35:50 +0100 Message-ID: <18016.1416566150@thecus.kiddle.eu> Bart wrote: > } + * textobjects.c - ZLE module implementing Vim style text objects > > This isn't actually a "module" is it? It's just part of the ZLE vi > widget set? Yes. It was when I wrote that text. > I have from time to time wondered if segregating some of the builtin > widgets into loadable modules might be beneficial. This is something I was also pondering. The main obstacle to this, and the reason I pulled textobjects inline, relates to keybindings: If someone has their bindkey commands early in .zshrc, we don't want those to be overridden later when a module gets loaded. This problem already means everyone has to take care to put their listscroll and menuselect bindings late in their .zshrc. As one solution, we could have all default bindings in zle.so. I haven't checked what happens if that includes bindings to autoloadable widgets: (i.e. if it is possible and if so whether that results in instant or deferred loading). I wouldn't want a module for execute-named-cmd loaded just because I want to bind a few keys in the command keymap but I'd want the keymap to be there. Do you have any thoughts on what a logical division into modules would be? I was thinking along the lines of the vi/emacs split but only for those widgets that are unlikely to be used for the opposite mode. We might also have a few smaller modules, e.g. for execute-named-cmd. I use a shell function replacement that uses read-from-minibuffer. The only existing module: deltochar appears to be mainly there to provide an example of doing widgets as a module. Is it a fairly much standard thing to an emacs user or is it logical to have it on its own? I also wonder if we could make it possible for shell function widgets to specify some sort of default key binding much as is possible for completion widgets. For text objects I was going to mostly use shell functions. Of the two existing ones, shell-word needs the lexer and basic words are sort of fundamental. I've perhaps made them more vim compatible than was necessary except where the vim behaviour looks like a bug (successive newlines and the first character in the buffer). Oliver