Recently, I change my laptop from old Thinkpad to newer laptop with much larger touchpad. I've found that I frequently touch the sensitive touchpad while I'm using emacs. And with some mysterious combination, very often there will be a highlight appear on the emacs buffer. The highlight is persist. Cannot be removed by navigating cursor or mouse click. It's not emacs selection mark. The only way I can remove it is to close the buffer and reload the file.

This is very annoying. Anybody know what is it, how to remove it, and best if I can prevent it from occur in the first place.

enter image description here

2 Answers 2


It's the secondary selection. Clicking and dragging sets the primary selection, and middle click pastes from that selection. Holding alt while clicking and dragging sets the secondary selection, and M-mouse-2 pastes from it. Very few applications use the secondary selection any more, but it's quite handy when you have two things to copy and paste. See section 12.3.3 Secondary Selection in the Emacs manual for more information.

There's no command to cancel the secondary selection, but if you left-click with Alt (M-mouse-1), it'll make the secondary selection empty.

  • 1
    Just alt + click again somewhere, that selection mark will goes away. Thanks a lot.
    – Sake
    Jun 3, 2020 at 8:11
  • Please consider adding the info in @Sake's comment to the answer. (Comments can be deleted at any time.)
    – Drew
    Jun 3, 2020 at 16:31

I use package disable-mouse:

(package-install "use-package") ; once, if not already installed

(require 'use-package)
(use-package disable-mouse
    :ensure t
    :diminish disable-mouse-global-mode
    :commands global-disable-mouse-mode
    :init (global-disable-mouse-mode))

Your Answer

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

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