unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: How to paste under terminal emacs?
Date: Thu, 17 Mar 2016 09:06:47 -0400	[thread overview]
Message-ID: <jwvpoutcl47.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: CAJQX3DyLkqXVTOta4wZ2=t9MnMqZw6NFHbTM1NCdkr6EM+8xWQ@mail.gmail.com

> I found a sample snippet here:
> https://github.com/hchbaw/bracketed-paste.el/blob/master/bracketed-paste.el
> Dunno what do you mean by "alredy implemented in Emacs".

That recent Emacsen incorporate code akin to bracketed-paste.el, and they
use it without you even noticing it.

OK, I checked and I was partly lying: it's only supported in the
upcoming 25.1.  Excerpt from the NEWS file:

    * Editing Changes in Emacs 25.1
    [...]
    ** Emacs now uses "bracketed paste mode" on text terminals that support it.
    Bracketed paste mode causes text terminals to wrap pasted text in special
    escape sequences that allow Emacs to tell the difference between text
    you type and text you paste from other applications.  Emacs then
    avoids interpreting each character in the pasted text as it does with
    keyboard input, which results in a paste experience similar to that
    under a window system, and significant performance improvements when
    pasting large amounts of text.
    
    Bracketed paste mode is disabled by default, so Emacs automatically
    enables it at startup if the terminal supports it.


-- Stefan




      reply	other threads:[~2016-03-17 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16  2:41 How to paste under terminal emacs? Shiyao Ma
2016-03-16  4:45 ` Yuri Khan
2016-03-16 12:34   ` Stefan Monnier
2016-03-17  9:35     ` Shiyao Ma
2016-03-17 13:06       ` Stefan Monnier [this message]

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/emacs/

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

  git send-email \
    --in-reply-to=jwvpoutcl47.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /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).