[Mac] Visual mode ignores system clipboard #2032

Closed
dvcrn opened this Issue Jun 16, 2015 · 8 comments

Projects

None yet

6 participants

@dvcrn
Contributor
dvcrn commented Jun 16, 2015

I started using spacemacs today in combination with emacs mac port and noticed a very odd pasting behavior which seems like a bug (or misconfiguration on my end) to me.

  1. Copy something into browser clipboard eg "foo"
  2. Go into emacs
  3. Press p
  4. "foo" gets pasted

  1. Copy something into browser clipboard eg "bar"
  2. Go into emacs
  3. Select a string into visual mode (e.g. v i ")
  4. Press p
  5. "foo" (the last copied entry in emacs, not 'bar') gets printed

I tried this many times in different files and also added the osx config layer but the behavior is always the same: When I paste in normal mode, the system clipboard gets pasted. When I paste in visual mode, the last register gets pasted and the system clipboard ignored.

Sadly this is the only way of replacing something with a system clipboard entry. d i w will remove the word and add it into the register so using p will only print the just deleted word

Am I doing something wrong?

@cpaulik
Contributor
cpaulik commented Jun 16, 2015

Evil calls a different command called evil-visual-paste in this case so this might be a evil bug

@dvcrn
Contributor
dvcrn commented Jun 16, 2015

Debugged a bit further and seems to be a problem with the GUI interface. When running on the terminal, pasting works fine. Both versions, normal emacs with cocoa and emacs mac port seem to have the problem mentioned above.

Tested with a different config file and the same problem persists so this is not a problem of spacemacs. I'm closing this issue, sorry for the mixup.

@dvcrn dvcrn closed this Jun 16, 2015
@voltecrus

@dvcrn have you found a solution to this? It would still be helpful to people like me who found this issue in spacemacs(even if it isn't spacemacs related).

@dvcrn
Contributor
dvcrn commented Sep 4, 2015
@justin808

100% this should be the default!

(fset 'evil-visual-update-x-selection 'ignore) 
@stormpat
Contributor

๐Ÿ’ฏ

This has been a real pain for me. I had no idea it was an issue with evil. As of today pasting to/from emacs works as it should. Thanks a lot @dvcrn for the solution!

@jdelStrother
Contributor

๐Ÿ‘

I've had recurring problems with copying & pasting from/to spacemacs, where I'd try to copy something out and just end up with a single character, or paste something in and it would use an older yankring entry. @justin808's setting seems to have magically fixed all that.

@jdelStrother
Contributor

... I spoke too soon. I had several blissful days of problem-free copy & pasting, and it's just cropped up again. Seems like there's something more complicated going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment