Did you know that you can press C-M-l
to invoke the command reposition-window
? Here’s an excerpt from its docstring:
Make the current definition and/or comment visible. Further invocations move it to the top of the window or toggle the visibility of comments that precede it.
Very useful. And since it uses the generic commands beginning-of-defun
and end-of-defun
, which in turn uses the variables beginning-of-defun-function
and end-of-defun-function
, it works in quite a few modes (including Org-mode).