From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10438 invoked from network); 10 Jul 2022 19:13:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Jul 2022 19:13:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1657480425; b=YZAZrHFJ+Q+irL9ZlbPn1/do8AL/7j36fPB8OPMRMvi7Sys/QqV7cULl8z0JYDYOIkATNOYHfp WPiMLQj+pbh6PTS2SQFdPUgEpjgykbJwfq7xfWskqaHhu/2n37Ifrn4ZMW3tJTeu0wN3ytFkQV SGls0HThoHW69+o1aNkWK8kKn8qG6v0CdMnoOAIcWNqfXBS6QvvTZh2wHIsoLnGN1ZyW3M3DbN pCp1ZHl+Zx0wnISoCNMBiyirFq9BvQsy3WK+6Q+YAQ7qbIGS1OBy2Wib7xW780EO6ZX3G9rJcb dQ4QN0QUKXWK3EPnCOVqA+qHuM8GkHCRMcgOrjf33w4Lyw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=luffy.cx header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=pass header.from=luffy.cx; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1657480425; bh=jt/jHcJXztoDUDdD9Wr3No9Q0WcQqTgLrybsvnp47uM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=KYn+WLXlQ8Bb/0jw+/Y0iK3KUVcZhrtoRBCIHGA0jzAR1HcMQW5GbedenwDebH7dBQtepC5T78 qKF949Ye6f823Bp19bMuRUTZwG5TQPzk9QARW9CosaEhBHBd0z3Qv9KexfaeLZIN1oRkphGqUA EeDCY61DRmXQIfRy35mL/r7yy7DqSx/r+X6LiaHZLmPl+9naetAw+xqRM8NoiyF/y/GkH0578X uD4PlLtOTlzEJ/WEuSwKphNcCVDMyZ4mV3LchAd5Mf329FEKZXacFjbveJ9Ueu4aH9R/So3Y9e GTf6sa+VqeH+JKs87Cd3JNaD+bG/17TKv3VS1Zd8OAvrwA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=371qefbghpI7ekfIdkneU9RpGKbqk5BalH/jxfc6uow=; b=DZi+8H/FFMyzks1GCg6lNm+5uj zXTFl7jrILvzw+VfQ0sVSEhVPZVjstIhqc6ByFwYk1bapy6kfugy97AJiuBM4fCs3Eizuv16liyVz 9Zt7Y668ddVUdEOjIcrgxfyrHaZ+l+PnQZ/jLgTcGsFyaZbHnv3Uro4ru9Ubct+PcHvKb1T53O3Y6 YECt4qhLWIpfeu7ap4KpFRaHr8hKubGeXgRtBPBA0ONS6vXCGmN/6KvNhNjpehF04WxEfk9fwqSyO afwNlm5/JXMq0IFIhvV5fHleCOWjlF47U8Buo43BgJGTFu8B/W0T6KL3v6mlesEBIlU+jh5HlW1Ln 4K2DxnTQ==; Received: from authenticated user by zero.zsh.org with local id 1oAcNE-000Dwi-Lg; Sun, 10 Jul 2022 19:13:44 +0000 Authentication-Results: zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=luffy.cx header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=pass header.from=luffy.cx; arc=none Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40763) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oAcMB-000DFj-Qu; Sun, 10 Jul 2022 19:12:41 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 914345C006D for ; Sun, 10 Jul 2022 15:12:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 10 Jul 2022 15:12:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=luffy.cx; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1657480358; x= 1657566758; bh=371qefbghpI7ekfIdkneU9RpGKbqk5BalH/jxfc6uow=; b=e UhUa9T6DaHMO1KN1J2MkhA9fBtnr+isqn32QcDGaWDtAFcNWjoSRltFy5ScilFQn To+xKe8UANpFHymNMGQsthMIwsS0QAGPwvm7H2UrB1/YBLjChcE8VTmYZvtE7LYj qtTnfkaKTkZHHw4dNOkAcDR85LXKwdb3QLsk+5cwKgpJwncI2IqRWAgOIz8B1XA/ dIlOpKy4Cxgh0pmPFqKY58BmmlmTqo9YI+GYU1NIYpzNPkCoZmSdFLUrnBv8SOKt vaCRJhB0vh6dyVJKxuoCocwZkwH9nGBEVC59b0mBcFaEI0fFCz9tnocdcwapCE+U CW5U5M6aowhZ6t/qoHdZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1657480358; x=1657566758; bh=3 71qefbghpI7ekfIdkneU9RpGKbqk5BalH/jxfc6uow=; b=IIN1d2CMcafK5xVA8 08VLS/hEWYP2jmfMIBgGL4fzEkp+Fck+n2zgld6CccDFHzN1ZRBJq5AtaTPUp9Bj qx3pL3UpRHkpzd0DNxEmvjZokoDKxEXLN+dhM/NOwf6EmHEVWvjPTVGRRx6XVFHI +LmNjYspV4n/CfTup8fw16ifJWxmKRNT+b3x/CpetjNcHZzxRQs4sWGrkMXaZ7PI 2rSe4oi4Rml6PBsBi6ea0qWm1oASm3O4osOAnB0XARlzy3kAn50EDdGuzq9TeVYi rivFYmwGYc9MvnqmbXu1JYlp/aAox6vFdQEQoGjTaA622szQ+Xmtm6IAWRLV2KbU OoHNw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejuddgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeggihhn tggvnhhtuceuvghrnhgrthcuoegsvghrnhgrtheslhhufhhfhidrtgigqeenucggtffrrg htthgvrhhnpedtjeehleevgfefveeffeffffevvefhhffggfehvdetudehudefgfevgeej iefgheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsvghrnhgrtheslhhufhhfhidrtgig X-ME-Proxy: Feedback-ID: i34d144f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 10 Jul 2022 15:12:38 -0400 (EDT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by neo.luffy.cx (Postfix) with ESMTP id 924F318C for ; Sun, 10 Jul 2022 21:12:36 +0200 (CEST) Message-ID: <60ccb13a-447a-09b7-3626-4948487e3ae4@luffy.cx> Date: Sun, 10 Jul 2022 21:12:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Thunderbird/103.0 Subject: Re: Magic URL quoting and bracketed paste gets "disabled" randomly Content-Language: en-US To: Zsh Users References: From: Vincent Bernat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Seq: 27887 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 2022-07-10 19:44, Bart Schaefer wrote: >> I am using autosuggest, so I get: >> >> zle -N bracketed-paste _zsh_autosuggest_bound_1_bracketed-paste > > I can't think of any reason autosuggest would need to rebind that widget. I am adding it to ZSH_AUTOSUGGEST_CLEAR_WIDGETS. I suppose I didn't want the last suggestion to be kept after pasting. >> It seems the condition if [[ "$words[-1]" == (#b)([^:]##):* ]] does not >> match. I am using "disable -p #" which seems to be the cause. Using >> "emulate -L zsh" at the top of the function instead of "setopt >> localoptions" fixes the issue. I though functions should use "emulate -L >> zsh" when using these options, but in Zsh codebase, "setopt >> localoptions" seems used often. Should any of this considered as a bug? > > "emulate -L" potentially resets a lot of things. The decision for > each function has to be whether the scope requires all those elements > to be reset, or whether to make minimal changes so as to behave as > much as possible like the rest of the user's environment > > In the case of url-quote-magic I can't presently think of any reason > not to use "emulate -L". Meantime, I am just wrapping it: autoload -Uz url-quote-magic function _vbe-url-quote-magic() { emulate -L zsh url-quote-magic "$@" } zle -N self-insert _vbe-url-quote-magic > That said, I also can't think of any > contributed function that intentionally defends itself against pattern > disables. It's a wonder I am not running into such issues more often. I'll just disable extendedglob as I am only interested into the negative pattern and I don't use it that often.