Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I paste text from, for example, the browser into emacs, the emacs cursor is often already at the position where I want to paste the text. If I would use emacs in console mode, I could just move the mouse over the text and press the middle button (if I had gpm disabled). But when using emacs in X (window) mode, I have to move the mouse cursor at the exact position where I want to past the text.

Is there a way to tell emacs to use the current emacs cursor position for pasting, instead of the mouse cursor position?

I hope you get my problem. :-)

share|improve this question
Good question, I noticed I lacked this functionality in certain scenarios. But looking back I would say I prefer standard behavior in about half the cases. Would be nice to have both modes quickly accessible at all times. – Alexander Shcheblikin Feb 6 '15 at 2:03
up vote 10 down vote accepted

Try this setting:

(setq mouse-yank-at-point t)
share|improve this answer
Great, although this settings doesn't show up on M-x mouse-yank... auto-complete, it works when I put this in my .emacs :-) – Flow Sep 1 '11 at 19:44
That's because it's a variable, not a function. You could use M-x set-variable RET mouse-yank-at-point (and completion should work here) – Antoine Pelisse Sep 2 '11 at 11:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.