Jump to content

Problem pasting from Alfred into Emacs

Simon K

Recommended Posts



I'm having a problem when using Alfred's paste functionality to paste into Emacs.


I'm using:

  • OS X 10.7.5
  • Alfred 2.0 (137)
  • GNU Emacs
[Terminology note:  (Ignore this unless you have an Emacs background!)  I use the word "window" below with its normal meaning. If you are familiar with Emacs terminology, I'm talking about Emacs frames, not Emacs windows.]


When I paste from the Alfred clipboard into Emacs:

  • the text does not appear in Emacs
  • the window into which I attempted to paste no longer responds to cursor keys; after I type some other character the cursor keys resume working
This happens every time I try it.


Things work fine in the other direction — copying text in Emacs results in the Alfred clipboard knowing about it.


Some details of my Emacs set-up that might possibly be relevant:


    ELISP> x-select-enable-clipboard


    ELISP> interprogram-paste-function



Can anyone reproduce this? Does anyone have an idea of what might be happening?



Link to comment
I'm having a problem when using Alfred's paste functionality to paste into Emacs.


I've put a ticket in for us to investigate further, but I'm not sure whether this is a bug in Alfred so may not be something we can fix.


I'll move this to Beta Discussion as you might get more help from other users, and we'll move it back to bugs if need be :)

Link to comment

I upgraded to Emacs 24.2.1, and things changed.


The attempted-paste now turns into an Emacs scroll-down-command. That makes sense if you know that scroll-down-command is invoked with Command-v. (Yes, Emacs is weird.)


So, I guess Alfred simply sends Command-v.


If I customise Emacs to bind Command-v to Emacs' version of paste (called yank), everything works nicely.


I'm pretty happy with this as a solution. Old-time Emacs hackers would probably find it annoying to have to rebind Command-v. It would be fantastic to be able to customise Alfred to send a user-specified character to Emacs (or more generally to specific applications). But if no-one is asking for it I wouldn't bother implementing it.


Thanks for listening.


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...