Recent Files Menu in Kate

As many other applications Kate has the menu File > Recent Files, which lists all files you recently used. This recent file list right now is per session, i.e., each session has its own entries listed as recent files. Now there is a request to change it such that there is just one single global recent file list. I think having two recent files menus (one for the session and one global) is a bad solution. Further, adding an option for that also sounds wrong.

To change or not to change, that’s the question?! :) What do you think?

27 thoughts on “Recent Files Menu in Kate”

  1. Would it be possible to have a single, global recent files list, but displayed/listed grouped by sessions? Like

    File -> Open Recent ->

    [Default Session]
    File 1
    File 2
    [Saved Session1]
    File 3
    File 4
    [Saved Session2]
    File1

    And so on.

  2. What about keeping the “Open Recent” menu as it is, but add a sub-menu “From Other Sessions” to the end of it?

    I kinda like the per-session separation, but I’ve also repeatedly experienced the somewhat frustration situation of trying to open a recently used file, but being presented an empty “Open Recent” menu (because, for example, the Kate instance was opened from an external program with a specific file as argument, which resulted in a new session…)

  3. solution 1: global recent files
    + standard behavior (just like in all KDE applications)
    + easy to implement
    - might show files in a session that are totally unrelated

    solution 2: grouping for sessions
    + similar to global recent files, but kind of grouped (either directly in the menu or through submenus. although: you usually don’t want subsubmenus)
    - does not scale for many sessions
    - more complex to use?! (think of KISS = keep it simple stupid)
    - complex to implement (always think about maintaining the code)

    solution 3: keep recent files per session
    - some users miss entries from other sessions (obviously not optimal)
    + easy to implement

    My conclusion so far is still solution 1: simplicity in implementation and usage

  4. I never used sessions in Kate so the list is always empty. Please use solution 1 or 2 but change the current behaviour.

  5. I use kate daily for work (for many years now).
    I’m writing code, scripts, markup, tech documentation etc.
    For me solution 1 is the favorite.

  6. This is also related to at least one other bug about plugin loading, which is also very annoying and I believe was recently fixed in some way. Really it leads to a problem of how Kate handles sessions. It at the same time shoves them down your throat and makes them nonobvious to use. I’ve never used named sessions in Kate, even though I have several sets of documents open regularly. TBH I just noticed the session menu now. OTOH, several features like the recent files and plugins expect you to be using sessions by default. I think the default behavior should be to behave sanely as a text editor, and have session saving be an additional feature that’s easily accessed but you are not forced to use.

    KDevelop does session handling well for an IDE. It may be a good thing to look at to make sessions more obvious, but it is not a good example for a text editor because it forces their use.

    some thoughts:
    - Popup to choose a session every time you start the editor (kate used to have this) — BAD
    - Top level menu that lists your sessions (like KDevelop) — good
    - Categorized open recent list as in a previous comment — good idea, may not scale to several sessions
    - Restore the correct session when KDE restores Kate on login (I think this is a bug)

  7. I need the per-session list. I open a lot of files in kate for a lot of different reasons. If it listed all my recent files the recent file list would become totally unusable for me. Per-session recent files is one of the reasons I use kate in the first place. Kate is a session-based text editor. If someone doesn’t like that, they can easily set it to always open in the same session, which will also give them a single recent file list.

    So I don’t see what the problem is. So I don’t see what the problem is. If you don’t use sessions, then turn them off, and you get a single recent file list. If people don’t like sessions, I think the solution should be to make it easier to set kate to use a single session, rather than eliminating features of the sessions themselves.

    Currently you are lumping together people who don’t use sessions (who of course want just one recent file list) with people who do use sessions. So the real question is: does anyone make extensive use of sessions AND want a global recent file list? If not then the problem is with the session handling, not the recent file list.

    1. To extend that, look at what smls and uniq are saying. To me, what they say isn’t an argument for a single recent file list, it is an argument to improve how kate handles sessions. Someone who doesn’t use sessions should not be forced to. It should be easy to set kate to a single-session mode. Similarly, it should be easy to set kate to, by default, open files from another program in a default session instead of in its own session. So it is important to look at whether the problem is really with the recent file list or whether it is with sessions themselves.

      1. In my opinion TheBlackCat is spot on. Personally, I don’t use sessions so I would expect only a global recent files menu. On the other hand, why would someone who uses sessions want to acess files from other sessions?

        As he said, problem is in session handling, not the recent file list.

        1. Yes, that’s fixed in the current version that will become KDE 4.6. So you do have a global recent files if you don’t use a session.

          1. > What about if you open a file from another program?

            Then Kate reads all settings from katerc now (which is treated as unnamed session). So all plugins are there and the file is merged into the recent files for all unnamed session (global recent files, if you want).

  8. From what I’m reading so far, I’m not sure there is a *correct* answer.

    If you want to know what is good usability then you have to define your use cases and design from there and then test/verify.

    Do we have use cases defined?

    1. Two use cases:

      1. Users not using sessions
      No sessions are use at all. The default katerc session is always loaded as of KDE 4.6, which includes a recent files menu, that lists all files. Nothing is left out here (read: global recent files).

      2. Users using sessions (and maybe sometimes unnamed sessions)
      Here, the recent files menu is per session.

      This blog entry is meant for the users in (2) :)

  9. I would recommend a variation on the first suggestion:
    Like above, I would suggest having a split menu. I, however, would suggest only two divisions rather than n divisions – ‘Current Session’ and ‘Global’. That said, I suggest this only as a solution that might please all parties, not because I’m anxious for it. I’ve toyed with sessions but don’t really use them.

    1. I suggest keeping the per session recent file list. But let “no session” count as a session.
      So the only difference is that files opened while not using a session are added to the “no session” list and are only viewable when the user isn’t using a session.

      So if you don’t use sessions, you’ll get the normal behavior of most text editors. And if you use sessions, you’ll get a per session list.

  10. Great to have new features in kate. Congratulations haumann.
    I use kate every day for develop (php, html, …)

    I’m suffering next bug, its not about kate itself, its about konqueror->kate or dolphin-> kate when i try to edit remote ftp files.
    https://bugs.kde.org/show_bug.cgi?id=230039
    I would like to be fixed soon. I’m suffering that bug from begins of kde 4.

  11. “Recent files” is already an extra “hack” that doesn’t add any real functionality. To add an option, double that or to add more “Recent files” into “Recent files” seems like clutter. While I can see it being useful for some, like any feature, the question is if what a few gain won’t make it worse for many others by cluttering the interface. I think it makes most sense per session, but whatever decision is made, I don’t think Kate needs more menu entries.

    1. I agree, will probably simply keep it as it is, i.e. recent files per session, but fixed for unnamed sessions (i.e. persistent/global for unnamed)

Leave a Reply