From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#32501: Bouncing parentheses broken in REPL with vi-mode enabled Date: Wed, 22 Aug 2018 22:42:15 -0400 Message-ID: <87pny9by7s.fsf@netris.org> References: <0290e793-0acc-31ed-1d7e-61ed65b9bcf2@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1534992127 8376 195.159.176.226 (23 Aug 2018 02:42:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2018 02:42:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 32501@debbugs.gnu.org To: Daniel Tam Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Aug 23 04:42:02 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsfZR-00021c-QQ for guile-bugs@m.gmane.org; Thu, 23 Aug 2018 04:42:01 +0200 Original-Received: from localhost ([::1]:34101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsfbW-0001O0-MI for guile-bugs@m.gmane.org; Wed, 22 Aug 2018 22:44:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsfbR-0001Nt-Gl for bug-guile@gnu.org; Wed, 22 Aug 2018 22:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsfbO-0002VB-Aj for bug-guile@gnu.org; Wed, 22 Aug 2018 22:44:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53200) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fsfbO-0002V4-7I for bug-guile@gnu.org; Wed, 22 Aug 2018 22:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fsfbO-0001OQ-4T for bug-guile@gnu.org; Wed, 22 Aug 2018 22:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 23 Aug 2018 02:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32501 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 32501-submit@debbugs.gnu.org id=B32501.15349922365334 (code B ref 32501); Thu, 23 Aug 2018 02:44:02 +0000 Original-Received: (at 32501) by debbugs.gnu.org; 23 Aug 2018 02:43:56 +0000 Original-Received: from localhost ([127.0.0.1]:58218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsfbI-0001Nx-1J for submit@debbugs.gnu.org; Wed, 22 Aug 2018 22:43:56 -0400 Original-Received: from world.peace.net ([64.112.178.59]:39520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsfbG-0001Nk-G5 for 32501@debbugs.gnu.org; Wed, 22 Aug 2018 22:43:54 -0400 Original-Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsfbA-0002LJ-T3; Wed, 22 Aug 2018 22:43:48 -0400 In-Reply-To: <0290e793-0acc-31ed-1d7e-61ed65b9bcf2@gmail.com> (Daniel Tam's message of "Thu, 23 Aug 2018 01:47:39 +1000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9126 Archived-At: Hi Daniel, Daniel Tam writes: > I've activated readline support for the Guile repl, but I've found that > if my inputrc enables vi-mode, then the bouncing parentheses feature > doesn't work. Disabling vi-mode does the trick. Indeed. For some reason that I cannot determine, the bouncing parentheses feature is specifically disabled when the vi keymap is in use. The relevant function is 'init_bouncing_parens' in guile-readline/readline.c: static void init_bouncing_parens () { if (strncmp (rl_get_keymap_name (rl_get_keymap ()), "vi", 2)) { rl_bind_key (')', match_paren); rl_bind_key (']', match_paren); rl_bind_key ('}', match_paren); } } This is ancient code, predating version control, present in the original import into CVS in 1999. I looked at the source code of readline-7.0, and IIUC none of those keys have mappings in the default vi keymap. The right fix might be to simply remove the 'if' check above. Would you like to try it and report back? Thanks, Mark