Skip to main content

Timeline for read clipboard into yasnippet

Current License: CC BY-SA 3.0

10 events
when toggle format what by license comment
Nov 4, 2015 at 8:50 vote accept Xi Xiao
Nov 4, 2015 at 8:50 comment added Xi Xiao wow, I didnt expect there is a viable solution, but here it is! thank you both above!
Oct 5, 2015 at 6:46 comment added Erik Sjöstrand Yes @npostavs you are correct. I wonder why clipboard-yank worked in my Emacs though... Anyway I have edited my answer with your solution.
Oct 5, 2015 at 6:44 history edited Erik Sjöstrand CC BY-SA 3.0
Improved answer based on @npostavs comment
Oct 3, 2015 at 18:38 comment added npostavs I think you should use (current-kill 0) instead of (clipboard-yank); the backquotes tell yasnippet to insert whatever the expression returns, but clipboard-yank inserts the yanked string into the buffer and returns nil.
Oct 2, 2015 at 12:29 comment added Xi Xiao Sorry, but your latest code I received this [[[yas] elisp error: Wrong type argument: listp, thttps://gitter.im/syl20bnr/spacemacs][]] the value in clipboard is https://gitter.im/syl20bnr/spacemacs so the yasnippet code expands correctly but there is kinda wired error in front...
Oct 2, 2015 at 9:33 comment added Erik Sjöstrand I tested it now and noticed that I forgot curly braces. I did not get an error though. I've updated the answer and also included a yasnippet header in order to get a full working example.
Oct 2, 2015 at 9:31 history edited Erik Sjöstrand CC BY-SA 3.0
added 141 characters in body
Oct 1, 2015 at 17:45 comment added Xi Xiao have you had chance to test this? I received error like [[[yas] elisp error: Wrong type argument: listp, thttps://mail.google.com/mail/u/0/#inbox][]]
Oct 1, 2015 at 11:05 history answered Erik Sjöstrand CC BY-SA 3.0