SUMMARY Files opened from a shell (kate.foo.txt) do not appear in "Open Recent". There's only files opened from inside Kate via file dialog. Sicne I hardly ever open files that way, but usually frrom a shell, those files are never in that list. STEPS TO REPRODUCE 1. in a shell kate foo.txt 2. close kate 3. reopen kate 4. File -> Open Recent: foo.txt is missing OBSERVED RESULT file not listed EXPECTED RESULT file listed SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian/Sid (available in About System) KDE Plasma Version: 5.17.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.12.5 ADDITIONAL INFORMATION
Yeah, Kate, could add such documents to the global list of recently opened documents. I do the same thing FWIW.
Hmm, I tried that with a current Kate version: kate xxxx.txt close reopen => xxxx.txt is in open recent (current kate 20.04 version) Nate, can you reproduce the issue?
This is to be expected. Kate needs to call KActivity API to notify opening files from command line (this is done through KFileWidgets/KDocumentRecent when using open/save dialogs). Look at gwenview code as an example : https://github.com/KDE/gwenview/commit/2a5ffe66e1def52f5044aebcf4b6e46392f4f2cc https://github.com/KDE/gwenview/commit/a00eecc78507f48843f719f32e80ae8805a34c15
Are we talking about different things? I thought this request was about the "File -> Open Recent" menu in the application. But this is about some global one?
Yes you are write those are two different things. I missed this was about kate own open recent menu. You would need to use KRecentDocument to save it to the Open Recent menu (what KFileWidgets uses), when opening files from the commandline. Once this is done, Activitymanagerd will it pickup and this history will be available whenever recent files are fetched from KActivity (Kickoff, recentlyused:/, soon krunner, taskmanager).
Git commit c4b20b89954560a8abf1f49024d74a8559128851 by Christoph Cullmann. Committed on 12/06/2020 at 19:02. Pushed by cullmann into branch 'master'. register files not only at recently opened files menu but globally, too M +15 -0 kate/katemainwindow.cpp M +5 -4 kate/katemainwindow.h M +4 -12 kate/kateviewmanager.cpp https://invent.kde.org/utilities/kate/commit/c4b20b89954560a8abf1f49024d74a8559128851