From 9291e0e4b66bcd42c7003ac64c8a20c6fc72a2b4 Mon Sep 17 00:00:00 2001 From: larstvei Date: Tue, 24 Sep 2024 17:30:02 +0200 Subject: [PATCH] Setup for org-present --- init.org | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/init.org b/init.org index c6683ff..c725c15 100644 --- a/init.org +++ b/init.org @@ -541,6 +541,9 @@ ** Center content mode + [[https://git.larstvei.no/larstvei/center-content-mode][=center-content-mode=]] is a small, homegrown, minor mode for centering the + buffer content both horizontally and vertically. + #+begin_src emacs-lisp (use-package center-content-mode @@ -1030,6 +1033,55 @@ #+end_src +** Org present + + [[https://github.com/rlister/org-present][=org-present-mode=]] provides a minimalistic slide view of an org-mode buffer. + Together with =org-modern=, =center-content-mode=, =focus-mode= and a few other + customizations, we get pretty decent looking slides! + + #+begin_src emacs-lisp + + (use-package org-present + :after center-content-mode + :hook ((org-present-mode + . (lambda () + (jinx-mode -1) + (org-modern-mode -1) + (set (make-local-variable 'org-modern-hide-stars) t) + (setq cursor-type nil) + (org-modern-mode 1) + (org-present-big) + (org-display-inline-images) + (focus-mode 1) + (center-content-mode 1))) + (org-present-mode-quit + . (lambda () + (jinx-mode 1) + (org-modern-mode -1) + (setq org-modern-hide-stars (default-value 'org-modern-hide-stars)) + (setq cursor-type (default-value 'cursor-type)) + (org-modern-mode 1) + (focus-mode -1) + (center-content-mode -1)))) + :config + (defun org-present-next-item () + (interactive) + (unless (re-search-forward "^+" nil t) + (org-present-next))) + + (defun org-present-prev-item () + (interactive) + (unless (re-search-backward "^+" nil t) + (org-present-prev))) + + :bind (:map org-present-mode-keymap + ("" . org-present-next-item) + ("C-" . org-present-next-item) + ("" . org-present-prev-item) + ("C-" . org-present-prev-item))) + + #+end_src + * Markdown Markdown is pretty nice, especially when collaborating with others (as most