emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/org-present 68aeae2132 31/47: fix: Needless hiding of emph


From: ELPA Syncer
Subject: [nongnu] elpa/org-present 68aeae2132 31/47: fix: Needless hiding of emphasis markers already hidden by Org
Date: Sat, 8 Jan 2022 13:58:30 -0500 (EST)

branch: elpa/org-present
commit 68aeae213212be22913aa390214dcbf8e4f711e0
Author: Keith Pinson <keith.pinson@banno.com>
Commit: Keith Pinson <keith.pinson@banno.com>

    fix: Needless hiding of emphasis markers already hidden by Org
    
    Not only needless, but buggy compared to what Org is doing.
---
 org-present.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/org-present.el b/org-present.el
index 822c017dee..7e9009ddf2 100644
--- a/org-present.el
+++ b/org-present.el
@@ -180,11 +180,14 @@
     (goto-char (point-min))
     (while (re-search-forward "^\\(*+\\)" nil t)
       (org-present-add-overlay (match-beginning 1) (match-end 1)))
-    ;; hide emphasis markers
-    (goto-char (point-min))
-    (while (re-search-forward org-emph-re nil t)
-      (org-present-add-overlay (match-beginning 2) (1+ (match-beginning 2)))
-      (org-present-add-overlay (1- (match-end 2)) (match-end 2)))))
+    ;; hide emphasis markers if not already hidden by org
+    (if org-hide-emphasis-markers nil
+      ;; TODO https://github.com/rlister/org-present/issues/12
+      ;; It would be better to reuse org's own facility for this, if possible.
+      (goto-char (point-min))
+      (while (re-search-forward org-emph-re nil t)
+        (org-present-add-overlay (match-beginning 2) (1+ (match-beginning 2)))
+        (org-present-add-overlay (1- (match-end 2)) (match-end 2))))))
 
 (defun org-present-rm-overlays ()
   "Remove overlays for this mode."



reply via email to

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