Bug 159277 - It would be nice to have an exclude file type option from Recent Files.
Summary: It would be nice to have an exclude file type option from Recent Files.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: easyHack, needsDevAdvice
Depends on:
Blocks: Recent-Document-List DoAsMacro
  Show dependency treegraph
 
Reported: 2024-01-19 01:03 UTC by Ian Eales
Modified: 2024-02-14 17:26 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Macro that removes CSV entries from "Recent Documents" (16.57 KB, application/vnd.oasis.opendocument.text)
2024-02-02 19:39 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Eales 2024-01-19 01:03:50 UTC
If one works with a bunch of .csv files, they get added to the Recent list, clearing all the actual LO files.

Usually when importing a csv, tab or txt file, it's intermediate data to be analyzed or formatted in an Office app.
Comment 1 Heiko Tietze 2024-01-19 09:17:10 UTC
Management of MRU is done in the start center. You can remove items or filter by module. Beyond that I think any interaction would be clumsy. => WF

Btw, the MRU menu shows only module-specific items now by default. See bug 159120.
Comment 2 Ian Eales 2024-01-19 15:40:24 UTC
AFAICF, the only Start Center option is to clear the list.

See https://help.libreoffice.org/7.1/en-US/text/shared/guide/startcenter.html

We can't access the Start Center - another issue - with any LO files open.

When importing more than 25 .csv files, unless we exit ALL LO modules to individually clear each .csv as processed, ALL MRU files in the Start Center are useless intermediate data files.

K L U M S Y !!
Comment 3 Heiko Tietze 2024-01-22 10:31:44 UTC
(In reply to Ian Eales from comment #2)
> AFAICF, the only Start Center option is to clear the list.
You can filter by module. Or remove all files that are temporarily unavailable.

You may import a bunch of CSV files but what if a user chose to save in this format? It is a valid file format and should be shown.

I cannot imagine an usable and appealing way to filter out some file types from the MRU. The solution would be some string in the expert settings, and if you can deal with this it shouldn't be much of a problem to create an extension that parses the MRU list and removes the items.

Setting to WF, feel free to reopen.
Comment 4 Ian Eales 2024-01-22 14:38:32 UTC
A simple option ExcludeFileTypes  in the Config org.openoffice.Office.Histories

Quite frankly the MRU is quite brain dead for people who work with hundreds of files because a file maybe opened for reference and display an actively edited file.

MRE - Most Recently Edited - would be far more useful.
Comment 5 Heiko Tietze 2024-01-22 14:58:05 UTC
(In reply to Ian Eales from comment #4)
> A simple option ExcludeFileTypes  in the Config
> org.openoffice.Office.Histories

How do you suggest to handle multiple file types like *.csv and *.xml?

> MRE - Most Recently Edited - would be far more useful.
Disappearing after some days (unless made sticky)? Sounds interesting though wont solve your problem.

I'm still in favor of an extension.
Comment 6 Ian Eales 2024-01-22 15:02:35 UTC
a simple config string:  csv;xml;tab; PER LO application
Comment 7 jan d 2024-01-24 14:30:39 UTC
Would also "Won’t Fix" this: Recently opened is a simple and established paradigm: It it opened, it gets pushed to the list. I see it as a optional shortcut that can sometimes prevent opening the file picker and otherwise be ignored.
Comment 8 Ian Eales 2024-01-24 17:41:33 UTC
Stone tablets were once a simple and established paradigm
Comment 9 Heiko Tietze 2024-02-01 07:30:03 UTC
We discussed the topic in the design meeting.

While this could be a nice example for a macro because the use case is not so common, the majority agrees with the need and suggest to implement the filter.

It would be a string in the expert options that allows to filter the MRU list.

Could be an interesting easyhack.
Comment 10 Ian Eales 2024-02-01 16:29:07 UTC
Thank-you !!
Comment 11 Rafael Lima 2024-02-02 19:39:25 UTC
Created attachment 192360 [details]
Macro that removes CSV entries from "Recent Documents"

This document contains a macro that removes CSV entries from the "Recent Documents" list.

The macro is named RemoveFromRecentList and is embedded in this document. You can tinker with it to remove any extensions as you like (see my comments in the code).
Comment 12 Ian Eales 2024-02-05 00:02:31 UTC
Thanks, but I could have done this.

To make it useful, I'd have to put it in every file I import data to...

... and remember to run it.

I typically select a lot of .csv files, open them, select and import data to where I need it and close the .csv file, so I'm not sure this would help in any case.
Comment 13 Heiko Tietze 2024-02-05 12:23:15 UTC
(In reply to Ian Eales from comment #12)
> To make it useful, I'd have to put it in every file I import data to...
How about adding it to a template and making it the default for new documents? And run the macro on start.
Comment 14 Ian Eales 2024-02-05 15:04:37 UTC
I add .csv file data to existing documents.

.csv are defaulted to LO Calc and open there on selection. Data is then moved to existing workbooks.

To do as proposed, I'd then have to insert the macro into existing files, some of which are a decade old, then run the macro after data move.

Seems like there would be less code and work involved to alter the LO 'Add to Recent' code to read a config string to ignore file types.

Were I still actively programming, I'd look at the source, but alas I'm retired and just maintain files for non-profits.
Comment 15 Ian Eales 2024-02-13 14:26:34 UTC
Missing functionality on the Recent Files list vis a vis the soffice.exe pick window:

There should be a Right Click option to Remove File from List. At present there is only Open. If a file is renamed, the old name persists until it falls off the bottom
Comment 16 Rafael Lima 2024-02-14 13:07:32 UTC
(In reply to Ian Eales from comment #12)
> Thanks, but I could have done this.
> 
> To make it useful, I'd have to put it in every file I import data to...

The idea is to run this macro every time LibreOffice starts.

For that, copy the macro from the document into a user module. Then configure LO to run the macro every time it starts.

To do that:
1) Go to Tools - Customize and choose the Events tab
2) Click the Start Application event and then the "Macro" button
3) Choose the macro from the dialog
4) Make sure the "Save in" option is set to "LibreOffice", so that it becomes an application-level option

There you have it... every time LO opens, the entries will be removed automatically.
Comment 17 Ian Eales 2024-02-14 15:37:43 UTC
You're still missing the point.

I often have one or more LO file open for several days and load many others [some via automation] during that time - many of which will be intermediary data files [csv;tab;txt...]

By the time LO is shut down, the Recent Files list is next to useless.

IF SOffice.exe didn't disappear OR we could remove files at will from File->Recent Documents, the issue would be moot.
Comment 18 V Stuart Foote 2024-02-14 16:05:16 UTC
The MRU list is held in the LibreOffice user profile in the XML text file 'registrysettings.xcu' simple to edit/filter directly.

And, some movement to cut the recent document history out of the XCU and place into a directory of its own in profile, see also bug 99716  
And that might open additional means of sorting and pruning the MRU of specific file types/content.
Comment 19 Rafael Lima 2024-02-14 16:21:19 UTC
(In reply to Ian Eales from comment #17)
> I often have one or more LO file open for several days and load many others
> [some via automation] during that time - many of which will be intermediary
> data files [csv;tab;txt...]

You could use other events such as "Open Document" or "Activate Document" to run this macro every time you either open or activate a document. This should suffice.
Comment 20 Ian Eales 2024-02-14 17:18:37 UTC
(In reply to V Stuart Foote from comment #18)
> The MRU list is held in the LibreOffice user profile in the XML text file
> 'registrysettings.xcu' simple to edit/filter directly.
> 
> And, some movement to cut the recent document history out of the XCU and
> place into a directory of its own in profile, see also bug 99716  
> And that might open additional means of sorting and pruning the MRU of
> specific file types/content.

I opened 'registrysettings.xcu' in Notepad++ and navigated through a few open windows <<making no changes> and when I came back, the .xcu had changed, so editing that in real time does not seem to be a reasonable option.
Comment 21 Ian Eales 2024-02-14 17:26:39 UTC
(In reply to Rafael Lima from comment #19)
> (In reply to Ian Eales from comment #17)
> > I often have one or more LO file open for several days and load many others
> > [some via automation] during that time - many of which will be intermediary
> > data files [csv;tab;txt...]
> 
> You could use other events such as "Open Document" or "Activate Document" to
> run this macro every time you either open or activate a document. This
> should suffice.

This is then machine specific. I use a desktop and two laptops. I'll never recover the time I spent in my career fixing bugs introduced by version updates of Office, Windows, SQL Server, Visual Studio, etc.

Thanks...