From: Philipp Stephani <p.stephani2@gmail.com>
To: eliz@gnu.org
Cc: Philipp Stephani <phst@google.com>, 24639@debbugs.gnu.org
Subject: bug#24639: [PATCH] Send text received by bracketed paste to process
Date: Sun, 6 Nov 2016 19:43:05 +0100 [thread overview]
Message-ID: <20161106184305.73100-2-p.stephani2@gmail.com> (raw)
In-Reply-To: <20161106184305.73100-1-p.stephani2@gmail.com>
From: Philipp Stephani <phst@google.com>
Fixes #24639
* term.el (term--xterm-paste): New function.
(term-raw-map): Use it.
(xterm--pasted-text): Declare function from xterm.el.
---
lisp/term.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/term.el b/lisp/term.el
index 993e580..18d6775 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -845,6 +845,7 @@ term-raw-map
(define-key map [S-insert] 'term-paste)
(define-key map [prior] 'term-send-prior)
(define-key map [next] 'term-send-next)
+ (define-key map [xterm-paste] #'term--xterm-paste)
map)
"Keyboard map for sending characters directly to the inferior process.")
@@ -1211,6 +1212,13 @@ term-paste
(interactive)
(term-send-raw-string (current-kill 0)))
+(defun term--xterm-paste ()
+ "Insert the text pasted in an XTerm bracketed paste operation."
+ (interactive)
+ (term-send-raw-string (xterm--pasted-text)))
+
+(declare-function xterm--pasted-text "term/xterm" ())
+
;; Which would be better: "\e[A" or "\eOA"? readline accepts either.
;; For my configuration it's definitely better \eOA but YMMV. -mm
;; For example: vi works with \eOA while elm wants \e[A ...
--
2.10.1
next prev parent reply other threads:[~2016-11-06 18:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 18:02 bug#24639: 26.0.50; Terminal paste doesn't work right in term char mode Philipp
2016-10-07 19:05 ` Eli Zaretskii
2016-10-07 19:19 ` Philipp Stephani
2016-10-07 19:25 ` Eli Zaretskii
2016-10-07 20:19 ` Philipp Stephani
2016-10-08 5:27 ` Eli Zaretskii
2016-10-09 20:48 ` Philipp Stephani
2016-10-10 5:56 ` Eli Zaretskii
2016-10-15 13:25 ` Philipp Stephani
2016-10-15 14:31 ` Eli Zaretskii
2016-10-15 14:38 ` Philipp Stephani
2016-10-15 15:07 ` Eli Zaretskii
2016-11-06 18:43 ` Philipp Stephani
2016-11-06 18:43 ` Philipp Stephani [this message]
2016-11-07 18:35 ` bug#24639: [PATCH] Send text received by bracketed paste to process Eli Zaretskii
2016-11-10 21:57 ` Philipp Stephani
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161106184305.73100-2-p.stephani2@gmail.com \
--to=p.stephani2@gmail.com \
--cc=24639@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=phst@google.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.