[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simple code to use focus-mode with org

From: Marc Ihm
Subject: simple code to use focus-mode with org
Date: Thu, 23 Apr 2020 20:48:48 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0


when presenting things informally from org I often use the great focus-mode (see https://github.com/larstvei/Focus) to keep my audience focused on the individual nodes of my presentation:

(defun forward-heading (&optional N)
  "Forward one orgmode-heading for thing-at-point"
  (interactive "p")
  (if (= N -1)

(require 'thingatpt)
(require 'focus)

(setq focus-mode-to-thing '((org-mode . heading)))

The only interesting thing here is the trivial function forward-heading, which allows focus-mode to handle org-nodes and focus on them. The connection is made by setting focus-mode-to-thing; the symbol heading leads focus-mode to invoke forward-heading, see the documentation of thingatpt for details.

Hope someone finds this useful.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]