diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-25 13:47:40 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-02-25 13:47:40 +0100 |
commit | 87a00b3595b4be5dcf9f56f782096892e69f0923 (patch) | |
tree | 40a146f5ffe5f3a78e268cf214be199240106802 | |
parent | c6829e239ce76c29956c4aa9cc95e57677e04638 (diff) | |
parent | d437c1b5de4ec955a726e74018d1865aa7d44a5f (diff) | |
download | org-mode-87a00b3595b4be5dcf9f56f782096892e69f0923.tar.gz |
Merge branch 'maint'
-rw-r--r-- | doc/org-manual.org | 10 | ||||
-rw-r--r-- | lisp/org-agenda.el | 9 | ||||
-rw-r--r-- | lisp/org-colview.el | 17 | ||||
-rw-r--r-- | lisp/org-compat.el | 3 |
4 files changed, 25 insertions, 14 deletions
diff --git a/doc/org-manual.org b/doc/org-manual.org index bb15dd6..00e5e10 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -10452,11 +10452,11 @@ environment. This causes the following issues: the entries in the agenda are collected from different files, and different files may have different columns formats, this is a non-trivial problem. Org first checks if the variable - ~org-agenda-overriding-columns-format~ is currently set, and if so, - takes the format from there. Otherwise it takes the format - associated with the first item in the agenda, or, if that item does - not have a specific format (defined in a property, or in its file), - it uses ~org-columns-default-format~. + ~org-overriding-columns-format~ is currently set, and if so, takes + the format from there. Otherwise it takes the format associated + with the first item in the agenda, or, if that item does not have + a specific format (defined in a property, or in its file), it uses + ~org-columns-default-format~. 2. #+cindex: @samp{CLOCKSUM}, special property diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index e64a04a..8563d2c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3767,7 +3767,8 @@ FILTER-ALIST is an alist of filters we need to apply when (setq-local org-agenda-name name))) (setq buffer-read-only nil)))) -(defvar org-agenda-overriding-columns-format) ; From org-colview.el +(defvar org-overriding-columns-format) +(defvar org-local-columns-format) (defun org-agenda-finalize () "Finishing touch for the agenda buffer, called just before displaying it." (unless org-agenda-multi @@ -3782,9 +3783,9 @@ FILTER-ALIST is an alist of filters we need to apply when (org-agenda-align-tags)) (unless org-agenda-with-colors (remove-text-properties (point-min) (point-max) '(face nil))) - (when (bound-and-true-p org-agenda-overriding-columns-format) - (setq-local org-agenda-overriding-columns-format - org-agenda-overriding-columns-format)) + (when (bound-and-true-p org-overriding-columns-format) + (setq-local org-local-columns-format + org-overriding-columns-format)) (when org-agenda-view-columns-initially (org-agenda-columns)) (when org-agenda-fontify-priorities diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 3353ae2..46aa9db 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -558,9 +558,15 @@ for the duration of the command.") (org-columns-next-allowed-value) (org-columns-edit-value "TAGS"))) -(defvar org-agenda-overriding-columns-format nil +(defvar org-overriding-columns-format nil "When set, overrides any other format definition for the agenda. -Don't set this, this is meant for dynamic scoping.") +Don't set this, this is meant for dynamic scoping. Set +`org-local-columns-format' instead.") + +(defvar-local org-local-columns-format nil + "When set, overrides any other format definition for the agenda. +This can be set as a buffer local value to avoid interfering with +dynamic scoping for `org-overriding-columns-format'.") (defun org-columns-edit-value (&optional key) "Edit the value of the property at point in column view. @@ -621,7 +627,7 @@ Where possible, use the standard interface for changing this line." (org-columns--call action) ;; The following let preserves the current format, and makes ;; sure that in only a single file things need to be updated. - (let* ((org-agenda-overriding-columns-format org-columns-current-fmt) + (let* ((org-overriding-columns-format org-columns-current-fmt) (buffer (marker-buffer pom)) (org-agenda-contributing-files (list (with-current-buffer buffer @@ -715,7 +721,7 @@ an integer, select that value." (org-columns--call action) ;; The following let preserves the current format, and makes ;; sure that in only a single file things need to be updated. - (let* ((org-agenda-overriding-columns-format org-columns-current-fmt) + (let* ((org-overriding-columns-format org-columns-current-fmt) (buffer (marker-buffer pom)) (org-agenda-contributing-files (list (with-current-buffer buffer @@ -1554,7 +1560,8 @@ PARAMS is a property list of parameters: (let* ((org-columns--time (float-time)) (fmt (cond - ((bound-and-true-p org-agenda-overriding-columns-format)) + ((bound-and-true-p org-overriding-columns-format)) + ((bound-and-true-p org-local-columns-format)) ((let ((m (org-get-at-bol 'org-hd-marker))) (and m (or (org-entry-get m "COLUMNS" t) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 4690d42..5441bc5 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -444,6 +444,9 @@ use of this function is for the stuck project list." (define-obsolete-variable-alias 'org-texinfo-def-table-markup 'org-texinfo-table-default-markup "Org 9.1") +(define-obsolete-variable-alias 'org-agenda-overriding-columns-format + 'org-overriding-columns-format "Org 9.2.2") + ;; The function was made obsolete by commit 65399674d5 of 2013-02-22. ;; This make-obsolete call was added 2016-09-01. (make-obsolete 'org-capture-import-remember-templates |