* simple code to use focus-mode with org
@ 2020-04-23 18:48 Marc Ihm
2020-04-24 4:55 ` stardiviner
0 siblings, 1 reply; 2+ messages in thread
From: Marc Ihm @ 2020-04-23 18:48 UTC (permalink / raw)
To: emacs-orgmode; +Cc: larstvei
Hi,
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)
(outline-previous-heading)
(outline-next-heading)))
(require 'thingatpt)
(require 'focus)
(setq focus-mode-to-thing '((org-mode . heading)))
(focus-mode)
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.
regards,
Marc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: simple code to use focus-mode with org
2020-04-23 18:48 simple code to use focus-mode with org Marc Ihm
@ 2020-04-24 4:55 ` stardiviner
0 siblings, 0 replies; 2+ messages in thread
From: stardiviner @ 2020-04-24 4:55 UTC (permalink / raw)
To: Marc Ihm; +Cc: larstvei, emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This looks interesting, thanks.
Marc Ihm <marc@ihm.name> writes:
> Hi,
>
> 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)
> (outline-previous-heading)
> (outline-next-heading)))
>
> (require 'thingatpt)
> (require 'focus)
>
> (setq focus-mode-to-thing '((org-mode . heading)))
> (focus-mode)
>
>
> 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.
>
> regards,
> Marc
- --
[ stardiviner ]
I try to make every word tell the meaning what I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6icT8UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsOnMwf+IBLbJnh4WSk3BzK9syarP75MI0oc
G7LF6y9sBeDdTWJMcI0ogwmSWGN/AUbon8BLAcgUhemztAP91QXt94nb1hyZlQPR
qY5OgAjYFlEfM3kKWt+T2Uexb0eqwyjR4BPKkyCzvbppuUQ8RXvQuFvVrhOz0yoj
NB302fu94dMeBhtr3OKLpuKX7enl6UK3RH+Uw2/zCaAcpS1do/wbIEZ1/MwThQKN
SAqI0QH2gX9Bn7Dbdza3rSP7G17Eu8VDpgScfS+cHFtZoHzOIyodi9wRgQ0MlUBv
zgVFSr6qP+m/U/mvy9Zjf7zQWPEwiHiHxCmoh+7XWg4r71Wmvv2aU0ycGw==
=AQr+
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-24 4:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 18:48 simple code to use focus-mode with org Marc Ihm
2020-04-24 4:55 ` stardiviner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).