Menu

#614 Proliferation of Untitled buffers and files

None
closed-accepted
None
5
2018-01-05
2017-12-03
Makarius
No

This is jEdit trunk (version 24787) on Linux with Java 9.0.1.

My general impression is that Untitled files now put themselves in front to often. E.g. when opening jEdit with proper file arguments, there is still an additional Untitled buffer.

Moreover, Untitled buffers show up in the list of Recent Files, which looks a bit odd.

Discussion

  • Alan Ezust

    Alan Ezust - 2017-12-03

    I do not see Untitled buffers showing up in my list of recent files.

    I also don't understand what you mean by "put themselves in front too often".
    Under what circumstances (other than creating the untitled buffer or switching to it on purpose) causes the untitled buffer to put itself "in front"?

     
  • Makarius

    Makarius - 2017-12-07

    I have made some further experiments with r24791 and found a very confusing situation.

    • A fresh start with empty settings directory works. The Untitled-1 buffer shows up in $JEDIT_SETTINGS/backups and Console/BeanShell says buffer.isUntitled() = true.

    • Playing around a bit longer, with many restarts of jEdit, the persistent state eventually changes into a situation where Untitled-X buffers have buffer.isUntitled() = false, e.g. the one opened on startup without args. Consequently, such buffers eventually also show up in the recent files list.

    The details are unclear, i.e. I presently can't say which properties, perspective.xml entries etc. are relevant for that.

     
  • Makarius

    Makarius - 2017-12-07

    This is how to reproduce the problem with jEdit trunk r24793 (on Ubuntu Linux 16.04 and Java 9.0.1 or 8u152):

    • start with empty settings directory: jedit -settings=$HOME/.jedit-test
    • the Untitled-1 buffer isUntitled()
    • disable Global Options / Saving & Backup / Autosave untitled buffers (i.e. autosaveUntitled=false)
    • restart jEdit: now the Untitled-1 buffer !isUntitled(), e.g. F5 (reload) will crash
     
  • Hrotkó Gábor

    Hrotkó Gábor - 2017-12-23

    Hi!

    I have a patch for this.
    My modification is about to save the untitled buffer to the perspective.xml regardless the settings of the 'Autosave untitled buffers' setting.
    Please test!

    Roti

     
  • Alan Ezust

    Alan Ezust - 2017-12-29

    Ticket moved from /p/jedit/bugs/4056/

     
  • Alan Ezust

    Alan Ezust - 2017-12-29
    • assigned_to: Alan Ezust
    • Group: minor bug -->
     
  • Alan Ezust

    Alan Ezust - 2017-12-29
    • status: open --> closed-accepted
     
  • Alan Ezust

    Alan Ezust - 2017-12-29

    Committed rev# 24800

     
  • Alan Ezust

    Alan Ezust - 2017-12-29

    oh you know what, right after I tested it, I noticed something wierd, Hrotko. Now when I follow the steps to reproduce and restart jEdit with that same clean settings dir, I get an untitled buffer that is in the $JEDIT_SETTINGS/backps dir, and it's "Untitled-2" instead of Untitled-1..

     
  • Hrotkó Gábor

    Hrotkó Gábor - 2018-01-05

    Sorry, but I cannot reproduce in any way I tried. This patch is only about saving perspective.xml.

     

Log in to post a comment.