emacsxemacs

Pasting with mouse-select in GNU Emacs


There is an functionality in XEmacs that if the user selects a region with the mouse while holding Ctrl, the selected region will be automatically pasted at the current cursor position.

In other words, if you need to quickly copy a short block of text from some open buffer to a new spot, you put the cursor there, and then do Ctrl-mouse-select and it works.

Unfortunately, I recently had to switch from XEmacs to GNU Emacs, and I'm looking to see if there is similar functionality there, or perhaps I could provide it with a custom module (I am very bad at Lisp, unfortunately).


Solution

  • You sure can, the functionality is bound to mouse button 3 if I'm not mistaken. I assume so, because clicking my mousewheel yanks what I've copied at the cursor.

    And Mousewheel == mouse button 3 in most cases.

    1. Select using your mouse
    2. With your mouse button down, hit control
    3. Release your mouse button
    4. Hit mouse button 3
    5. Profit - selection yanked at your cursor

    edit:

    I found this on http://www.gnu.org/software/emacs/manual/html_node/emacs/Mouse-Commands.html