Hi I'm on Linux and Emacs version is 26.3.

I would like to expand or collapse a block by mouse click, instead of moving the cursor to the header and press tab.

I actually have a windows computer does so, but do not work on my Linux one. I’ve tried to copy relevant files, however doesn’t work.

I also googled, but to be honest, cannot find where to start.

So if anyone can help? Thanks a lot!!


You can use the built-in org-mouse which adds support for subtree expansion/collapsing (org-cycle) with the left mouse button.

To use it either

  • add (require 'org-mouse) to your init file
  • or activate it in the current session with M-: (require 'org-mouse) RET M-x org-mode-restart RET.

Org mouse implements the following features (taken from the package commentary):

;; * following links with the left mouse button
;; * subtree expansion/collapse (org-cycle) with the left mouse button
;; * several context menus on the right mouse button:
;;    + general text
;;    + headlines
;;    + timestamps
;;    + priorities
;;    + links
;;    + tags
;; * promoting/demoting/moving subtrees with mouse-3
;;    + if the drag starts and ends in the same line then promote/demote
;;    + otherwise move the subtree

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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