2

I do not want TODO states ("TODO, DONE") and priorities ("[#A]") for tasks to be displayed in one of my custom agenda views. I have not been able to find any settings that would accomplish this. Is there any way this can be achieved?

Ideally, I would like to be able to toggle the visibility of TODO states and priorities separately.

  • I want that too. I resorted to using 2charater TODO keywords (TD, DN) and I use gray faces and a smaller font for todo keywords and priorities, so they are less obtrusive. – Martin Drautzburg 19 hours ago
0

You could postprocess org-agenda-format-item and add your own trimming function. Here is an example that removes my(!) todo keywords and strips the priority down to just one letter:

(defun myTrim (s)
    ; remove todo keyword and trimp priorities to just one letter
    (replace-regexp-in-string
     "[]#[]" "" 
     (replace-regexp-in-string "\\(TD\\|NX\\|WT\\|DN\\) " "" s)))

Adjust this to your needs. Then you can turn the stripping off and on by adding or removing the advice:

(advice-add 'org-agenda-format-item  :filter-return #'myTrim)
(advice-remove 'org-agenda-format-item  #'myTrim)

I am pretty sure this will break something. I lost the fontification of the priority, but you wanted to remove the priority entirely, so this won't hurt you. Sorting by priority is probably also endangered.

| improve this answer | |
New contributor
Martin Drautzburg is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

TODO states may be modified in agenda views by setting the org-agenda-todo-keyword-format variable. To hide the TODO state entirely, use the following line in a org agenda custom command:

          (org-agenda-todo-keyword-format "")

Documentation: org-agenda-todo-keyword-format is a variable defined in ‘org-agenda.el’. Format for the TODO keyword in agenda lines. Set this to something like "%-12s" if you want all TODO keywords to occupy a fixed space in the agenda display.

I have not found a way to hide priorities yet.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.