all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Built a list of Org-mode files with Org-ql
@ 2024-07-17  1:57 Sébastien Gendre
  2024-07-17 15:09 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Sébastien Gendre @ 2024-07-17  1:57 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

Hello,

I try to do something with Org-mode and Org-ql[1], but don't know if
it's possible.

I have a directory with a few Org-mode files in it. And inside another
Org-mode file, I try to generate a table that list all the Org-mode
files of this directory.

Each Org-mode file of this directory have a "#+TITLE", a "#+DATE" and a
"#+KEYWORDS" buffer setting, and I would to use them as column in the
created table. And to sort this table by the "#+DATE" field.

I have looked into Org-ql dynamic bloc [2] to do that. Org-ql is an
amazing package, I love it. But, from what I understand, it only work
for searching Org-mode headings, not for searching Org-mode files like I
try to do.

Any one have an idea or a suggestion ?


Footnotes:

[1] https://github.com/alphapapa/org-ql
[2] https://github.com/alphapapa/org-ql?tab=readme-ov-file#dynamic-block




Best regards

-------
Gendre Sébastien

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Built a list of Org-mode files with Org-ql
  2024-07-17  1:57 Built a list of Org-mode files with Org-ql Sébastien Gendre
@ 2024-07-17 15:09 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-07-17 15:09 UTC (permalink / raw)
  To: Sébastien Gendre; +Cc: emacs-orgmode@gnu.org

Sébastien Gendre <seb@k-7.ch> writes:

> I have a directory with a few Org-mode files in it. And inside another
> Org-mode file, I try to generate a table that list all the Org-mode
> files of this directory.
>
> Each Org-mode file of this directory have a "#+TITLE", a "#+DATE" and a
> "#+KEYWORDS" buffer setting, and I would to use them as column in the
> created table. And to sort this table by the "#+DATE" field.

> I have looked into Org-ql dynamic bloc [2] to do that. Org-ql is an
> amazing package, I love it. But, from what I understand, it only work
> for searching Org-mode headings, not for searching Org-mode files like I
> try to do.

You are right. Org-ql only searches headings.

> Any one have an idea or a suggestion ?

You need to write Elisp to loop over files in the directory, open them,
and then query Org mode for TITLE, DATE, and KEYWORDS.
You can do it using `org-collect-keywords'.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-17 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17  1:57 Built a list of Org-mode files with Org-ql Sébastien Gendre
2024-07-17 15:09 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.