[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 46ffb0114a 1/7: Header margins
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 46ffb0114a 1/7: Header margins |
Date: |
Wed, 20 Nov 2024 18:59:34 -0500 (EST) |
branch: elpa/dslide
commit 46ffb0114a55bbea7b0ce532f83943e734c1c17a
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
Header margins
- enable partial line height
- fix the white space in edge cases
---
dslide.el | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/dslide.el b/dslide.el
index 3d9b1d150d..b6ff7d4a6b 100644
--- a/dslide.el
+++ b/dslide.el
@@ -2272,40 +2272,48 @@ from existing state cleanup."
(format-time-string "%Y-%m-%d")))
(email (when-let ((email (or dslide-email
(cadr (assoc-string "EMAIL"
keywords)))))
- (concat "<" email ">"))))
-
- ;; The calls to `propertize' make up for the fact that these values may
be
- ;; strings, set from elsewhere, but we want to display these strings as
if
- ;; they were fontified within the buffer.
+ (concat "<" email ">")))
+ (info-line (concat
+ (when (and dslide-header-date date)
+ (dslide--info-face (concat date " ")))
+ (when (and dslide-header-author author)
+ (dslide--info-face (concat author " ")))
+ (when (and dslide-header-email email)
+ (dslide--info-face (concat email " ")))))
+ (info-line (when info-line
+ (concat info-line (dslide--info-face "\n")))))
+
+ ;; The calls to `propertize' are needed in case the strings are
+ ;; specified without properties they normally would have when gathered
+ ;; from the fontified buffer text.
(if dslide-header
(overlay-put
dslide--header-overlay 'before-string
(concat (dslide--margin-lines dslide-margin-title-above)
(propertize title 'face '(org-document-title default))
(dslide--margin-lines dslide-margin-title-below)
- (when (and dslide-header-date date)
- (dslide--info-face (concat date " ")))
- (when (and dslide-header-author author)
- (dslide--info-face (concat author " ")))
- (when (and dslide-header-email email)
- (dslide--info-face (concat email " ")))
+ info-line
(when (and breadcrumbs
dslide-breadcrumb-separator)
- (concat (dslide--info-face "\n")
- (dslide--get-parents
+ (concat (dslide--get-parents
dslide-breadcrumb-separator)))
+ (dslide--info-face "\n")
(dslide--margin-lines dslide-margin-content)))
(overlay-put dslide--header-overlay 'before-string
(dslide--margin-lines dslide-margin-content))))))
(defun dslide--info-face (s)
- (propertize s 'face '(org-document-info default)))
+ (prog1 s (add-face-text-property
+ 0 (length s) '(org-document-info default) t s)))
(defun dslide--margin-lines (lines)
(dslide--info-face
(if (display-graphic-p)
- (propertize "\n" 'line-height (float lines))
+ (propertize "\n"
+ 'line-height (float lines)
+ 'face (when (< lines 1.0)
+ (list :height lines)))
(make-string (floor lines) ?\n))))
(defun dslide--breadcrumbs-reducer (delim)
- [nongnu] elpa/dslide updated (4209916697 -> 92518d7978), ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 0a4b2b81d8 4/7: Introducing Filtering, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 46ffb0114a 1/7: Header margins,
ELPA Syncer <=
- [nongnu] elpa/dslide 8837fd12a4 2/7: Options to hide tags and todos, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 3d72e27609 5/7: line noise and cruft removal, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 1eda39cbd0 3/7: When no slide action is present, execute a forward step, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide ef9b7fe095 6/7: New Image Features!, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 92518d7978 7/7: introducing propertize action, ELPA Syncer, 2024/11/20