From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26695 invoked by alias); 19 Jan 2016 06:31:03 -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: 37686 Received: (qmail 15444 invoked from network); 19 Jan 2016 06:31:01 -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,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=He2KaRdNWbl06fvjBMmhVMaIN7/bUcwtFZ6GEm58ilE=; b=Y1fys3sBkLfNuK8K2UioN4bNdplN4RbUQf8JGPes+scBh5UuIids78b11yAE/vKBFs z2pw+vJI0F3O8nq2SUm6+B6mIxFbhc1mb7th4wrFh7LJ4hXiSQY/JcOd9KF7e5zM0lel DsQSi26lo24uZ/hcGkGD5f8lpyE5laXtvhddqERPxB8KoX0MTTYuxeDbpLCGdIFqjKE2 pyJ1yMQRKaeYwxlxDThgiAujdaNYLdxDPtoSp/w4WZpBfArS+iaxMqiFCF97k406DN5P ekE9mAeJy8lrEt13a1yn5Hqp5VRHNE6uEZVXQamdZHJLaueO5hwQoVnFjmv5yzAjqwUe q29Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=He2KaRdNWbl06fvjBMmhVMaIN7/bUcwtFZ6GEm58ilE=; b=h7r3jdfJjF4xmGR7DcSt4PC7/+BZz319o6nv++Ei+EtNwHop3dKNbpAY91YiIAApdV JG+T4S/d2ra8TDLeJT0DO5dY9OtBotBYTm1D32gvU+vmH+qli5QQzYBpzTu6L10R3q5M xT02VXwbYrv71zpirdiqcedGozDH/d3VvuVuqnhAcCBh8cCYrl8zssLzMd+KGGEm4oti e+5Gyi0/MNx7wsQEQaA3INrTTk5RRYngSq6FudxeuznPoMHcuM3qyVu/ccUaNHgQ3V4K KGIlexBOzMiNlwxCeOb+cnmmK6XK7acLttgBz9tZ0qQw5oy9OA6+/if2DbNwxNLxvzdB NrXg== X-Gm-Message-State: ALoCoQmbkuhXwi2fWcobBunqBycEeOGxBCbq1zbroLgbCLF1TlxvURUlBDIytTY+vCnm/tYAsk3IrRHtaQCcCEC/bqhNCm4ESg== X-Received: by 10.66.148.167 with SMTP id tt7mr42565223pab.62.1453185059247; Mon, 18 Jan 2016 22:30:59 -0800 (PST) From: Bart Schaefer Message-Id: <160118223126.ZM28565@torch.brasslantern.com> Date: Mon, 18 Jan 2016 22:31:26 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: "drop-in replacement" and transpose-words-match" (Jan 18, 6:04pm) References: <160111233259.ZM6719@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: "drop-in replacement" and transpose-words-match MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 18, 6:04pm, Sebastian Gniazdowski wrote: } } My point is: isn't it that sticking to LBUFFER is the source of } various problems? Its use is always more or less hackish and has } effects like "you should position cursor on beginning of a word to } swap it". Implementation generates features while it should be the } opposite. Sorry, I can't agree. By *FAR* the most common editing operation is to either either insert or delete to the left of the cursor position, which means at the end of LBUFFER. Furthermore, zew-process-buffer always manipulates whatever the (z) flag's idea of a "word" is, which [as the "bufferwords()" thread has demonstrated] is somewhat tenuously defined, and may not correspond to what the user wants to consider a "word" (see e.g. $WORDCHARS). [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.]