2

My .org file is almost 2MB large. How can I narrow down what headers/sub-headers take so much space?

2
  • 1
    In case it's due to many lines of content, then a really trivial approach is to enable display-line-numbers-mode with only the headings visible, and look for a really big jump. Then expand/repeat as necessary to drill down. To check actual character counts, you may need to write some code -- more or less just checking how much (point) changed between each heading, and maybe showing that as a proportion of (point-max).
    – phils
    Apr 1, 2020 at 0:14
  • @jagrg Post as answer please
    – jjk
    Apr 27, 2020 at 6:58

2 Answers 2

2

See org-treeusage.el. It was added recently to the MELPA archive.

This library provides a minor mode for peeking at the line or character usage of each heading in an org-mode file with respect to the parent heading, allowing users with large org files to see the distribution of heading content and make informed decisions on where to prune, refile, or archive.

0

You can use the Python script org-du to produce line counts per section, using the same format as the du command line tool. This can then be piped to xdu for a graphical display.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.