Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Custom dashboard-agenda-prefix-format. #350

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

Merged

Conversation

ricardoricho
Copy link
Contributor

Hi, this is for #339.

In that case, for a 'LONGLONGCATEGORY' with length 16 the dashboard-agenda-prefix-format could be " %i %16c %-10s ". I hope the comments on the README file are clear enough.
Thanks.

Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

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

Some minor stuffs. Otherwise, LGTM. ;)

(defun dashboard-agenda--formatted-time ()
"Get the scheduled or dead time of an entry.
If no time is found return an empty string to be formatted."
(let* ((schedule-time (org-get-scheduled-time (point)))
Copy link
Member

Choose a reason for hiding this comment

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

I think we can use macro if-let* here.

@@ -1148,7 +1147,8 @@ if returns a point."

(defun dashboard-get-agenda ()
"Get agenda items for today or for a week from now."
(org-compile-prefix-format 'agenda)
(add-to-list 'org-agenda-prefix-format (cons 'dashboard-agenda dashboard-agenda-prefix-format))
Copy link
Member

Choose a reason for hiding this comment

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

Maybe try to avoid add-to-list and use push instead?

@jcs090218
Copy link
Member

jcs090218 commented Jan 20, 2022

Merge this for now since those aren't blocking issues. Thanks!

@jcs090218 jcs090218 merged commit 4c34f32 into emacs-dashboard:master Jan 20, 2022
@ricardoricho ricardoricho deleted the dashboard-agenda-prefix-format branch January 20, 2022 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants