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

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

[nongnu] elpa/spacemacs-theme 94d3c142b3 330/336: Set org-column face to


From: ELPA Syncer
Subject: [nongnu] elpa/spacemacs-theme 94d3c142b3 330/336: Set org-column face to inherit from default if using variable heights
Date: Fri, 14 Jan 2022 10:59:49 -0500 (EST)

branch: elpa/spacemacs-theme
commit 94d3c142b39d8d4457a3c95de406e8617a0d0219
Author: Dan Kessler <kesslerd@umich.edu>
Commit: Dan Kessler <kesslerd@umich.edu>

    Set org-column face to inherit from default if using variable heights
    
    If using spacemacs-theme with `spacemacs-theme-org-height` set to `t`, then
    `org-mode` headings of level 1-3 will have non-standard heights so that 
higher
    level headlines "stick out" more, which is aesthetically pleasing. However, 
if
    one enables `column-view` (with e.g., `C-c C-x C-c`), then things will be
    misaligned (see [this issue on `spacemacs`
    repo](https://github.com/syl20bnr/spacemacs/issues/14058), since the column
    headers are (likely) using the standard face height, but any level 1-3 
headers
    that appear in the column view table will have differing heights.
    
    The `org-column` face is overlaid on top of `org-level-{1,2,3}` but any
    unspecified lower attributes "shine through" and thus different rows of the
    "table" generated by `column-view` have different `height` and so things 
don't
    line up properly.
    
    Earlier (failed) attempts to fix this involved explicitly setting the 
`:height:`
    attribute of the `org-column` face to whatever the `:height` of the 
`default`
    face is.  However, that was problematic in that if the value of the default
    height later changed (either because the user changed it or one "zoomed" the
    frame as in emacs), then the column face would not track. I also tried 
setting
    it dynamically to whatever the current value of default was, but if using 
text
    rescaling (which uses face-remap), then the remapping wasn't taken into 
account
    and so when rescaling text in the buffer, org-column face would not change.
    
    The current fix sets the org-column face to inherit from default only if
    spacemacs-theme-org-height is set to t. If not, then it inherits from nil 
(which
    AFAIK has no effect). One downside of this fix is that when
    spacemacs-theme-org-height is set to t, org-column face will inherit all
    defined attributes from default, which includes for example not bolding 
text, so
    it might clobber some desirable properties of underlying faces. However, 
this
    seems superior to have the columns be so misaligned that column view is
    effectively broken.
---
 spacemacs-common.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spacemacs-common.el b/spacemacs-common.el
index 38a9975c55..ef7282e34b 100644
--- a/spacemacs-common.el
+++ b/spacemacs-common.el
@@ -746,7 +746,7 @@ to 'auto, tags may not be properly aligned. "
      `(org-block-end-line ((,class (:background ,cblk-ln-bg :foreground 
,cblk-ln :extend t))))
      `(org-clock-overlay ((,class (:foreground ,comp))))
      `(org-code ((,class (:foreground ,cyan))))
-     `(org-column ((,class (:background ,highlight))))
+     `(org-column ((,class (:background ,highlight :inherit ,(if 
spacemacs-theme-org-height 'default)))))
      `(org-column-title ((,class (:background ,highlight))))
      `(org-date ((,class (:underline t :foreground ,var))))
      `(org-date-selected ((,class (:background ,func :foreground ,bg1))))



reply via email to

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