diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 2b52d78a5..b6ee443e4 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -111,6 +111,11 @@ option ~org-display-remote-inline-images~. `k' option, but the user specifies a time of day, not a number of minutes. +*** Allow text rescaling in column view + +You can now use =C-x C-+= in column view: the columns face size will +increase or decrease, together with the column header size. + *** =ob-clojure.el= supports inf-clojure.el and ClojureScript evaluation You can now set ~(setq org-babel-clojure-backend 'inf-clojure)~ and diff --git a/lisp/org-colview.el b/lisp/org-colview.el index bb244434c..417048611 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -44,6 +44,8 @@ (declare-function org-dynamic-block-define "org" (type func)) (declare-function org-link-display-format "ol" (s)) (declare-function org-link-open-from-string "ol" (s &optional arg)) +(declare-function face-remap-remove-relative "face-remap" (cookie)) +(declare-function face-remap-add-relative "face-remap" (face &rest specs)) (defvar org-agenda-columns-add-appointments-to-effort-sum) (defvar org-agenda-columns-compute-summary-properties) @@ -364,11 +366,18 @@ ORIGINAL is the real string, i.e., before it is modified by ("TODO" (propertize v 'face (org-get-todo-face original))) (_ v))))) +(defvar org-columns-header-line-remap nil + "Store the relative remapping of column header-line. +This is needed to later remove this relative remapping.") + (defun org-columns--display-here (columns &optional dateline) "Overlay the current line with column display. COLUMNS is an alist (SPEC VALUE DISPLAYED). Optional argument DATELINE is non-nil when the face used should be `org-agenda-column-dateline'." + (when (ignore-errors (require 'face-remap)) + (setq org-columns-header-line-remap + (face-remap-add-relative 'header-line '(:inherit default)))) (save-excursion (beginning-of-line) (let* ((level-face (and (looking-at "\\(\\**\\)\\(\\* \\)") @@ -378,8 +387,7 @@ DATELINE is non-nil when the face used should be (org-get-at-bol 'face)) 'default)) (color (list :foreground (face-attribute ref-face :foreground))) - (font (list :height (face-attribute 'default :height) - :family (face-attribute 'default :family))) + (font (list :family (face-attribute 'default :family))) (face (list color font 'org-column ref-face)) (face1 (list color font 'org-agenda-column-dateline ref-face))) ;; Each column is an overlay on top of a character. So there has @@ -502,6 +510,9 @@ for the duration of the command.") (defun org-columns-remove-overlays () "Remove all currently active column overlays." (interactive) + (when (and (fboundp 'face-remap-remove-relative) + org-columns-header-line-remap) + (face-remap-remove-relative org-columns-header-line-remap)) (when org-columns-overlays (when (local-variable-p 'org-previous-header-line-format) (setq header-line-format org-previous-header-line-format)