Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Make auto-outline-path separator customizable #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Every selector requires an argument, even if it's just ~t~, e.g. ~:anything~, ~:
+ ~:auto-dir-name~ :: This automatically groups items by the directory name of their source buffer.
+ =:auto-group= :: This selects items that have the =agenda-group= Org property set. By setting this property for a subtree, every item in it will be sorted into an agenda group by that name and placed into the agenda where the ~:auto-group~ selector is ([[examples.org#automatically-by-group][example]]).
+ ~:auto-map~ :: This automatically groups items by the value returned when applying each item to the given function as a string from the agenda buffer ([[examples.org#automatically-by-mapping-a-function][example]]). The function should return a string to be used as the grouping key and as the header for its group.
+ =:auto-outline-path= :: This automatically groups items by their outline path hierarchy, like =Plans/Take over the universe/Take over the moon=.
+ =:auto-outline-path= :: This automatically groups items by their outline path hierarchy, like =Plans/Take over the universe/Take over the moon=. The outline path separator is defined by =org-super-agenda-auto-outline-path-separator= (default is "/").
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Two spaces between sentences, please.

+ ~:auto-parent~ :: This automatically groups items by their parent heading. This is surprisingly handy, especially if you group tasks hierarchically by project and use agenda restrictions to limit the agenda to a subtree.
+ =:auto-planning= :: This automatically groups items by their earliest of scheduled date or deadline, formatted according to variable ~org-super-agenda-date-format~.
+ =:auto-priority= :: This automatically groups items by their priority.
Expand Down
3 changes: 2 additions & 1 deletion org-super-agenda.el
Original file line number Diff line number Diff line change
Expand Up @@ -980,9 +980,10 @@ of the arguments to the function."
(directory-name (->> file-path file-name-directory directory-file-name file-name-nondirectory)))
(concat "Directory: " directory-name)))

(setq org-super-agenda-auto-outline-path-separator "/")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a defcustom.

(org-super-agenda--def-auto-group outline-path "their outline paths"
:key-form (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
(s-join "/" (org-get-outline-path))))
(s-join org-super-agenda-auto-outline-path-separator (org-get-outline-path))))

(org-super-agenda--def-auto-group parent "their parent heading"
:key-form (org-super-agenda--when-with-marker-buffer (org-super-agenda--get-marker item)
Expand Down