Bug 453691 - Feature request: list of recently closed files / restore closed tabs
Summary: Feature request: list of recently closed files / restore closed tabs
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 22.04.0
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-12 09:28 UTC by Raphaël Jakse
Modified: 2024-05-02 07:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 24.05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphaël Jakse 2022-05-12 09:28:24 UTC
SUMMARY

Kate has a recently opened files. Sometimes I close a tab inadvertently. I head over the recently opened files but the file I just closed Is not necessarily there because I could have opened a lot of files since I opened the inadvertently closed file.

- A "recently closed" menu entry would be neat. Bonus if it restores the position of the cursor, or even the full state (including undo/redo).
- Some menu entry / shortcut like CTRL+Shift+T in browsers to restore the tabs would be useful too, but that'd be icing on the cake

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220509
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.2
Comment 1 Raphaël Jakse 2022-05-15 09:19:02 UTC
I just noticed that the English label for the "recently open" menu in the "File" menu is actually "Open Recent", translated to "Récemment ouvert(s)" in French, which means "Recently open", which is more precise.

This might be an issue to implement the "Recently Closed" menu:
 - The expression "Open Recent" might as well apply to recently closed file, so this could be confusing
 - An hypothetical menu "Recently closed" item next to "Open Recent" might look weird: differently worded for similar things, not very symmetrical.

We could have "Open Recent" and "Open Recently closed" but that looks asymmetrical. (A)

We could rename "Open Recent" to "Open Recently open(ed)" (don't know which one is more correct), but that looks very redundant. (B)

We could rename "Open Recent" to "Recently open(ed)" (C), but then:
 - it is a "breaking" change
 - we lose the fact that the menu is written with a leading action verb
 - it's at odd with the nearby items beginning with "Open" -- though that never stroke me in the French version that already has this issue  

Or we could make the "Recently closed" as a submenu of "Open Recent" (D). That would make sense to me and would avoid cluttering the "File" menu. The vagueness of "Open Recent" would still allow it to be be accurate without rephrasing it. We'd have something weird in the French translation where "Recently closed" would be in the "Recently open" menu, but meh. Maybe we could rephrase this. Though the current phrasing is probably a compromise: it's just hard to translate "Open Recent" in a straightforward manner. I don't know how the English phrasing feels but in French that would be weird i guess. Recently closed files are still somewhat also recently open files anyway, so, that may work.

My preference would be (C) or (D), and probably actually (D) more than (C).

What do you think?
Does the feature make sense / is it desirable anyway?
Comment 2 Raphaël Jakse 2022-05-15 09:38:13 UTC
From reading Kate's source code, I've noticed that recently open files are updated on saving a file. Maybe updating them on closing would be good enough actually? That would allow avoiding to add a new menu entry and a whole new feature for this.
Comment 3 Lothar 2022-05-21 18:13:34 UTC
> I've noticed that recently open files are updated on saving a file. Maybe updating them on closing would be good enough actually? 

Or just both. 

> That would allow avoiding to add a new menu entry and a whole new feature for this.

That sounds good to me.

> From reading Kate's source code

Go on, submit a patch :-)

https://invent.kde.org/utilities/kate
Comment 4 Raphaël Jakse 2022-05-27 11:26:55 UTC
Done here: https://invent.kde.org/utilities/kate/-/merge_requests/750
Comment 5 Waqar Ahmed 2024-05-02 07:14:29 UTC
This is done now

https://invent.kde.org/utilities/kate/-/merge_requests/1475/diffs?commit_id=22e53dec2537e5c19b9eb707eff2c309b226f1c2

Restoring last closed document is also implemented. Search for "Reopen latest closed document" in the command bar.