From: Andy Wingo <wingo@pobox.com>
To: "helpful.user\@discard.email" <helpful.user@discard.email>
Cc: 12207@debbugs.gnu.org
Subject: bug#12207: repl and comments or tabs
Date: Thu, 04 Aug 2016 22:55:36 +0200 [thread overview]
Message-ID: <87y44cs187.fsf@pobox.com> (raw)
In-Reply-To: <0b89b89f3afa138b40c6ccedc51d289b@discard.email> (helpful's message of "Thu, 28 Jul 2016 19:21:52 +0200")
On Thu 28 Jul 2016 19:21, "helpful.user@discard.email" <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
next prev parent reply other threads:[~2016-08-04 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 20:11 bug#12207: repl and comments or tabs Andy Wingo
2016-06-20 19:39 ` Andy Wingo
2016-07-28 17:21 ` helpful.user
2016-08-04 20:55 ` Andy Wingo [this message]
2017-05-17 20:30 ` Andy Wingo
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y44cs187.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=12207@debbugs.gnu.org \
--cc=helpful.user@discard.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).