Hello,
I have configured emacs so that it copyies the selected/copied text to both
primary and clipboard selections.
But only when in tmux, it seems like the primary selection somehow does not
get updated. It's as if emacs is trying to put stuff in primary, but tmux
simply undoes that.
I have to use the tcsh shell and so I have this alias to help debug this
issue :
alias sel_dbg 'echo "Selection contents:\n\\
Primary : {`xsel -op`}\\
Clipboard : {`xsel -ob`}\\
Buffer-cut : {`xclip -o -sel buf`}\\
Secondary : {`xsel -os`}" \\
| \less -R'
It basically uses xsel and xclip to print the contents of all selections
out there.
When I am outside tmux (after detaching from tmux), and I copy a word
"alias" from emacs, I get this on running the above alias:
[image: pasted2]
(You can ignore the Buffer-cut selection; it's used when copying stuff from
Windows to Linux via VNC.) The important thing is that emacs did save the
copied word to both Primary and the Clipboard.
But once I am inside tmux (after attaching again), I reset the selections
and then I copy the word "alias" again from emacs, I get this:
[image: pasted1]
This time, the copied word got saved only to Clipboard. Primary now has
something I had copied in tmux few minutes back!
It it helps, I used this binding to copy the selected region in tmux:
bind C-w run -b "tmux show-buffer | xsel -ip && tmux show-buffer | xsel -ib"
I basically copy the selection in tmux to both Primary and Clipboard.
Is there a way tmux can override the Primary selection content?
Here's another example ..
Things copied from emacs synchronizes to Pri and Cli fine, when outside
tmux:
[image: pasted3]
Then I attached back to tmux, copied something else from emacs, and that
updates the Clipboard only. The Primary sel content is back to the exact
same what I had copied within tmux using the PREFIX C-w binding:
[image: pasted4]
Thanks.
Kaushal
--
Kaushal Modi
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.