We still need to actually look inside the contents of date-based directories.
FJQM2HAOV7J5263GOEBH4Y55Q2WGKU6ZE5AQ7MMLFHWYAYUP7INQC D7D6T2F3FRMONF627F2NV227T5KTZ4FOHZKROEIIA236U7FVASTQC B22JHH4W75CLJTHZWAHJZWYL3L7IN4MSIJSR5CCCCXYWYA27TRNQC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC HCLCAFHPRUDGNFOYXKNHME2ELQKSXUTN3E4NV3PT4DGG2VJV7KOAC 3JDTNKUEWV3V2ABWCOAR4I5LHY3R4MARCFAAQ3KEYGKYHQOXCC2QC GQBUV2XOMEPMTXMPCBQWGGIUXGQDX77VTGPFIG6YT7G64ASOYHXQC YKRUNSPXQMYUZM2HC2BWRL3OLVF5X3Y3XASG7JCT4TW4VUHZD6ZAC 7JAODGVLU6GEMEJTJL34QMYOCKWPFX22A4UH5SLSDGSIVIRETO7QC 46WQF4LQNK54PSZNQLZNYVSDRZU4STNLIGCB4Y7SDWTWQ7ZY7LBQC KWPSFOB3BZAJLQZRULNJW7AQK355ZOGN7AREZMMIEBEMY7R5JQMAC local search_term = string.match(column.name, 'search: (.+)')-- TODO
--? print('column name', column.name)local search_all_term = string.match(column.name, 'search: (.+)')--? print('search term', search_all_term)populate_search_all_column(column, search_all_term)
function resume_search_all()-- make a little more progress towards searching the whole diskif Display_settings.search_all_state == nil thenDisplay_settings.search_all_progress_indicator = 'initialized top-level files'Display_settings.search_all_state = {top_level_files = love.filesystem.getDirectoryItems(Directory),top_level_file_index = 1,}elseif Display_settings.search_all_state.top_level_file_index thenlocal current_filename = Display_settings.search_all_state.top_level_files[Display_settings.search_all_state.top_level_file_index]Display_settings.search_all_progress_indicator = current_filenamelocal info = love.filesystem.getInfo(Directory..current_filename)if info.type == 'file' then--? print('searching '..current_filename..' for '..Display_settings.search_all_term)local contents = love.filesystem.read(Directory..current_filename)local index = contents:find(Display_settings.search_all_term)if index thenlocal id = id_for_search_all_pane(Display_settings.search_all_term)local snippet = contents:sub(math.max(1, index-100), math.min(#contents, index+100))local outfilename = Directory..idlocal success, errmsg = love.filesystem.append(outfilename, '[['..current_filename..']]\t')if not success then error(errmsg) endlocal success, errmsg = love.filesystem.append(outfilename, '...'..snippet..'...\n\n')if not success then error(errmsg) endload_from_disk(Cache[id])Display_settings.search_all_pane.lines = Cache[id].linesText.redraw_all(Display_settings.search_all_pane)endendDisplay_settings.search_all_state.top_level_file_index = Display_settings.search_all_state.top_level_file_index+1if Display_settings.search_all_state.top_level_file_index > #Display_settings.search_all_state.top_level_files thenDisplay_settings.search_all_state.top_level_file_index = nilDisplay_settings.search_all_state.top_level_files = nilDisplay_settings.search_all_state.time = os.time()Display_settings.search_all_state.year = os.date('%Y', Display_settings.search_all_state.time)Display_settings.search_all_state.date = os.date('%Y/%m/%d/', Display_settings.search_all_state.time)endelseif Display_settings.search_all_state.date then-- search one day's directory per frame-- stop when a whole year is missingDisplay_settings.search_all_progress_indicator = Display_settings.search_all_state.datelocal old_year = Display_settings.search_all_state.yearlocal date_dir = Directory..Display_settings.search_all_state.datelocal info = love.filesystem.getInfo(date_dir)if info thenif info.type == 'directory' thenlocal files = love.filesystem.getDirectoryItems(date_dir)for _,file in ipairs(files) doprint(date_dir..file)endendendDisplay_settings.search_all_state.time = Display_settings.search_all_state.time - 24*60*60Display_settings.search_all_state.year = os.date('%Y', Display_settings.search_all_state.time)Display_settings.search_all_state.date = os.date('%Y/%m/%d/', Display_settings.search_all_state.time)if old_year ~= Display_settings.search_all_state.year thenlocal previous_year_info = love.filesystem.getInfo(Directory..Display_settings.search_all_state.year)if previous_year_info == nil thenDisplay_settings.search_all_state = nilDisplay_settings.mode = 'normal'endendelseassert(false, 'error in search state machine')endendfunction interrupt_search_all()if Display_settings.search_all_state thenlocal id = id_for_search_all_pane(Display_settings.search_all_term)local outfilename = Directory..idlocal success, errmsg = love.filesystem.append(outfilename, 'interrupted at '..Display_settings.search_all_state.date..'\n')if not success then error(errmsg) endload_from_disk(Cache[id])Display_settings.search_all_pane.lines = Cache[id].linesText.redraw_all(Display_settings.search_all_pane)endDisplay_settings.search_all_state = nilDisplay_settings.mode = 'normal'endfunction populate_search_all_column(column, search_all_term)local id = id_for_search_all_pane(search_all_term)table.insert(column, load_pane(id))end