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,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29243 invoked from network); 4 Sep 2022 09:42:42 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Sep 2022 09:42:42 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662284562; b=sMHS7H5tF99X0R70cob7f0RKvcr94mqTwnuNTYa4E4bN+PHBUflpIDBConaQEWYMjEfnhZoOaD wRgRHzSVq6l8OErJ0R8w8u/k+oVn6wF5BRi1FgnAQh6paCrhQ8fF0ur25NU52JP4GnHj+rDhTh 9qhOTuTMFrYzOsn0lSWMv68J4e2yAh+Ll74DZzhStpF0fKLGSzS/tFyDQb5/z9RJCTgsv0iOfk VKBDvC1OuXb0vNSrXNVF5PiLH8o7XNEqKtCxjAFK438dx4KzjsRYtIpHKW6+hJQzSd/op3/1rV 5r/FY6iWbhQwMj7RYtXT4OjO89ZWHjrCzDUOos/TfkOOZA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1662284562; bh=A9M1AERzg6qm0aLg2CqieiXP0C7Ism352N25jvw4ceg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=T+NkcPtfdY8LsOy4sdmbYAmsB1L92oT9KPuuqX9vB9EzGJJDW4bTgqtRwUZnbtish28bNEe1EQ IAtPUMgWTUQ8cTf+TcxrQSgX9wi80VMcPkxlzLI/2shT/OE3oZy/AQnB/3VBaas4f/orEYRbVJ l9nvFTTVMsaM6rbBY1o7ZrRyUi5uEbJ0wm1ot0Iu+HBg5ttxTOU4ixHXSIBW/7qdnCv3fF9YZ4 0K8Da9/bd1s+IS22YRkhfu0uR3PD2L+00fdOPeCj+SVN7zXnNfGCaplHI1EAlWn7bIE6bJbrph CC9f/EfavNp7yxv+/a1n9IWk9v9hfz21SwJVIs88f7CvRQ==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=C40f0alTpQyyJBgJyiG/RjUpP0d41hj9qwtQfbgU8sk=; b=NPtRIw6XbGWWWQGkbczq9a9vNu pYhw0SI+AOa2ktxe0NB+By2L0iUiUn+XcO+Ewa/3ilt31ZG1JUnMB83Pzx747NFByUh3gZl8e9+42 is73XIzOtfG+ROUW0ABIrVD2XrZ8GvNhb6UZzJ3mr3DZNTlJGafJOp6ORo/xNgllLlBrbwXvHv+7D z6OQwMP4ERjghqqhuJbgkkcCk8ETeAUP9A8ULgTFRBinXxuYvb2Pvh6wV5CL5doewYtM5de7h+VJb iadOdf1ejwl1iVqvaHyp2TuyA0hsxrQwFDo8MkJ4fVP64c/rJe1XuP5fo+wHpDfSKr40fnFjBXG0P pUWXKLNQ==; Received: from authenticated user by zero.zsh.org with local id 1oUm9K-000PII-5V; Sun, 04 Sep 2022 09:42:42 +0000 Authentication-Results: zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out1-smtp.messagingengine.com ([66.111.4.25]:57213) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oUm8y-000OxV-Fe; Sun, 04 Sep 2022 09:42:21 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 98D265C00A1; Sun, 4 Sep 2022 05:42:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 04 Sep 2022 05:42:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; 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=fm3; t=1662284539; x=1662370939; bh=C40f0alTpQyyJBgJyiG/RjUpP 0d41hj9qwtQfbgU8sk=; b=QhqZY/QS6L9VpngjDweXupM2VN6niQBftn3/pxm45 MbJKhnN89I93sciNF2ZHR0fucWl8lhCt6FW4GoFQq5HRtlocgL+YS8DPOtqg9MIF Z8szYZrZi2CMB2ZEwS4+0KvdKrvNMNh+15sd9Dg5PVCUlQEunp2ash90SanK8kzF PaWVMzix+wqCvEduXPZ1AddVdMSbUBS0S79lZ9he5sEuwLAMczCq0mcJyQ+88bus qbygcZr9xBlqVPsQociqEvFqMOIBRhDNIrZRslLg6wVjE9Rpm7sLzj4+MiZWF2YV jpuxpdL0A684rQexxsFdW7J3dQqW/eebNWEPrGkgMo4ig== 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=fm1; t=1662284539; x=1662370939; bh=C 40f0alTpQyyJBgJyiG/RjUpP0d41hj9qwtQfbgU8sk=; b=Q9To0rH727tnmqjnL CCqzDSx/LHNQZYpRD5qDud0YkuD9O4wQ4eAq2PMqSUauMbL/rlkBaOzhvRlHunD3 dSgxTv7Yu9WHkr5ngIPV5Sp6Rm7xUmZDWcHy05Z8z1yTMf2uMf5h++UtLkoMn8l3 7vyITFkPWgcluYzP/TutjPg300Cyv05U9PC/Heb1yRqt55pOaE/MtNsgRUmBPrye ZyQjgsq4FfN3EGJmDv62yiyuKl7mCKU+VTWQBjBUaoEuU7Da2hr43PoEo4vHKmO5 ijaN6Pz0fYqFGBfPHlkJqXlEMfAxssGoDclCkwF14C8VojkLpx440xgLDx2s9W+H gi5Rw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelgedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggugfgjfgesth ektddttderudenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghn ihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuggftrfgrthhtvghrnhepfeffhfekgeevve ekiedtjeefgfeuieekfefgleeitdefieefffefvdfggeelveegnecuffhomhgrihhnpehs thgrtghkvgigtghhrghnghgvrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 4 Sep 2022 05:42:19 -0400 (EDT) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4ML6BJ41W4z1bg; Sun, 4 Sep 2022 09:42:16 +0000 (UTC) Date: Sun, 4 Sep 2022 09:42:16 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: ${EDITOR} with spaces (was: Re: [PATCH] initialization of main keymap) Message-ID: <20220904094216.GV5920@tarpaulin.shahaf.local2> References: <20220831122842.GC992100@zira.vinc17.org> <20220901002300.GD992100@zira.vinc17.org> <20220901012122.GA1046913@zira.vinc17.org> <20220902000406.GB1046913@zira.vinc17.org> <20220902131533.GC255755@cventin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220902131533.GC255755@cventin.lip.ens-lyon.fr> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 50602 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Vincent Lefevre wrote on Fri, Sep 02, 2022 at 15:15:33 +0200: > On 2022-09-01 22:06:03 -0700, Bart Schaefer wrote: > > Upon further thought ... > > 1) It's a bit odd that if both VISUAL and EDITOR are set, and VISUAL > > is not set to a variant of vi, but EDITOR is, then zsh prefers to use > > the bindings corresponding to EDITOR. > > 2) As written the patch will always give Vincent the emacs bindings > > because strstr() starts at the beginning and finds "vinc17" before > > ever looking beyond the rindex(). > > > > Perhaps we should prefer VISUAL any time it is set? > > Yes, the current behavior (with or without the patch) is definitely > incorrect. For instance, https://unix.stackexchange.com/a/4861/74516 > suggests to set VISUAL to the full-screen editor, and either leave > EDITOR unset or set it to "vi -e" (just in case a special line mode > would be needed in some context). So a user who would use VISUAL=emacs > and EDITOR="vi -e" would probably be annoyed by the current behavior. Is $EDITOR meant to be used in a system(3) manner, as «system("${EDITOR} ${(q-)filename}")», or in an execve(2) manner, as «execl($EDITOR, $EDITOR, $filename)»? (plus or minus a «--» guard in both cases) Cheers, Daniel