org-super-agenda icon indicating copy to clipboard operation
org-super-agenda copied to clipboard

Interaction between org-super-agenda and org-agenda-columns

Open mskorzhinskiy opened this issue 6 years ago • 1 comments

After introducing 4af03c9 previous behaviour of org-agenda-columns have changed. Previously org-agenda-columns choose every super-agenda group as a column header, while right now column header is always a line with a date.

Previously: before

Now: now

I believe the problem itself is not in the org-super-agenda package, but rather in the org-agenda-columnview function. But I'd like to discuss it firtst before sending / testing any patches in case I'm missing something.

So the commit #4af03c9 have the following change:

@@ -230,7 +235,7 @@ Prepended with `org-super-agenda-header-separator'."
   (pcase s
     ('none "")
     (_ (setq s (concat " " s))
-       (org-add-props s nil 'face 'org-agenda-structure
+       (org-add-props s nil 'face 'org-super-agenda-header
                       'keymap org-super-agenda-header-map
                       ;; NOTE: According to the manual, only `keymap' should be necessary, but in my
                       ;; testing, it only takes effect in Agenda buffers when `local-map' is set, so

While org-agenda-column understands if this is the header by checking if line is org-date-line or have a face equal to org-agenda-structure:

From org-agenda-colview-summarize from org-colview.el:
          ...
	  (when (or (get-text-property (point) 'org-date-line)
		    (eq (get-text-property (point) 'face)
			'org-agenda-structure)))
	    ;; OK, this is a date line that should be used.
          ...

Probably the better way would be to make exact properties here to be customizable. Or check if the property was inherited from org-agenda-strucutre, although I'm not sure if there is an easy way to do so.

In my code I just hardcoded org-agenda-structure to org-super-agenda-header as temporary fix, but it is not flexiable enough and org-mode developers unlikely accept such change.

Any suggestions?

mskorzhinskiy avatar Jan 03 '19 21:01 mskorzhinskiy

Hi,

(FYI, don't put # before commit hashes, as it breaks GitHub's automatic linking, and isn't "idiomatic" git anyway.)

I don't think I've ever used the agenda column view, so I had no idea about that. I'm pleasantly surprised that it works to any degree at all!

I think it would be easy to fix this by making the header face customizable. By that I mean, not simply customizing the org-super-agenda-header face, but having another defcustom that would allow a different face to be selected, such as org-agenda-structure.

Ideally, it might be good for Org to check whether a face inherits from the structure face, but as you said, I can't find a function that already does that, so we probably can't expect Org to do that unless there's a very good reason.

alphapapa avatar Jan 03 '19 22:01 alphapapa