zk
zk copied to clipboard
Fix zk-index--current-id-list mis-matching zk-id-regexp
This way, the function only matches zk-id-regexp at the beginning of each line rather than anywhere. While with the default zk-id-regexp it is unlikely that a file title will include something resembling the id, once customized there is a potential for a difficult to trace bug.
For example, my zk-id-regexp is much shorter, "[a-z]-[0-9]\\{4\\}", so zk-index--curent-id-list mis-matched against title containing "since mid-2000s," which introduced a nil into the ID list that then impacted sorting by size since #'< signaled an error comparing a number against nil.
This only works if the zk-id is at the front of the string output by zk-index-format-function, which by default it is not. Have you changed zk-index-format to put the ids at the beginning of the string?
Oh, oops, I forgot I changed that. Let me work on this a little more.
Any progress here?