help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] out of memory error after "edit-command-line"
Date: Wed, 19 Oct 2022 18:12:32 +0900	[thread overview]
Message-ID: <16F15191-2C2A-4292-8DC7-7134C024E417@kba.biglobe.ne.jp> (raw)
In-Reply-To: <CC437935-AE7B-457B-9761-B3DD2695DD7F@kba.biglobe.ne.jp>

> 2022/10/19 0:07, Jun. T <takimoto-j@kba.biglobe.ne.jp> wrote:
> % bindkey -v
> % () { setopt localoptions emacs; }
> % (still using emacs binding)
> We need to restore the keymap in doshfunc() as in dosetopt().

Sorry, I reconsidered this.

zle builtin has an option '-K keymap' to temporarily change the
keymap. I think users need not (or should not) use
'setopt localoptions emacs'.

Use of EMACS/VI should be highly discouraged, since turning them off
has no effect, and they are meaningless if a user-defined keymap
is in use.
Moreover, even with my patch, the following does not work:

% export VISUAL=vim
% zsh -f
% (vi keymap, but VI is not set)
% () { setopt localoptions emacs; ... }
% (now emacs keymap)

Instead of fixing this problem, I feel it is better to do
nothing for 'setopt localoptions emacs'. Then keymap is not
restored, but we can just say "please use zle -K".

Maybe we can add some more comments to the description of
EMACS and VI options in zshoptions(1), indicating that
use of these options is _highly_ discouraged.

Or should we try to restore the keymap?

  parent reply	other threads:[~2022-10-19  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  3:47 Jim
2022-08-12 15:33 ` Jim
2022-08-12 20:18   ` Bart Schaefer
2022-08-13  0:10     ` [PATCH] " Bart Schaefer
2022-10-18 15:07       ` [PATCH] " Jun. T
2022-10-18 20:08         ` Bart Schaefer
2022-10-19  9:12         ` Jun T [this message]
2022-10-27  5:34           ` Jun T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16F15191-2C2A-4292-8DC7-7134C024E417@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).