branch: externals/org-modern
commit d6376e442692de0ee3b667a57cbac76e6eca3c16
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Prettify filetags (Fix #135)
---
CHANGELOG.org | 1 +
example.org | 1 +
org-modern.el | 8 +++++---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 6dbdebfbb1..487a621ab3 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -5,6 +5,7 @@
* Development
- Fix star prettification if =org-indent-mode= is enabled.
+- Prettify =filetags=.
* Version 0.9 (2023-03-12)
diff --git a/example.org b/example.org
index 95315f1ee6..974280688d 100644
--- a/example.org
+++ b/example.org
@@ -1,5 +1,6 @@
#+title: Modern Org Example
#+author: Daniel Mendler
+#+filetags: :example:org:
This example Org file demonstrates the Org elements,
which are styled by =org-modern=.
diff --git a/org-modern.el b/org-modern.el
index 5c0d615c4d..e262f82892 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -674,9 +674,6 @@ the font.")
org-modern-horizontal-rule)))))
(when org-modern-table
'(("^[ \t]*\\(|.*|\\)[ \t]*$" (0 (org-modern--table)))))
- (when org-modern-tag
- `((,(concat "^\\*+.*?\\( \\)\\(:\\(?:" org-tag-re ":\\)+\\)[ \t]*$")
- (0 (org-modern--tag)))))
(when org-modern-footnote
`(("^\\(\\[fn:\\)[[:word:]-_]+\\]" ;; Definition
,@(if-let ((x (car org-modern-footnote)))
@@ -716,6 +713,11 @@ the font.")
(2 ,(if org-modern-progress '(org-modern--progress) ''(face nil
display " ")))
(6 '(face nil display " ")))))
'((org-fontify-meta-lines-and-blocks)) ;; Ensure that blocks are properly
fontified
+ (when org-modern-tag
+ `((,(concat
+ "^\\(?:\\*+.*?\\|^[ \t]*#\\+\\(?:filetags\\|FILETAGS\\):\\)\\(
+\\)\\(:\\(?:"
+ org-tag-re ":\\)+\\)[ \t]*$")
+ (0 (org-modern--tag)))))
(when org-modern-keyword
`(("^[ \t]*\\(#\\+\\)\\([^: \t\n]+\\):"
,@(pcase org-modern-keyword