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 11426 invoked from network); 2 Sep 2022 13:15:50 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 2 Sep 2022 13:15:50 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662124550; b=IDDsKsp+JmQGNTG5Vl/Hcfy1xNuic/lVDnZ9dTdruaoRmJPSc3SzontF3KQ8ha7r0lLL2SyA/C 42cRKlQw7rklROFrv2x1yvTOvodg1iOKZFPz/czb5gtAaJDAkrKVn3K7iHqEGf1m+OMzSo5RYH ZMB1gxOh3Xzki89tIE/3uh/wmAM/SuOZLlejssNQAtO4snoXxuf6xUGNE3l+7xKzhhbh3UIl4T YPSfS5pLL5d/N9IRULpRo2WLNZOCfCjH8PyvUI//VGVteYUWiKmDkgs5krzU2CEAww5Gl82Fvf WoIrph0ADNJg7iPOFuwJoJ8LGwF4s5ehUFRFH947Vs5VaQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1662124550; bh=foKHOd/NdK6Uzyy/ZOCLqd2tXkPb6cH0lNagNyLuLD0=; 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; b=V8LkF86CTWFjNfCr7NCm49hwwLy0OC5B8vmmB7ezmeh8k4TPfcQcCfowDT+iVDuvLms4BBf6qt /RTbLzXmnMPMraP0ufpET4IyLEncC6N2c0GOqpgx325vUQqDWo7zkVubdfTizYnMubXEi2OlhG TYCsmfJVgeGNu3mNJrAN4XEP4OqA1gUcHic0iTZkLjApN3n7XS3PvtZzx6UOfYllbDHboJenIv E9g9h27LhDrzr937U2Xu0+PJVQtz3pOZtvNgLmdyCpp8PhWQeIvp/TnMPWwElOStDZlD0q0kXB GZKDbcA3zNIZspncephYbHU25YoKpmnoyfnSbB8/s5P6Lg==; 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=qfcEmFSuHiEtHtWWxtVfJ47W8ztzTegu1MFdh+H1gjA=; b=r7SNfonVG92cJPkY7ueReSnB5f 9vVjhIczukpmpVbGBRLzcZCAOjwws38dIlPR1ZlvQJtgldVPhQtEB39uN+3nbKufiaCdb0RVn+j47 UutHm77zFpBC2NjE+TvvbmDA2K9+rmE1NbXBnhSAqcXX2WfN3cTNGeysRCBcPaiIFueZm3F02Yik/ M0Bb8bwHOy2ceyhriBAZMQZfs0bZWTE/frNjry/MKpDN55yrBrKgyi1pQHzOtlfFn+k4+Z0+Acxox oIaO94yJ/lmiNoU0FCkydA0GXd8B7qK+82KXdsaCj9NDGPuZLr6Pp3wh4rfiNWRPC8CdAB9rWhJsF tIoDoabQ==; Received: from authenticated user by zero.zsh.org with local id 1oU6WT-000AuZ-MW; Fri, 02 Sep 2022 13:15:49 +0000 Authentication-Results: zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:43710) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oU6WE-000AaR-3Z; Fri, 02 Sep 2022 13:15:34 +0000 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.96) (envelope-from ) id 1oU6WD-0015Cv-2O; Fri, 02 Sep 2022 15:15:33 +0200 Date: Fri, 2 Sep 2022 15:15:33 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: [PATCH] initialization of main keymap Message-ID: <20220902131533.GC255755@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org References: <20220831122842.GC992100@zira.vinc17.org> <20220901002300.GD992100@zira.vinc17.org> <20220901012122.GA1046913@zira.vinc17.org> <20220902000406.GB1046913@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.7+30 (1fccbbf8) vl-149028 (2022-08-07) X-Seq: 50578 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: 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. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)