alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
GNU General Public License v3.0
1.35k stars 107 forks source link

Default priority not taken into account #133

Open firmart opened 4 years ago

firmart commented 4 years ago

I just observed that the selectors :priority, :priority<= etc. don't take into account the default priority, e.g. when no priority is given, the item has priority org-default-priority which the default value is 66 that is [#B].

firmart commented 4 years ago

That's a bit annoying because I have the following groups :

        (:name "TODAY NEXT STEP"
           :and (:priority "A" :todo "NEXT"))
        (:name "TODAY LATER"
           :and (:priority<= "B" :todo "NEXT"))

And I expected that these two groups cover all NEXT items, but it's not the case for items without priority attributed. Anyway, awesome package!

alphapapa commented 4 years ago

This is basically by design. When I use :priority "B", I want items that I've actually set priority B on, not items without a set priority. I don't think it's very useful, in most cases, for items without a defined priority to be equivalent to priority B, because then what's the point of having an explicit priority B?

Org adjusts the numeric priority based on some other factors, but the adjustment is mostly opaque to users, which limits its usefulness. AFAIK that adjustment of hidden, numeric priority is for the sake of sorting, and it's sort of an elegant hack, but I think that kind of sorting can, and probably should, be accomplished without "magic" like hidden numeric priorities.

And IME, most Org users don't even know that such hidden, numeric priorities exist, so if the :priority selectors were based on them, I'd probably get a lot of questions like "Why does :priority "B" show items that don't have a set priority?" It wouldn't be intuitive.

So, if you really want selectors that use numeric priority, you could define some custom selectors that use them. It wouldn't require much code. See https://github.com/alphapapa/org-super-agenda/blob/3bb3ad1f5f4c9a3840c7eba226fa76b14bf9f69e/org-super-agenda.el#L706

firmart commented 4 years ago

Thank you for your answer! I'll make my own selector then.

alphapapa commented 4 years ago

Ok. Please share them when you get them working. It might be worth adding them as additional selectors for users who prefer the numeric priority.

max6166 commented 3 years ago

Just giving my own use case for posterity's sake. I find it much easier to identify item's with non-default priorities if the default priority is not explicitly shown. The priority information stands out more if it is only displayed when it differs from the norm.

I have tried differentiating priorities with different faces and colours, but the clutter still causes me problems.

This may be due to my disability, but I would imagine this configuration would appeal to many other people too. Just as I understand that your preference works best for you.

I understand the option is not being added. Just adding another perspective. ;)

alphapapa commented 3 years ago

Just giving my own use case for posterity's sake. I find it much easier to identify item's with non-default priorities if the default priority is not explicitly shown. The priority information stands out more if it is only displayed when it differs from the norm.

Sorry, I don't understand what you mean.

I understand the option is not being added. Just adding another perspective. ;)

I don't plan to change how the existing :priority selectors work, but if someone wants to contribute some alternative ones that work with numeric and default priorities, I'm not opposed to adding them.

I didn't close this issue myself, but since there is at least some interest in the feature, I'll leave it open.

max6166 commented 3 years ago

Let's say my priorities are: A = high, B = default, and C = low.

I set org-priority-default to B, and only manually set an item's priority when it is A or C.

This results in only priorities A and C being displayed in agenda view. The priority column for B items is simply empty.

I find it much easier to identify non-default priority items (A/high and C/low) in the agenda with this method.

If I explicitly set the priority for default (B) items as well, the agenda's priority column will be fully populated. I find it much more difficult to discern which letters are not "B", versus which priorities are simply not blank.

Hope I explained it better.

alphapapa commented 3 years ago

If I explicitly set the priority for default (B) items as well, the agenda's priority column will be fully populated. I find it much more difficult to discern which letters are not "B", versus which priorities are simply not blank.

I understand now, thanks.

I'd suggest looking into the various packages to customize the appearance of priority cookies. With the power of Emacs and Unicode, you can make them visually stand out however you like.