3

I have just entered the Spacemacs ecosystem with no prior Emacs experience.

I want to copy paste a link with my mouse from my X clipboard using middle-click in Spacemacs Org mode. I have selected the link in my browser with double-clicking (or with C-c).

In Spacemacs, editing emacs-notes.org, I type C-c l and the following appears:

screenshot-HELM-Org-Insert-Link

I can type the http://.../ with the yellow-filled-box cursor (screenshot-HELM-Org-Insert-Link-cursor), but I cannot use the mouse middle-click (or C-v) to paste it from my X clipboard and save me from all the typing.

~/.spacemacs contains:

(defun dotspacemacs/user-config ()
  (xterm-mouse-mode -1)) ;; copy paste with mouse middle button from X

Nevertheless, when I middle-click, the system pastes the link elsewhere (e.g. in the emacs-notes.org buffer). I have also tried disabling the mouse but this doesn't work either.

How can I paste a link from the X clipboard in the yellow-filled-boxed using the mouse (or a keyboard shortcut)?

If there are other ways to do this, I'd like to learn them.

4
  • So I had a similarish situation today. I was trying to paste a link I got from chromes address bar into spacemacs document in org mode using SPC m i l. My spacemacs was in cygwin's terminal emacs in a tmux session in a mintty terminal in cygwin in windows 10. So there were many layers in which something might go wrong. But just messing around I found out I can get the terminals(mintty) right click menu (either tmux or emacs or spacemacs disabled the terminals right click menu for some reason) by holding shift and then right clicking. Also emacs has a menu you can bring up if you hold alt and r Mar 14, 2018 at 23:46
  • xterm-mouse-mode only affects the behavior of Emacs when running inside a terminal emulator, not in GUI frames (like the one that appears in the image above).
    – Stefan
    Mar 15, 2018 at 0:15
  • Have you tried middle clicking on the minibuffer?
    – user12563
    Nov 13, 2018 at 18:31
  • I always do C-y in that box. Hope that helps you.
    – LaZlit0
    Apr 3, 2022 at 9:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.