* bug#25005: 25.1; Support disabling bracketed paste mode.
@ 2016-11-23 14:47 Jay Lee
2016-11-23 16:37 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Jay Lee @ 2016-11-23 14:47 UTC (permalink / raw)
To: 25005
[-- Attachment #1: Type: text/plain, Size: 5369 bytes --]
I see that bracketed paste mode is automatically enabled in emacs 25.1 running in terminal.
I know this mode is very good at security. But while I’m editing text, this mode annoy me. because something text is added.
ex) 200~hello, world201~
I copy text frequently from safari or other applications and paste it to emacs running in terminal. then I have to remove "200~ 201~”.
this process reduce my productivity. So I want to disable bracketed paste mode in emacs running in terminal.
I have googled this issue But there is no information. and I even make questions in reddit and stackexchage.
I think that No one know disabling bracketed paste mode.
Below is my question links
https://www.reddit.com/r/emacs/comments/5eehv5/how_to_turn_off_bracketed_paste_mode/ <https://www.reddit.com/r/emacs/comments/5eehv5/how_to_turn_off_bracketed_paste_mode/>
http://emacs.stackexchange.com/questions/28851/how-to-turn-off-bracketed-paste-mode?noredirect=1#comment44234_28851 <http://emacs.stackexchange.com/questions/28851/how-to-turn-off-bracketed-paste-mode?noredirect=1#comment44234_28851>
There is no problem in emacs -q session. I think that bracketed paste mode is not enabled in this case Because configuration about bracketed paste mode is not loaded.
If I have misunderstanding, please let me know.
If there is solution for this issue, I want to know how to disabling bracketed paste mode or Not, please create functions for disable bracketed paste mode.
Thank you.
My development environment is macOS sierra, emacs 25.1 (running in Terminal)
In GNU Emacs 25.1.1 (x86_64-apple-darwin16.0.0, NS appkit-1504.00 Version 10.12 (Build 16A323))
of 2016-11-04 built on Macs-iMac.local
Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs/25.1/share/info/emacs
--prefix=/usr/local/Cellar/emacs/25.1 --without-x --with-xml2
--without-dbus --without-gnutls --with-ns --disable-ns-self-contained'
Configured features:
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
multi-web-global-mode: t
show-paren-mode: t
display-time-mode: t
which-function-mode: t
icomplete-mode: t
iswitchb-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Checking 34 files in /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/emulation...
Checking 167 files in /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/emacs-lisp...
Checking 24 files in /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/cedet...
Checking 57 files in /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/calendar...
Checking 87 files in /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/calc...
Checking 120 files in /usr/local/Cellar/emacs/25.1/share/emacs/25.1/lisp/obsolete...
Checking for load-path shadows...done
previous-line: Beginning of buffer [4 times]
Auto-saving...done
Buffer *unsent mail to bug-gnu-emacs@gnu.org* modified; kill anyway? (y or n) y
Load-path shadows:
None found.
Features:
(url-util url-parse auth-source cl-seq eieio eieio-core url-vars pp
shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils term/xterm
xterm jade-mode sws-mode multi-web-mode easy-mmode cl-macs cl swift-mode
derived smie comint ansi-color ring rx go-mode-autoloads advice
find-file atom-dark-theme paren time time-date which-func imenu
icomplete iswitchb edmacro kmacro finder-inf package epg-config seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
kqueue cocoa ns multi-tty make-network-process emacs)
Memory information:
((conses 16 233992 15725)
(symbols 48 23489 4)
(miscs 40 51 193)
(strings 32 25882 4560)
(string-bytes 1 763153)
(vectors 16 35757)
(vector-slots 8 663111 6726)
(floats 8 230 579)
(intervals 56 230 8)
(buffers 976 19))
[-- Attachment #2: Type: text/html, Size: 8237 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-23 14:47 bug#25005: 25.1; Support disabling bracketed paste mode Jay Lee
@ 2016-11-23 16:37 ` Eli Zaretskii
2016-11-24 0:27 ` Jay Lee
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-11-23 16:37 UTC (permalink / raw)
To: Jay Lee; +Cc: 25005
> From: Jay Lee <jay@hanjaelee.com>
> Date: Wed, 23 Nov 2016 23:47:37 +0900
>
> I see that bracketed paste mode is automatically enabled in emacs 25.1 running in terminal.
> I know this mode is very good at security. But while I’m editing text, this mode annoy me. because something
> text is added.
> ex) 200~hello, world201~
That sounds like some bug, so please provide a recipe, preferably
starting from "emacs -Q".
Also, I suggest to try the current emacs-25 branch, I think there were
some improvements in that area since 25.1 was released.
> There is no problem in emacs -q session. I think that bracketed paste mode is not enabled in this case
I think it is enabled in "emacs -Q" as well. So the fact it only
happens with your customizations would suggest that some of those
customizations might interfere with bracketed paste.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-23 16:37 ` Eli Zaretskii
@ 2016-11-24 0:27 ` Jay Lee
2016-11-24 0:55 ` Daniel Colascione
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Jay Lee @ 2016-11-24 0:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 25005
If I start from emacs -q, It works well.
I checked again yesterday, I found reason about this issue.
(global-set-key (kbd "M-[") 'previous-multiframe-window) this keybindings affect this issue.
after removing this configuration, It works well. Not added “200~201~” I don't understand why is this reason. I think It is just keybinding.
So in this case, is my emacs bracketed paste mode disabled? if so I want to know why bracketed paste mode is disabled. I just remove configuration for keybinding.
And is there way to turn off bracketed paste mode officially?
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-24 0:27 ` Jay Lee
@ 2016-11-24 0:55 ` Daniel Colascione
2016-11-24 3:08 ` Clément Pit--Claudel
2016-11-24 16:06 ` Eli Zaretskii
2 siblings, 0 replies; 11+ messages in thread
From: Daniel Colascione @ 2016-11-24 0:55 UTC (permalink / raw)
To: Jay Lee, Eli Zaretskii; +Cc: 25005
On 11/23/2016 04:27 PM, Jay Lee wrote:
> If I start from emacs -q, It works well.
> I checked again yesterday, I found reason about this issue.
>
> (global-set-key (kbd "M-[") 'previous-multiframe-window) this keybindings affect this issue.
> after removing this configuration, It works well. Not added “200~201~” I don't understand why is this reason. I think It is just keybinding.
>
> So in this case, is my emacs bracketed paste mode disabled? if so I want to know why bracketed paste mode is disabled. I just remove configuration for keybinding.
> And is there way to turn off bracketed paste mode officially?
>
That keybinding probably isn't the best anyway. It's a prefix for a lot
of terminal control sequences.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-24 0:27 ` Jay Lee
2016-11-24 0:55 ` Daniel Colascione
@ 2016-11-24 3:08 ` Clément Pit--Claudel
2016-11-24 3:37 ` Eli Zaretskii
2016-11-24 16:06 ` Eli Zaretskii
2 siblings, 1 reply; 11+ messages in thread
From: Clément Pit--Claudel @ 2016-11-24 3:08 UTC (permalink / raw)
To: 25005
[-- Attachment #1.1: Type: text/plain, Size: 738 bytes --]
On 2016-11-23 19:27, Jay Lee wrote:
> If I start from emacs -q, It works well.
> I checked again yesterday, I found reason about this issue.
>
> (global-set-key (kbd "M-[") 'previous-multiframe-window) this keybindings affect this issue.
> after removing this configuration, It works well. Not added “200~201~” I don't understand why is this reason. I think It is just keybinding.
>
> So in this case, is my emacs bracketed paste mode disabled? if so I want to know why bracketed paste mode is disabled. I just remove configuration for keybinding.
> And is there way to turn off bracketed paste mode officially?
Stefan responded to your question on stackexchange, and explained why this keybinding was causing issues.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-24 3:08 ` Clément Pit--Claudel
@ 2016-11-24 3:37 ` Eli Zaretskii
2016-11-27 20:42 ` Philipp Stephani
0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2016-11-24 3:37 UTC (permalink / raw)
To: Clément Pit--Claudel; +Cc: 25005
> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Wed, 23 Nov 2016 22:08:02 -0500
>
> On 2016-11-23 19:27, Jay Lee wrote:
> > If I start from emacs -q, It works well.
> > I checked again yesterday, I found reason about this issue.
> >
> > (global-set-key (kbd "M-[") 'previous-multiframe-window) this keybindings affect this issue.
> > after removing this configuration, It works well. Not added “200~201~” I don't understand why is this reason. I think It is just keybinding.
> >
> > So in this case, is my emacs bracketed paste mode disabled? if so I want to know why bracketed paste mode is disabled. I just remove configuration for keybinding.
> > And is there way to turn off bracketed paste mode officially?
>
> Stefan responded to your question on stackexchange, and explained why this keybinding was causing issues.
It would be useful to have those explanations here.
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-24 3:37 ` Eli Zaretskii
@ 2016-11-27 20:42 ` Philipp Stephani
2022-02-03 20:42 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Philipp Stephani @ 2016-11-27 20:42 UTC (permalink / raw)
To: Eli Zaretskii, Clément Pit--Claudel; +Cc: 25005
[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]
Eli Zaretskii <eliz@gnu.org> schrieb am Do., 24. Nov. 2016 um 04:38 Uhr:
> > From: Clément Pit--Claudel <clement.pit@gmail.com>
> > Date: Wed, 23 Nov 2016 22:08:02 -0500
> >
> > On 2016-11-23 19:27, Jay Lee wrote:
> > > If I start from emacs -q, It works well.
> > > I checked again yesterday, I found reason about this issue.
> > >
> > > (global-set-key (kbd "M-[") 'previous-multiframe-window) this
> keybindings affect this issue.
> > > after removing this configuration, It works well. Not added “200~201~”
> I don't understand why is this reason. I think It is just keybinding.
> > >
> > > So in this case, is my emacs bracketed paste mode disabled? if so I
> want to know why bracketed paste mode is disabled. I just remove
> configuration for keybinding.
> > > And is there way to turn off bracketed paste mode officially?
> >
> > Stefan responded to your question on stackexchange, and explained why
> this keybinding was causing issues.
>
> It would be useful to have those explanations here.
>
>
>
>
Copied from SE:
"My crystal ball said you should remove
(global-set-key (kbd "M-[") 'previous-multiframe-window)
from your ~/.emacs. You might like to M-x report-emacs-bug and ask for
global-set-key to complain when the key sequence conflicts with something in
input-decode-map (as is the case here, because the byte sequence ESC [ (which
corresponds to the M-[ event) is used by text terminal as a prefix for
encoding all kinds of special events)."
[-- Attachment #2: Type: text/html, Size: 7913 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-27 20:42 ` Philipp Stephani
@ 2022-02-03 20:42 ` Lars Ingebrigtsen
2022-02-04 9:59 ` Robert Pluim
0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-03 20:42 UTC (permalink / raw)
To: Philipp Stephani; +Cc: 25005, Clément Pit--Claudel
Philipp Stephani <p.stephani2@gmail.com> writes:
> "My crystal ball said you should remove (global-set-key (kbd "M-[")
> 'previous-multiframe-window) from your ~/.emacs. You might like to M-x
> report-emacs-bug and ask for global-set-key to complain when the key
> sequence conflicts with something in input-decode-map (as is the case
> here, because the byte sequence ESC [ (which corresponds to the M-[
> event) is used by text terminal as a prefix for encoding all kinds of
> special events)."
This would be easy enough to do... does anybody have any comments?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2022-02-03 20:42 ` Lars Ingebrigtsen
@ 2022-02-04 9:59 ` Robert Pluim
2022-02-05 6:41 ` Lars Ingebrigtsen
0 siblings, 1 reply; 11+ messages in thread
From: Robert Pluim @ 2022-02-04 9:59 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Philipp Stephani, 25005, Clément Pit--Claudel
>>>>> On Thu, 03 Feb 2022 21:42:26 +0100, Lars Ingebrigtsen <larsi@gnus.org> said:
Lars> Philipp Stephani <p.stephani2@gmail.com> writes:
>> "My crystal ball said you should remove (global-set-key (kbd "M-[")
>> 'previous-multiframe-window) from your ~/.emacs. You might like to M-x
>> report-emacs-bug and ask for global-set-key to complain when the key
>> sequence conflicts with something in input-decode-map (as is the case
>> here, because the byte sequence ESC [ (which corresponds to the M-[
>> event) is used by text terminal as a prefix for encoding all kinds of
>> special events)."
Lars> This would be easy enough to do... does anybody have any comments?
Hmm, so if I start emacs under a window system, where input-decode-map
doesnʼt contain ESC [, and then create a tty frame inside an xterm,
this would still fail, no? Or did you want the terminal setup to
complain if input-decode-map conflicts with a key binding as well?
And no doubt there are daemon use-cases to consider as well.
Robert
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2022-02-04 9:59 ` Robert Pluim
@ 2022-02-05 6:41 ` Lars Ingebrigtsen
0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-05 6:41 UTC (permalink / raw)
To: Robert Pluim; +Cc: Philipp Stephani, 25005, Clément Pit--Claudel
Robert Pluim <rpluim@gmail.com> writes:
> Hmm, so if I start emacs under a window system, where input-decode-map
> doesnʼt contain ESC [, and then create a tty frame inside an xterm,
> this would still fail, no? Or did you want the terminal setup to
> complain if input-decode-map conflicts with a key binding as well?
Yes, that sounds really messy.
So I don't think there's anything realistic that can be done here, and
I'm therefore closing this bug report. (If somebody has ideas, please
respond to the debbugs address and we'll reopen.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 11+ messages in thread
* bug#25005: 25.1; Support disabling bracketed paste mode.
2016-11-24 0:27 ` Jay Lee
2016-11-24 0:55 ` Daniel Colascione
2016-11-24 3:08 ` Clément Pit--Claudel
@ 2016-11-24 16:06 ` Eli Zaretskii
2 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2016-11-24 16:06 UTC (permalink / raw)
To: Jay Lee; +Cc: 25005
> From: Jay Lee <jay@hanjaelee.com>
> Date: Thu, 24 Nov 2016 09:27:31 +0900
> Cc: 25005@debbugs.gnu.org
>
> If I start from emacs -q, It works well.
> I checked again yesterday, I found reason about this issue.
>
> (global-set-key (kbd "M-[") 'previous-multiframe-window) this keybindings affect this issue.
> after removing this configuration, It works well. Not added “200~201~” I don't understand why is this reason. I think It is just keybinding.
The bracketed paste sequence also starts with M-[, so when you paste,
Emacs invokes previous-multiframe-window instead of the function that
handles the paste. The function that handles the paste knows about
the “200~201~” stuff, and removes it from the pasted text. But
previous-multiframe-window doesn't.
> So in this case, is my emacs bracketed paste mode disabled?
No, I think it's enabled. That's why you get those garbled characters
when you paste.
> if so I want to know why bracketed paste mode is disabled. I just remove configuration for keybinding.
When you remove the key binding, bracketed pastes should work
correctly. Do they?
> And is there way to turn off bracketed paste mode officially?
No, not yet. Not through Emacs, anyway.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-02-05 6:41 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23 14:47 bug#25005: 25.1; Support disabling bracketed paste mode Jay Lee
2016-11-23 16:37 ` Eli Zaretskii
2016-11-24 0:27 ` Jay Lee
2016-11-24 0:55 ` Daniel Colascione
2016-11-24 3:08 ` Clément Pit--Claudel
2016-11-24 3:37 ` Eli Zaretskii
2016-11-27 20:42 ` Philipp Stephani
2022-02-03 20:42 ` Lars Ingebrigtsen
2022-02-04 9:59 ` Robert Pluim
2022-02-05 6:41 ` Lars Ingebrigtsen
2016-11-24 16:06 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).