Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include #+INCLUDE'd files in wordcount #24

Open
spacekitteh opened this issue Apr 8, 2020 · 2 comments
Open

Include #+INCLUDE'd files in wordcount #24

spacekitteh opened this issue Apr 8, 2020 · 2 comments

Comments

@spacekitteh
Copy link

So I have several files with different parts of my document in them, and org-wc doesn't include their word count in its count. Is there a way to do this?

@tesujimath
Copy link
Owner

Not as it stands. There's no knowledge of included files in org-wc. Pull request welcome, if you're up for it.

@andersjohansson
Copy link
Contributor

This is also somewhat tricky, as the INCLUDE keyword can select what parts of the file to include in complex ways. It won’t work to just jump into the file, count words there, and include it.
Doing this "right" would involve doing the same steps as org-export, where the buffer is copied to a temporary buffer and INCLUDE keywords "expanded" (correct parts included and trees shifted). See org-export-as and org-export-expand-include-keyword. So we would need to make a buffer copy and run org-wc there, which presents some new problems (more complicated to put word count overlays on subtrees for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants