Skip to content

Commit

Permalink
Add: (org-super-agenda-header-properties)
Browse files Browse the repository at this point in the history
Thanks to Abdul-Lateef Haji-Ali (@haji-ali).
  • Loading branch information
haji-ali authored and alphapapa committed Nov 30, 2019
1 parent edb8dd5 commit 75a664e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ These selectors take one argument alone, or multiple arguments in a list.
+ Option ~org-super-agenda-date-format~, used to format date headers in the ~:auto-date~ selector.
+ To-do keyword faces are applied to keywords in group headers.
+ Option =org-super-agenda-header-separator= may also be a character, which is automatically repeated to the window width. (Thanks to [[https://github.com/sheepduke][YUE Daian]].)
+ Option =org-super-agenda-header-properties=. It sets =org-agenda-structural-header= by default, which enables navigating to headers with the default =M-{= / =M-}= bindings in agenda buffers. (Thanks to [[https://github.com/haji-ali][Abdul-Lateef Haji-Ali]].)

*Changed*
+ Group headers face is now appended to face list instead of overriding it.
Expand Down
8 changes: 7 additions & 1 deletion org-super-agenda.el
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ to fill window width, and a newline is added."
See `format-time-string'."
:type 'string)

(defcustom org-super-agenda-header-properties
'(face org-super-agenda-header
org-agenda-structural-header t)
"Text properties added to group headers."
:type 'plist)

;;;; Faces

(defface org-super-agenda-header '((t (:inherit org-agenda-structure)))
Expand Down Expand Up @@ -272,7 +278,7 @@ face `org-super-agenda-header' appended, and the text properties
(string org-super-agenda-header-separator))))
(setq s (concat " " s))
(add-face-text-property 0 (length s) 'org-super-agenda-header t s)
(org-add-props s nil
(org-add-props s org-super-agenda-header-properties
'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
Expand Down
24 changes: 14 additions & 10 deletions org-super-agenda.info
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@ File: README.info, Node: 12-pre, Next: 111, Up: Changelog
• Option org-super-agenda-header-separator may also be a character,
which is automatically repeated to the window width. (Thanks to
YUE Daian (https://github.com/sheepduke).)
• Option org-super-agenda-header-properties. It sets
org-agenda-structural-header by default, which enables navigating
to headers with the default M-{ / M-} bindings in agenda buffers.
(Thanks to Abdul-Lateef Haji-Ali (https://github.com/haji-ali).)

*Changed*
• Group headers face is now appended to face list instead of
Expand Down Expand Up @@ -702,16 +706,16 @@ Node: Normal selectors12933
Node: Tips17564
Node: Changelog18415
Node: 12-pre18640
Node: 11120349
Node: 1120522
Node: 10322094
Node: 10222305
Node: 10122439
Node: 10022777
Node: Development22882
Node: Bugs23284
Node: Tests23937
Node: Credits24256
Node: 11120620
Node: 1120793
Node: 10322365
Node: 10222576
Node: 10122710
Node: 10023048
Node: Development23153
Node: Bugs23555
Node: Tests24208
Node: Credits24527

End Tag Table

Expand Down

0 comments on commit 75a664e

Please sign in to comment.