Hi org community,

So the motivation is that I would like to have a propview to count diversity of nutrients, as properties, to be parsed from my diary, and I would like to use scope as a function like my/this-week:

#+BEGIN: propview :scope my/this-week :match "nutrition" (...)
#+END:

where my/this-week would be defined as:

(defun my/this-week()
  (concat "file:~/org/mydiary.org::#" (format-time-string "%Y-w%W")))

This works because every year I generate an orgmode tree file that has structure "Year > Weeks > Days" with a unique and mnemonic CUSTOM_ID related to the date. If you are curious, I manually and "regularly" archive the diary entries per year, even for the current year, to have a diary (and org-agenda-file) that is lightweight in order to have efficient processing.


I know :id exists, but this is only for :ID: properties, and I am using :CUSTOM_ID: (the reason is that I had so many links at some point that the file with the index was so huge, so I migrated to CUSTOM_ID accepting its pros and cons).

Extending the links in the way I propose, provides more flexibility for users, it would work whatever link they defined.


The proposal to extend on org-map-entries directly, is because is a well-known method used to retrieve information, the examples I know are org-kanban, propview

In the org-kanban github issue tracker I was asking for the same thing, and even with the same title [1]

I think something like this would be nice to have in core orgmode.

By the way, org-kanban maintainer solved this essentially this way [2]

Cheers,
pinmacs

[1] https://github.com/gizmomogwai/org-kanban/issues/47

[2]
    (if (functionp scope)
      (let* ((result (funcall scope)))
        (save-window-excursion (org-link-open-from-string result)
          (org-map-entries 'org-kanban//todo-info-extract match 'tree)))
      (org-map-entries 'org-kanban//todo-info-extract match scope)))

Attachment: OpenPGP_0x9D64597C3A982DCA.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to