From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#12207: repl and comments or tabs Date: Thu, 04 Aug 2016 22:55:36 +0200 Message-ID: <87y44cs187.fsf@pobox.com> References: <87txw3lxuz.fsf@pobox.com> <0b89b89f3afa138b40c6ccedc51d289b@discard.email> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1470344312 20224 195.159.176.226 (4 Aug 2016 20:58:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2016 20:58:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cc: 12207@debbugs.gnu.org To: "helpful.user\@discard.email" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Aug 04 22:58:28 2016 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 1bVPhT-0001IO-R4 for guile-bugs@m.gmane.org; Thu, 04 Aug 2016 22:57:07 +0200 Original-Received: from localhost ([::1]:41727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVPhQ-0006fc-H1 for guile-bugs@m.gmane.org; Thu, 04 Aug 2016 16:57:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVPgV-0006D7-Jz for bug-guile@gnu.org; Thu, 04 Aug 2016 16:56:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVPgQ-0006gu-Hn for bug-guile@gnu.org; Thu, 04 Aug 2016 16:56:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVPgQ-0006gq-Dw for bug-guile@gnu.org; Thu, 04 Aug 2016 16:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bVPgQ-0003ES-3Y for bug-guile@gnu.org; Thu, 04 Aug 2016 16:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 04 Aug 2016 20:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12207 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 12207-submit@debbugs.gnu.org id=B12207.147034414812402 (code B ref 12207); Thu, 04 Aug 2016 20:56:02 +0000 Original-Received: (at 12207) by debbugs.gnu.org; 4 Aug 2016 20:55:48 +0000 Original-Received: from localhost ([127.0.0.1]:55904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVPgC-0003Dy-34 for submit@debbugs.gnu.org; Thu, 04 Aug 2016 16:55:48 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:61654 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVPgA-0003Dr-S5 for 12207@debbugs.gnu.org; Thu, 04 Aug 2016 16:55:47 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 76D262EB83; Thu, 4 Aug 2016 16:55:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=n0lZQqaBD2SQSe4FsNaroqDP9Z0=; b=G5HXFm fJKzgf/TshGv8MGYUszcjdLpOcCoFAcAz6oyxB8rvFaikX8ase8moeh1uhPmcJWh 0xXm2/CbtZkve7Taw9semh7pfqq5gLwrbMLYGrhi0Jj5tFvQLQx0P5lU6QTncaDQ b5Xdrg/0P5OpJ+Xj785VyygsXA/GeIQbk9g+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=tXKKfP1GoK+vG6ohu7vXH5zJsNQ9rKAO NyYudo8NBDS0jmmACkaeQ+6ZCXQfoSaTzPi6umvpDqDn+wBC/cO3rbMGYCn6NMK6 GrY73YZZTLtxkIjFjkDD1CXUiVyw9wR6v6C49Xm1Hf8KPsA9z21A4EsVp7pPzfCs W+j/focmoPU= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 656C52EB82; Thu, 4 Aug 2016 16:55:44 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 7B9AF2EB80; Thu, 4 Aug 2016 16:55:43 -0400 (EDT) In-Reply-To: <0b89b89f3afa138b40c6ccedc51d289b@discard.email> (helpful's message of "Thu, 28 Jul 2016 19:21:52 +0200") X-Pobox-Relay-ID: CF63DE3A-5A85-11E6-AB6D-C1836462E9F6-02397024!pb-sasl1.pobox.com 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:8328 Archived-At: On Thu 28 Jul 2016 19:21, "helpful.user@discard.email" writes: > The following patch to readline should fix the tab issue: > > https://lists.gnu.org/archive/html/bug-bash/2014-10/msg00211.html > > (AFACT you need to put "set enable-bracketed-paste on" in your ~ > /.inputrc too) Fascinating! I guess from Guile's side we should do rl_variable_bind ("enable-bracketed-paste", "on") in our readline code; sound about right to you? Would you mind trying this patch to see what it does for you? diff --git a/guile-readline/readline.c b/guile-readline/readline.c index a3e8903..47875e4 100644 --- a/guile-readline/readline.c +++ b/guile-readline/readline.c @@ -47,6 +47,8 @@ scm_t_option scm_readline_opts[] = { "History length." }, { SCM_OPTION_INTEGER, "bounce-parens", 500, "Time (ms) to show matching opening parenthesis (0 = off)."}, + { SCM_OPTION_BOOLEAN, "bracketed-paste", 1, + "Disable interpretation of control characters in pastes." }, { 0 } }; @@ -546,6 +548,9 @@ scm_init_readline () reentry_barrier_mutex = scm_make_mutex (); scm_init_opts (scm_readline_options, scm_readline_opts); + rl_variable_bind ("enable-bracketed-paste", + SCM_READLINE_BRACKETED_PASTE ? "on" : "off") + #if HAVE_RL_GET_KEYMAP init_bouncing_parens(); #endif diff --git a/guile-readline/readline.h b/guile-readline/readline.h index 2bf5f80..0986e3b 100644 --- a/guile-readline/readline.h +++ b/guile-readline/readline.h @@ -39,6 +39,7 @@ SCM_RL_API scm_t_option scm_readline_opts[]; #define SCM_HISTORY_FILE_P scm_readline_opts[0].val #define SCM_HISTORY_LENGTH scm_readline_opts[1].val #define SCM_READLINE_BOUNCE_PARENS scm_readline_opts[2].val +#define SCM_READLINE_BRACKETED_PASTE scm_readline_opts[3].val #define SCM_N_READLINE_OPTIONS 3 SCM_RL_API SCM scm_readline_options (SCM setting); Andy