rolandwalker / simpleclip

Simplified access to the system clipboard in Emacs.
174 stars 16 forks source link

Insert pasted code from clipboard to yank-killring? #3

Closed ReneFroger closed 8 years ago

ReneFroger commented 8 years ago

Hi there! Thanks for sharing this awesome package.

When I paste something in Emacs from clipboard, then later after pasting another code, I want to paste same code that I pasted earlier in Emacs, then I call helm-show-kill-ring. I use this workflow a lot. Then I figure out that the contents of simpleclip are not visible in killring.

So I'm wondering if there is any combination possible between the killring and simpleclip, where the contents are added to killring after calling simpleclip-paste?

I hope I made it clear enough, if not, say it! :+1:

Thanks in advance for your reply.

rolandwalker commented 8 years ago

Hi!

I can understand why you would want that ability.

However, the stated purpose of this particular package is to remove interactions between the kill-ring and the clipboard.

Won't things start working the way you want if you just uninstall simpleclip.el ?

ReneFroger commented 8 years ago

I was thinking in the direction if there is a seperately kill-ring for only paperclip?

Then I could figure out how I could combine two helm sources (kill-ring and paperclip-kill-ring), without affecting the behaviour of two different systems (the system clipboard and the Emacs kill ring) and still completely independent.

rolandwalker commented 8 years ago

Yes, it is a fun idea, though I think it should be in a different library. (This library promises to remove features rather than to add them.)

One limitation of any Emacs library for paste-ring would be that you could only reliably catch clipboard events that happened within Emacs. On OS X, I use the persistent paste feature of (Alfred)[https://www.alfredapp.com/] many times a day, and before that, (Flycut)[https://github.com/TermiT/Flycut]. These catch all clipboard events, and that is a big part of what makes them useful. After all, the clipboard is designed for communication between different apps.

What would be clever is to connect helm to the outside source – that is, to have helm read Flycut's comprehensive data store. You would need a different dependency for each platform, though.

ReneFroger commented 8 years ago

Interesting idea. But it seems there is no kill-ring (aka history list) for only simpleclip?

rolandwalker commented 8 years ago

No, and I want this particular library to stay completely simple, so I'm going to close.

In a separate library, it seems there would be several ways to approach the functionality.