Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
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=78BsRbWaeoFjP8x01ZSvx1p1Xe60I405pjUQE+mLkkc=;
        b=h17Qjn1l+UQ58bFh61YExfiFnnVlTXU1gnXBipf/J9j0iE4y8D53nVDgjIgBDxbsAA
         P5VPPT1MqVxRwM6Av/kEa+jKTKV+kPQ0/pqrcLGUEv7VOMZoX53wDPdjw+c5UH2ONr5C
         PI6IUX5HpGqPc1WwV3AXPznyKbqHQ/J4Y99ozV35khxAAHLdBoaKNv62zPlstEgaiLPx
         i/HjtmagFCs1Yc6RW1kNdK+Ae7Pw6I5acbCV4rBOe459aqkXE9vRv36wg7l8BkTCGC3B
         QBhLYcb+UnMWc8ObZyfbiKev3FqqldhfN5gX5FUOiOi1cGmHRZwzl9Ir0KXsVhMOFQqR
         KYLw==
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=78BsRbWaeoFjP8x01ZSvx1p1Xe60I405pjUQE+mLkkc=;
        b=E7o2JX0RKfRJSO1H8AD3aqQ7tbcT4QkJOnSOIJdgIEbfvuKibkvbYjOtNv3MHCOWVq
         woeTWpBTZBf5eEqh10DY2krViou/+twD1Wwi2mX2SO9mfoVxM60/UWCCiqzn6r890q3W
         M8GLz7otbaHHiB4XizLqKhwmmllTZJdQZYgCUnuIN8es9Iqn4dUBXiWpErOnj9dL7b0D
         RQbyc68gAq+tngS65l69W5HVivrngqK9NNi7dIb8CYZZYpwP+NHcI4/9FmvZQxDubREt
         wjBQ8hZpGsgzDU8lS1ENgqJJ4Z4M0hJ7IAiU3/xHQM/qhnuEp04X9nRbidv8KoaWB819
         v3Sw==
X-Gm-Message-State: ALoCoQkT4xFXJAp+FLly2rsDFCcL8ESNhjek89ARzOyoeYEuXNU+R9o8BwzavttbjYZnEIl+UGCSvs+nJSEqraAqHWBvT07HAw==
X-Received: by 10.67.5.228 with SMTP id cp4mr12248443pad.29.1452625927169;
        Tue, 12 Jan 2016 11:12:07 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160112111222.ZM8933@torch.brasslantern.com>
Date: Tue, 12 Jan 2016 11:12:22 -0800
In-Reply-To: <CAKc7PVC8F-sQxPv8bsWQw3X710n8AkNPK6AsjyAneUpDqyACsg@mail.gmail.com>
Comments: In reply to Sebastian Gniazdowski <sgniazdowski@gmail.com>
        "Re: transpose-words-match (Re: New widget "transpose-segments")" (Jan 12, 10:23am)
References: <CAKc7PVCVFN2639GkbitXO_yZtqK02zUWH-oLGYBysv6J3TreTg@mail.gmail.com> 
	<160109092258.ZM3394@torch.brasslantern.com> 
	<160109094833.ZM3453@torch.brasslantern.com> 
	<CAKc7PVDdF0QHbpseYrZ6FqdAzfLe_iqspQkp1v8nJq3rXqFC2g@mail.gmail.com> 
	<160109101801.ZM3561@torch.brasslantern.com> 
	<CAKc7PVC9TBCVtC=ijqJMtcVqcojEi+4Zf4rW_R_gqDgr4NOvAg@mail.gmail.com> 
	<160111222623.ZM6334@torch.brasslantern.com> 
	<CAKc7PVC8F-sQxPv8bsWQw3X710n8AkNPK6AsjyAneUpDqyACsg@mail.gmail.com>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: transpose-words-match (Re: New widget "transpose-segments")
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37587

On Jan 12, 10:23am, Sebastian Gniazdowski wrote:
}
} It's interesting that insert-last-word operates on shell words
} although this is not stated in manual.

insert-last-word operates on elements of the $historywords array, so
if you setopt histlexwords then insert-last-word uses shell words,
and if you don't have that setopt then it uses space-separated words.

} > select-in-shell-word
} 
} Other lines, when ended with space, will also cause the unexpected
} behavior. I should have stated this that it's about space at the end.

Yes, sorry; that's the "in" part of select-in-shell-word.  It selects
the word under the cursor, or (what I hadn't noticed when I created
that little three-line widget) the word to the *right* of the cursor
if between words; and because of vim-ism, it does not cross newlines.
So if you're at the end of a line with whitespace it selects nothing.

} Seems that (Z:n:) would discard the new lines like
} any other white spaces and the code would be simpler.

Actually it doesn't discard them -- they are treated as a word if in
context they act as a separator.  They just aren't converted into
semicolons.

} BTW. I discovered that following multi line command can make various
} versions of zsh hang on it:
} 
[...]
} 
} Does it reproduce to you?

Hangs how?  In ZLE, or when attempting to actually execute the commands?

If the latter, can you "set -vx" to see if it's possible to tell which
line causes the problem?

If the former, you'll have to explain in more detail the steps to
reproduce, including whether it's possible to do so from "zsh -f".

