Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #6104
    owilsky
    Participant

    Hi,

    I think, I found a bug in 7.02:
    I selected Save and Restore Workspace automatically. I also selected not to close last document.

    I have two files open, then I close EmEditor.
    When I restart EmEditor, both files are reopened. So far, so good.
    Now I press Ctrl-F4 twice to close all files.
    Now only one empty file is open, named “untitled”.
    When I now close EmEditor, I expect to have an empty document opened the next time I start EmEditor. Instead the two previously opened documents are restored.
    Bug or intention?

    Regards,
    Oliver

    #6105
    Yutaka Emura
    Keymaster

    owilsky wrote:
    Hi,

    I think, I found a bug in 7.02:
    I selected Save and Restore Workspace automatically. I also selected not to close last document.

    I have two files open, then I close EmEditor.
    When I restart EmEditor, both files are reopened. So far, so good.
    Now I press Ctrl-F4 twice to close all files.
    Now only one empty file is open, named “untitled”.
    When I now close EmEditor, I expect to have an empty document opened the next time I start EmEditor. Instead the two previously opened documents are restored.
    Bug or intention?

    Regards,
    Oliver

    When only one “untitled” document is left when you close the window, this state will not be saved. Instead previous workspace will be restore. This is the specification.

    #6106
    owilsky
    Participant

    Any possibility to make this configurable in 7.50 ?

    #6107
    Yutaka Emura
    Keymaster

    owilsky wrote:
    Any possibility to make this configurable in 7.50 ?

    Please write why you want the other behavior. Why do you want to save only an “untitled” window in workspace.

    #6109
    owilsky
    Participant

    I don’t really want to save an “untitled” window in workspace, sometimes I just want an easy way to delete the last workspace, to start with an empty file when I start EmEditor.

    #6110
    Yutaka Emura
    Keymaster

    owilsky wrote:
    I don’t really want to save an “untitled” window in workspace, sometimes I just want an easy way to delete the last workspace, to start with an empty file when I start EmEditor.

    Then how about “Erase Workspace” command, which I will implement soon?

    #6114
    owilsky
    Participant

    Yes, that will help me, as long as I can call that function with ExecuteCommandByID.
    Then I can implement a trigger so that I have the behaviour I want.

    This can then be executed “on group window close”:


    if(editor.Documents.Count == 1 && document.Name.length == 0 && document.Saved) {
    editor.ExecuteCommandByID(4332); //EEID_SAVE_WORKSPACE_QUIT_ALL
    }

    EEID_SAVE_WORKSPACE_QUIT_ALL does not work, as you said by design.

    Oliver

    #6115
    Yutaka Emura
    Keymaster

    owilsky wrote:
    Yes, that will help me, as long as I can call that function with ExecuteCommandByID.
    Then I can implement a trigger so that I have the behaviour I want.

    This can then be executed “on group window close”:


    if(editor.Documents.Count == 1 && document.Name.length == 0 && document.Saved) {
    editor.ExecuteCommandByID(4332); //EEID_SAVE_WORKSPACE_QUIT_ALL
    }

    EEID_SAVE_WORKSPACE_QUIT_ALL does not work, as you said by design.

    Oliver

    Use


    #define EEID_ERASE_WORKSPACE 4450

    for “Erase Workspace” command.

    EEID_SAVE_WORKSPACE_QUIT_ALL may not work inside a macro because it must quits EmEditor but it is executing a macro.

    #6116
    Aye_Wong
    Member

    I have one concern related to this. If you store file pathes to removable drives in a workspace, it could be troublesome in restore since in many cases they are assumed not to exist.

    So you should ignore when you miss a file in restoring workspace and the file was on the removable drive.

    And it may be better to store the path to files in relative path from EmEditor only where the files are placed in the same removable drive in which EmEditor lies.

    Or anyway it might be better to ignore when files are missed in restoring workspaces. Most of users may think the notification just as bothersome.

    Is my concern off the topic here ?

    #6117
    Aye_Wong
    Member

    owilsky wrote:
    I have two files open, then I close EmEditor.
    When I restart EmEditor, both files are reopened. So far, so good.
    Now I press Ctrl-F4 twice to close all files.
    Now only one empty file is open, named “untitled”.
    When I now close EmEditor, I expect to have an empty document opened the next time I start EmEditor. Instead the two previously opened documents are restored.
    Bug or intention?

    Okay. I understand. The problem you mentioned here is that automatic saving workspace is too automatic and it dares to save nothing even when meaningless. And you may think it might be better to keep the previous workspace rather than storing the meaningless workspace with no valid entries. Is my understanding correct ?

    #6118
    owilsky
    Participant

    I am used to an Editor that simply saves the state as it is.
    When I open EmEditor, I want all documents reloaded that were open when EmEditor was closed.
    When I finish work with my documents, I close them. So why would I want them to reappear when I don’t need them anymore?

    I simply want to get EmEditor in that state as I left the last session. Full stop.
    I understand that maybe others want the behaviour as it is now, so I wrote a macro to get my behaviour just for me. So what’s the point?

    #6119
    Aye_Wong
    Member

    Sorry for confusion. What I said was the quire opposite of your expectation. I read this thread through again and now I understand what you want. :-)

    #6120
    Aye_Wong
    Member

    Yutaka wrote:

    When only one “untitled” document is left when you close the window, this state will not be saved. Instead previous workspace will be restore. This is the specification.

    I think this should be declared in the document. At least I cannot find this in the Japanese help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.