2

Can you set org-mode category icon on per file basis? If so, then how?

It is usually set by adding icons to org-agenda-category-icon-alist globally, like so:

(setq org-agenda-category-icon-alist '(
    ("computer" ,(list (all-the-icons-material "computer" :height 1.0)) nil nil :ascent center)
))

Further, there is an option available to specify the category (but not the icon, which would be really nice) on per file basis, as follows (e.g., in a file called not_computer.org)[1]:

#+CATEGORY: computer

Finally, there is a way to specify file local variables, but I do not think that would help (my elisp is not sufficient to solve this)[2]:

-*- mode: modename; var: value; ... -*-
Klorax
  • 153
  • 1
  • 1
  • 6
  • It's not clear to me what you are trying to accomplish: category icons in `org-agenda-category-icon-alist` are used when displaying the agenda, so having them defined per file is just not going to work. – NickD Aug 23 '20 at 15:09
  • 1
    It would work the same way as `#+CATEGORY:`. I assume that works by checking for it when loading the agenda files and using the filename instead if not found. – Klorax Aug 23 '20 at 15:18

0 Answers0