branch: externals/org-modern
commit 7d2c1774d26ef2786925ce403593d7850d30a831
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Prevent background from code blocks leaking from folded blocks
---
README.org | 7 ++-----
org-modern.el | 9 +++++++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/README.org b/README.org
index a25ca4cca1..1409c4983c 100644
--- a/README.org
+++ b/README.org
@@ -87,11 +87,8 @@ screenshot above after the installation of =org-modern=.
;; Org styling, hide markup etc.
org-hide-emphasis-markers t
org-pretty-entities t
- org-agenda-tags-column 0)
-
-;; Ellipsis styling
-(setq org-ellipsis "…")
-(set-face-attribute 'org-ellipsis nil :inherit 'default :box nil)
+ org-agenda-tags-column 0
+ org-ellipsis "…")
(global-org-modern-mode)
#+end_src
diff --git a/org-modern.el b/org-modern.el
index 81c53ebaae..4c69c73de6 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -786,6 +786,7 @@ whole buffer; otherwise, for the line at point."
('t '(1 '(face nil invisible org-modern)))
((pred stringp) `(1 '(face nil display ,org-modern-keyword)))
(_ '(0 (org-modern--keyword)))))))
+ ;; Timestamps can come after keywords
(when org-modern-timestamp
'(("\\(?:<\\|^\\[\\|[^]]\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?:
[[:word:]]+\\.?\\)?\\(?: [.+-]+[0-9ymwdh/]+\\)*\\)\\(\\(?: [0-9:-]+\\)?\\(?:
[.+-]+[0-9ymwdh/]+\\)*\\)\\(?:>\\|\\]\\)"
(0 (org-modern--timestamp)))
@@ -816,7 +817,9 @@ whole buffer; otherwise, for the line at point."
`(("^\\([ \t]*\\)\\(#\\+\\(?:begin\\|BEGIN\\)_\\)\\(\\S-+\\).*"
,@(car specs))
("^\\([ \t]*\\)\\(#\\+\\(?:end\\|END\\)_\\)\\(\\S-+\\).*"
- ,@(cdr specs)))))))
+ ,@(cdr specs)))))
+ (when (fboundp 'org-activate-folds)
+ '(org-activate-folds))))
;;;###autoload
(define-minor-mode org-modern-mode
@@ -845,7 +848,9 @@ whole buffer; otherwise, for the line at point."
(mapcar (pcase-lambda (`(,k . ,v)) (cons k (org-modern--symbol v)))
org-modern-checkbox)
org-modern--font-lock-keywords
- (append (remove '(org-fontify-meta-lines-and-blocks)
org-font-lock-keywords)
+ (append (remove '(org-fontify-meta-lines-and-blocks)
+ (remove '(org-activate-folds)
+ org-font-lock-keywords))
(org-modern--make-font-lock-keywords)))
(font-lock-remove-keywords nil org-font-lock-keywords)
(font-lock-add-keywords nil org-modern--font-lock-keywords)