From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16471 invoked by alias); 24 Jul 2016 19:49:54 -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: 38938 Received: (qmail 14343 invoked from network); 24 Jul 2016 19:49:54 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-2.server.virginmedia.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(80.0.253.66):SA:0(-0.0/5.0):. Processed in 0.14803 secs); 24 Jul 2016 19:49:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _smtprelay.virginmedia.com designates 80.0.253.66 as permitted sender) X-Originating-IP: [86.21.161.213] X-Spam: 0 X-Authority: v=2.1 cv=XKnNMlVE c=1 sm=1 tr=0 a=oo3MgO7t/4XyXFuSzI3dDQ==:117 a=oo3MgO7t/4XyXFuSzI3dDQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=BrDiTsk0AAAA:8 a=U4dcAN_C-czxQV34froA:9 a=CjuIK1q_8ugA:10 a=fK1jZSgjKPFatbRoI9mg:22 Date: Sun, 24 Jul 2016 20:44:08 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: bug with camel case and delete-whole-word-match function Message-ID: <20160724204408.60e35d6a@ntlworld.com> In-Reply-To: <5374.1469315162@hydra.kiddle.eu> References: <588168129.3340906.1467709726474.JavaMail.yahoo.ref@mail.yahoo.com> <588168129.3340906.1467709726474.JavaMail.yahoo@mail.yahoo.com> <20160705111900.7e1599f0@pwslap01u.europe.root.pri> <5374.1469315162@hydra.kiddle.eu> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 24 Jul 2016 01:06:02 +0200 Oliver Kiddle wrote: > On 5 Jul, Peter wrote: > > If you have "ThisIsSomeWords" > > > However, if you're on the "S", you get "Is" before and "Some" after. > > Again there's no white space, so there's nothing to indicate to the > > calling function that these are two separate words rather than bits of > > the same word. So I think we'd need to add some extra signalling from > > match-words-by-style to indicate "I'm at a word start" whether or not > > there's white space, which needs some thinking about. > > Do we need to keep the existing seven elements of matched_words > unchanged for backwards compatibility? Not that I can think of a > particularly obvious way to augment it for this case. May be just > a 1/0 indicator for start of word is the simplest. It also seems > to lack having a field. Yes, something like that. I was wondering if it was time to keep the current way for backward compatibility but switch to a keyword-based (associative array?) system for future enhancements. > One is that if the cursor is in the middle of a block of whitespace > at the end of the line, the 4th element (whitespace after cursor) > is empty while element 7 contains the whitespace. > A similar issue occurs at the start of the line - element 1 contains > whitespace while element 3 doesn't. Might simply not be using an inclusive enough type of white space? pws