Subject: Re: Setting magic-space in /etc/zshrc
From: Sebastian Gniazdowski <[email-masked]>
To: Bart Schaefer <[email-masked]>
Cc: Zsh hackers list <[email-masked]>
Date: Wed, 25 May 2016 13:22:27 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On 25 May 2016 at 12:42, Bart Schaefer <[email-masked]> wrote:
> On May 25, 2016 10:12 PM, "Sebastian Gniazdowski" <[email-masked]>
> wrote:
>>
>> When shell startups, it shows: " " magic-space. When I issue "bindkey
>> ' '", it shows self-insert.
>
> I'm not able to reproduce this on OSX with 5.0.2 or a recent build of
> 5.2-dev-1 (the only OS/versions I have accessable at the moment).  If
> happening, this may have something to do with the emacs / vicmd keymaps
> selected automatically by examining the VISUAL / EDITOR environment
> settings, such that you are seeing/binding one keymap in /etc/zshrc and
> another later.

You are apparently right. I have bindkey -v. Removing it on Fedora
causes bindkey ' ' to display magic-space also after complete startup.
In the widget, I was creating own keymap by copying it from emacs. So
it had the /etc/zshrc influence in it. However, I was also doing some
checks while debugging: added bindkey ' ' to overriding self-insert
widget – shown self-insert. Added magic-space override – and it wasn't
called on space.

Best regards,
Sebastian Gniazdowski