-
Notifications
You must be signed in to change notification settings - Fork 5
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
Keeping save highlighted region to kill ring #4
Comments
Hmm, it's not supposed to do that - I think you found a bug - I'm on Windows, where there is just the clipboard - you have to explicitly copy things to it, whereas on Linux, you can just select text and it will be added to the primary selection, which is separate from the clipboard - I hadn't understood that when I wrote this, and just did some cursory tests on a Linux VM, which seemed to check out. So there should be a way to distinguish those in Emacs - I'll take a look at it. Thanks for the report! |
Finally, I figure out the solution. Under the GNU Emacs Manual:
So, I just do |
That's great, thanks for finding that! I'll put out an update later Brian On Mon, Jan 18, 2016 at 4:30 AM, tomhk215 notifications@github.com wrote:
|
Well this seems to have fixed it - the latter defaults to using the primary selection. Unfortunately it didn't help with the gui bug - I'll have to keep working on that one. Uploading to Melpa soon - might take a while for it to show up. Thanks again, |
Actually I think I'll make it an option to use the primary selection instead of the clipboard, as some people might prefer to use it that way - then they could just select text in the browser to copy it to Emacs, for instance. Will try to get it to cooperate for both Windows and Linux. |
Okay, I finally fixed the problem with the duplicates in the kill-ring - it needed to check if Emacs was the owner of the selection with x-selection-owner-p. And I initially added an option clipmon-use-primary-selection, which worked - you could select some text in Firefox, and it would be added to the kill-ring. But if the timer happened to fire when you were in the midst of making a selection, it would add the partial text to the kill-ring, or insert it if autoinsert was on. So I just removed that option. Now to get something added to the kill-ring from an external application the user will need to copy it to the clipboard, which was the original intent of the program. |
I just have this configuration.
(add-to-list 'after-init-hook 'clipmon-mode-start)
Upon highlighting a region, no matter in emacs or in other applications, it keeps pushing the highlighted text to the kill ring. Can it be configured so that text only push to kill ring when I copy it?
The text was updated successfully, but these errors were encountered: