[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-present dfcb71c199 10/12: Merge pull request #26 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-present dfcb71c199 10/12: Merge pull request #26 from Kazark/toggle-heading-stars |
Date: |
Sat, 6 Aug 2022 14:58:55 -0400 (EDT) |
branch: elpa/org-present
commit dfcb71c1999eab075d5fc468d8561b78f88d02c1
Merge: ef1f1c5da9 d506a63fc5
Author: Ric Lister <rlister@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #26 from Kazark/toggle-heading-stars
Add a toggle for whether to hide stars in headings
---
org-present.el | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/org-present.el b/org-present.el
index 363b4d074f..c0f69b7810 100644
--- a/org-present.el
+++ b/org-present.el
@@ -166,6 +166,13 @@
(regexp-opt '("title:" "author:" "date:" "email:"))
string)))
+(defvar org-present-hide-stars-in-headings t
+ "Whether to hide the asterisk characters in headings while in presentation
+mode. If you turn this off (by setting it to nil) make sure to set
+`org-hide-emphasis-markers' non-nil, since currently `org-present''s algorithm
+for hiding emphasis markers has a bad interaction with bullets. This combo also
+makes tabs work in presentation mode as in the rest of Org mode.")
+
(defun org-present-add-overlays ()
"Add overlays for this mode."
(add-to-invisibility-spec '(org-present))
@@ -176,9 +183,10 @@
(let ((end (if (org-present-show-option (match-string 2)) 2 0)))
(org-present-add-overlay (match-beginning 1) (match-end end))))
;; hide stars in headings
- (goto-char (point-min))
- (while (re-search-forward "^\\(*+\\)" nil t)
- (org-present-add-overlay (match-beginning 1) (match-end 1)))
+ (if org-present-hide-stars-in-headings
+ (progn (goto-char (point-min))
+ (while (re-search-forward "^\\(*+\\)" nil t)
+ (org-present-add-overlay (match-beginning 1) (match-end 1)))))
;; hide emphasis/verbatim markers if not already hidden by org
(if org-hide-emphasis-markers nil
;; TODO https://github.com/rlister/org-present/issues/12
@@ -198,14 +206,16 @@
(defun org-present-rm-overlays ()
"Remove overlays for this mode."
- (mapc 'delete-overlay org-present-overlays-list)
+ (mapc #'delete-overlay org-present-overlays-list)
(remove-from-invisibility-spec '(org-present)))
(defun org-present-read-only ()
"Make buffer read-only."
(interactive)
(setq buffer-read-only t)
- (define-key org-present-mode-keymap (kbd "SPC") 'org-present-next))
+ (setq org-present-cursor-cache cursor-type
+ cursor-type nil)
+ (define-key org-present-mode-keymap (kbd "SPC") #'org-present-next))
(defun org-present-read-write ()
"Make buffer read-only."
- [nongnu] elpa/org-present 60d063f20a 05/12: Add org-present-toggle-one-big-page, (continued)
- [nongnu] elpa/org-present 60d063f20a 05/12: Add org-present-toggle-one-big-page, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 444f3b3b7e 06/12: link to blog and video, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 98b7d94a0f 11/12: Merge branch 'master' into master, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 140a8c3a34 01/12: feat: Add a toggle for whether to hide stars in headings, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 17412d085f 03/12: feat(folds): add org-present-startup-folded a la org-startup-folded, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 3c3588be82 04/12: Add and fix description of key bindings, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present ef1f1c5da9 08/12: Merge pull request #27 from Kazark/org-present-startup-folded, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 4ec04e1b77 12/12: Merge pull request #36 from rhdxmr/master, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 868d7087ca 07/12: Merge pull request #44 from rlister/systemcrafters-link, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present d506a63fc5 09/12: Merge branch 'master' into toggle-heading-stars, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present dfcb71c199 10/12: Merge pull request #26 from Kazark/toggle-heading-stars,
ELPA Syncer <=