Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste within tmux got extra control characters #6595

Closed
dingmingxin opened this issue Jul 16, 2016 · 2 comments
Closed

Paste within tmux got extra control characters #6595

dingmingxin opened this issue Jul 16, 2016 · 2 comments
Labels
- Bug tracker - stale marked as a stale issue/pr (usually by a bot)

Comments

@dingmingxin
Copy link

dingmingxin commented Jul 16, 2016

#### Description

I use emacs(daemon mode: emacsclient -t -a '')with tmux. Here is my tmux.conf
When copy some thing into system paste-board, and paste into emacs(int tmux) using CMD-V.
The content I pasted become to this:
200~content.....content~

Reproduction guide

  • Start tmux
  • Start Emacs in tmux
  • Copy something from webbrower into system pasteboard
  • Paste content to Emacs

Observed behaviour:
The content was wraped with 200~...~

Expected behaviour:
Content with no extra control characters.

System Info

  • OS: darwin(10.11.4)
  • Emacs: 24.5.1
  • Zsh 5.0
  • Spacemacs: 0.105.20
  • Spacemacs branch: master (rev. 9c7250a)
  • Graphic display: nil
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(auto-completion better-defaults git markdown org javascript ycmd c-c   swift php html java python emacs-lisp vimscript shell-script go yaml search-engine tmux games dash shell-scripts
                 (shell :variables shell-default-height 30 shell-default-position 'bottom)
                 dmx dmx-lua)

Debug

I look into spacemacs layers and found this in layers/+distribution/spacemacs/packages.el

(defun spacemacs/init-bracketed-paste ()
  (use-package bracketed-paste
    :defer t
    :init
    ;; Enable bracketed-paste for tty
    (add-hook 'tty-setup-hook 'bracketed-paste-enable) 
    ))

When I comments this line: (add-hook 'tty-setup-hook 'bracketed-paste-enable) and restart emacs the pasting problem has gone.

Then I switch to bash and restart emacs without comment any layer code. The problem still exist. I think this has nothing to do with $SHELL evrionment.

If I using emacs just in Terminal.app without tmux, everthing is fine.

How to solve the problem, is there some way to make tmux and emacs work well ?

@bauerd
Copy link

bauerd commented Apr 10, 2018

Did you find a solution for this? I roll my own emacs configuration and since today my clipboard contents get wrapped with 200~[Clipboard contents]\n201~. I have no clue why this is happening since I only made very minor changes to my emacs config, none to my tmux config.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Bug tracker - stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

3 participants