Skip to content

Commit

Permalink
Fix: Don't show blank lines for disabled headers
Browse files Browse the repository at this point in the history
i.e. with ":name none" and org-super-agenda-header-separator set to an
empty string.

Fixes alphapapa#105. Thanks to Florian Schrödl (@floscr).
  • Loading branch information
alphapapa committed Apr 24, 2020
1 parent b08fbb0 commit b2b5771
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ These selectors take one argument alone, or multiple arguments in a list.
*Fixed*
+ =:children todo= group selection ([[/~https://github.com/alphapapa/org-super-agenda/issues/75][#75]]). (Thanks to [[/~https://github.com/bleggett][Ben Leggett]] and [[/~https://github.com/whirm][Elric Milon]].)
+ =:children= group headings.
+ Don't show blank lines for disabled headers (i.e. with ~:name none~ and =org-super-agenda-header-separator= set to an empty string). (Fixes [[/~https://github.com/alphapapa/org-super-agenda/issues/105][#105]]. Thanks to [[/~https://github.com/floscr][Florian Schrödl]].)

*Updated*
+ Tests updated for Org 9.2.4.
Expand Down
9 changes: 5 additions & 4 deletions org-super-agenda.el
Original file line number Diff line number Diff line change
Expand Up @@ -1093,10 +1093,11 @@ actually the ORDER for the groups."

(defun org-super-agenda--filter-finalize-entries (string)
"Filter the return of `org-agenda-finalize-entries' through `org-super-agenda--finalize-entries'."
(mapconcat 'identity
(org-super-agenda--group-items
(split-string string "\n" t))
"\n"))
(--> string
(split-string it "\n" 'omit-nulls)
org-super-agenda--group-items
(-remove #'s-blank-str? it)
(s-join "\n" it)))

;;;; Footer

Expand Down
25 changes: 15 additions & 10 deletions org-super-agenda.info
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ File: README.info, Node: 12-pre, Next: 111, Up: Changelog
(Thanks to Ben Leggett (/~https://github.com/bleggett) and Elric
Milon (/~https://github.com/whirm).)
• :children group headings.
• Don’t show blank lines for disabled headers (i.e. with ‘:name
none’ and org-super-agenda-header-separator set to an empty
string). (Fixes #105
(/~https://github.com/alphapapa/org-super-agenda/issues/105). Thanks
to Florian Schrödl (/~https://github.com/floscr).)

*Updated*
• Tests updated for Org 9.2.4.
Expand Down Expand Up @@ -689,16 +694,16 @@ Node: Normal selectors12756
Node: Tips17387
Node: Changelog18238
Node: 12-pre18463
Node: 11119723
Node: 1119896
Node: 10321468
Node: 10221679
Node: 10121813
Node: 10022151
Node: Development22256
Node: Bugs22658
Node: Tests23311
Node: Credits23630
Node: 11120019
Node: 1120192
Node: 10321764
Node: 10221975
Node: 10122109
Node: 10022447
Node: Development22552
Node: Bugs22954
Node: Tests23607
Node: Credits23926

End Tag Table

Expand Down
2 changes: 0 additions & 2 deletions test/results.el
Original file line number Diff line number Diff line change
Expand Up @@ -1629,8 +1629,6 @@ Wednesday 5 July 2017
ambition: TODO Practice leaping tall ! :universe:ambition::personal:
" "1ddbb96d38fccc4a44677f0a2240ebe2" "Day-agenda (W27):
Wednesday 5 July 2017
test: 7:02...... Sunrise (12:04 of daylight)
8:00...... ----------------
10:00...... ----------------
Expand Down

0 comments on commit b2b5771

Please sign in to comment.