- AuthorPosts
- August 12, 2008 at 3:53 pm #6104owilskyParticipant
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,
OliverAugust 12, 2008 at 5:58 pm #6105Yutaka EmuraKeymasterowilsky 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,
OliverWhen 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.
August 12, 2008 at 6:57 pm #6106owilskyParticipantAny possibility to make this configurable in 7.50 ?
August 12, 2008 at 7:13 pm #6107Yutaka EmuraKeymasterowilsky 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.
August 12, 2008 at 7:55 pm #6109owilskyParticipantI 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.
August 12, 2008 at 8:41 pm #6110Yutaka EmuraKeymasterowilsky 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?
August 13, 2008 at 2:41 pm #6114owilskyParticipantYes, 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
August 13, 2008 at 5:20 pm #6115Yutaka EmuraKeymasterowilsky 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.
August 13, 2008 at 5:24 pm #6116Aye_WongMemberI 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 ?
August 13, 2008 at 5:37 pm #6117Aye_WongMemberowilsky 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 ?
August 13, 2008 at 5:42 pm #6118owilskyParticipantI 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?August 13, 2008 at 5:53 pm #6119Aye_WongMemberSorry 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. :-)
August 13, 2008 at 5:56 pm #6120Aye_WongMemberYutaka 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.
- AuthorPosts
- You must be logged in to reply to this topic.