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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14496 invoked from network); 27 Jul 2021 10:32:33 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Jul 2021 10:32:33 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1627381953; b=c/DV4i38gQxIm6IjMls6xK19H2zD86FFeLArWaHDM7lYQlrJR+z+sjpEkLHhyjkQVXH7OzbGG0 Hzl+BJV9hJ9QdvLfBvO2kxu/qXR84tPY4PbujqNrjLhHs+ukhnp00JA6OlIE0TLKEIlSl5sEkp p7CNQv+y0jjmk1wXgY+oAWbZ6rMNT0+F4rBwQfLcUqw19Dwb0PJgT0YPKPxxjPptxBL35mMhWq a50UY2RIjXBKWIg4SOwI0teSzMIF/0+7kmWvrCLTyQW0MCgNPs6dkAY1C3Bl3fZYl9m0QXk8+S LKpAkt1YtBbEnMuhReePZVhUNa96KsQLc0IpqEHDjBB+Qg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1627381953; bh=/0VO30PgM57g8qakuo2PGpnSyWLkkJUAKUVQc1Jqs6k=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=v0xYC+q91GCAi0U+08SlddvKqkfY0tYLK60RjFzwtUfm8UcDV9am36QVm/5SbhNih1T5Q3dPVk uZQJpsXaTlBoO0MSTWo9HfRjT8bPEIi1+EyjigeqGnqDj66APek1hRKbsEd/FhdfyhDRn9txZG c9+PFctpBkcp8TaUvvG4nGhU02bwwaI1ynfe2MElmv3iODXdBmyJbHhU0ee3VD2N7HAwhHpdiF Z+13I+fDFCfJgCriQYUJEHX+24ZNxxtDKOJ58/D15jgljaCwtpUknP8cUq/4mn9VEc4r+TBTL/ ciN9SFGz15Wlj58pslRU+VnJiyXR4fIHVEqRm2v/34lMlg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=c7S6+olTVrJqeFJfsqOo7xL6hX1yBA+Gu02CGKNIVzg=; b=yuI5+oJp6Q40Miu/UKzBw8Elbu o5IuN5KqJl68edTbjQSkkNGt4P0Z5ofXNPA2ytV/+FmL6oabmKQwN6XAGyhwr0Iv/26XbXKWC25UG tNJvAHqTtRqcJf+ymkeo8RihiYlzjexWuKvQP6xfsPpzUAW7/b8DgcPu0BypvNihvGvQ7f0F8T65a VI7C3/YZiiqLqfRDVdzbqLCfH86vzWf2t9VwMy/QHHiLDgdM14RWPHB1i6hjEvRHCPRAQBzoVKj86 G0TGYv/Gi2irPg2KX41u7RE3fa/hIIgMz6/5fS5oax3ASMCPEOdq/bhl+vw7qs11XWsHiKxZlNE+m thxDw+Zg==; Received: from authenticated user by zero.zsh.org with local id 1m8KNz-0002pC-Gy; Tue, 27 Jul 2021 10:32:31 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f45.google.com) smtp.remote-ip=209.85.218.45; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f45.google.com ([209.85.218.45]:37573) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1m8KN3-00025N-Jc; Tue, 27 Jul 2021 10:31:34 +0000 Received: by mail-ej1-f45.google.com with SMTP id nb11so21302175ejc.4 for ; Tue, 27 Jul 2021 03:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c7S6+olTVrJqeFJfsqOo7xL6hX1yBA+Gu02CGKNIVzg=; b=Cy04kGTlMLhLkHspg9gnwofaFw3vJemQgAIjB5oGcua0NbOCDHpql5YYLOJHnfahXm t3seFpnN/UWiWjyqGfJlvD+hCVZEc6SLO7/rLeP0mHXP52fG77CJFL8tsRNGu83/UcRW BMrZOcwsdPUM4QCwuRtuurAeLFH3zS9n3d94v9diIQfuLO7yJz5aiMpxb2FTZCWAI+eD 4fmPVC5f2N26OZsiNXyaa5DP3JAKzFXUnJYnNbHrF88hsysNkGIE8lClIEO5PQwIR3yF cPhOzSnENIvhCuJOy/jyYZD5FnD6EkuenS7rljEJkw9h1Ky4ic0+ZJzhZWQb2+MdLTyR pNMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c7S6+olTVrJqeFJfsqOo7xL6hX1yBA+Gu02CGKNIVzg=; b=AQf2tFxBY96J28kZYKT7W2c2xcLlLv6p3tkgxzWDZ5lRk8Qfzc36gcUa6mrjcUvxDD RKF6V144h69GuloCBxrkCLLA9RxB9aXQucKV/oEdFAbZ3vBeu0yCsqFdhKluiSqvVFP+ 4c6uGAvDXt7H9jdGsUg79CT9yWLc6jn8H8h2zoC9S8MBoh/vvcl/tLD0eWMDjRD2Ynzb Kc0L1bw9UFGWlivw95XT3VKvyO9ix6OBZpf8Cu3wV4Rz1P+7im9Pksz4rOWKvBWnzHxQ 9XINC7Ss5i4rTEVLD4EMAfFSqGmjxCeAw16oS8XhfPyOuLstdkE524AfWk5/vNpj4Flh BTtg== X-Gm-Message-State: AOAM531ktRbtKkl8k6l/2BycgcyuMvKurIkoULVej1H5skV9exFetUls 0jT+aic44e5DQpAzYlhP4ManmC1bchMOD6kM0DkYhNVM X-Google-Smtp-Source: ABdhPJyE+n3zshkWH0wFnVtKQWNo9oSfJWyXAN0aRVcNcE5kOsRrK/VMk8SGNNnVXtOb0uXv1dlhrTu5acM1bZO4vWs= X-Received: by 2002:a17:906:6c91:: with SMTP id s17mr20762826ejr.403.1627381893198; Tue, 27 Jul 2021 03:31:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?UGV0ZXIgU2zDrcW+aWs=?= Date: Tue, 27 Jul 2021 12:31:15 +0200 Message-ID: Subject: Re: A wrong bindkey command breaks the way bck-i-search (Ctrl+R) works To: Bart Schaefer Cc: zsh Content-Type: multipart/alternative; boundary="000000000000a8799c05c8185ff8" X-Seq: 26812 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: --000000000000a8799c05c8185ff8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Mikael & Bart, yes, both solutions work. Taking into account that there are more keymaps, I think that the best solution would be to remap the keys *only* for the emacs keymap, leaving the other keymaps untouched. bindkey -M emacs ' ' expand_abbreviations But alas, this changes the behavior of isearch, too. The documentation is really sometimes too wordy and, in cases like this, too terse. Peter =D0=BF=D0=BE=D0=BD, 26. =D1=98=D1=83=D0=BB 2021. =D1=83 23:10 Bart Schaefer= =D1=98=D0=B5 =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BE/=D0=BB=D0=B0: > On Mon, Jul 26, 2021 at 8:58 AM Mikael Magnusson > wrote: > > > > On 7/26/21, Peter Sl=C3=AD=C5=BEik wrote: > > > > > > zle -N expand-abbreviations _expand_abbreviations > > > bindkey ' ' expand-abbreviations > > > > > > The problem with this solution is that it breaks the way that Ctrl+R > > > history search works. > > > > You can use bindkey -M isearch ' ' self-insert to restore the previous > behavior. > > I believe you could also do > > zle -N magic-space _expand_abbreviations > bindkey ' ' magic-space > > because the isearch keymap already understands what (not) to do with > magic-space. > --000000000000a8799c05c8185ff8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Mikael & Bart,

yes,= both solutions work.

Taking into account that the= re are more keymaps, I think that the best solution would be to remap the k= eys *only* for the emacs keymap, leaving the other keymaps untouched.
bindkey -M emacs ' ' expand_abbreviations
But alas, this changes the behavior of isearch, too. The docum= entation is really sometimes too wordy and, in cases like this, too terse.<= /div>

Peter

=D0=BF=D0=BE=D0=BD, 26. =D1=98=D1= =83=D0=BB 2021. =D1=83 23:10 Bart Schaefer <schaefer@brasslantern.com> =D1=98=D0=B5 =D0=BD=D0= =B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BE/=D0=BB=D0=B0:
On Mon, Jul 26, 2021 at 8:58 AM Mikael Mag= nusson <mikachu@g= mail.com> wrote:
>
> On 7/26/21, Peter Sl=C3=AD=C5=BEik <peter.slizik@gmail.com> wrote:
> >
> > zle -N expand-abbreviations _expand_abbreviations
> > bindkey ' ' expand-abbreviations
> >
> > The problem with this solution is that it breaks the way that Ctr= l+R
> > history search works.
>
> You can use bindkey -M isearch ' ' self-insert to restore the = previous behavior.

I=C2=A0 believe you could also do

zle -N magic-space _expand_abbreviations
bindkey ' ' magic-space

because the isearch keymap already understands what (not) to do with
magic-space.
--000000000000a8799c05c8185ff8--