org-randomnote icon indicating copy to clipboard operation
org-randomnote copied to clipboard

Implement uniformly-random selection of headings

Open telotortium opened this issue 6 years ago • 0 comments

In order to implement this, store association lists of file names to the header count and to the modification tick. Every 30 seconds starting from the first time org-randomnote is called, the header count is updated, but only for buffers that have changed since the last timer. The probability that a given file is selected is weighted based on the number of headers it has, so that a file with twice as many headers as another file will be selected twice as often. The selection of headers within files was already uniformly random, so no change is needed there.

Fixes #7

telotortium avatar May 09 '19 11:05 telotortium