Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The external change to Leo-Editor file(s) query is very puzzling #642

Closed
SegundoBob opened this issue Dec 28, 2017 · 2 comments
Closed

The external change to Leo-Editor file(s) query is very puzzling #642

SegundoBob opened this issue Dec 28, 2017 · 2 comments
Assignees
Milestone

Comments

@SegundoBob
Copy link
Contributor

How I Encountered the Problem

I encountered this problem when I had a Leo-Editor file open on my desktop in order to read my instructions for synchronizing my desktop and laptop. I also recorded in this file the time and date of the synch. I also changed my instructions. Then to my surprise, the synchronize changed this open Leo-Editor file. I knew that I wanted the desktop version and that I didn't care about the laptop changes. So I tried to save the open outline to disk.

Simple Test Case

Create two small and slightly different Leo-Editor files:

  • file-to-be-changed-externally.leo
  • external-changes.leo

Open file-to-be-changed-externally.leo then copy external-changes.leo over file-to-be-changed-externally.leo.

The Puzzling Query

/pri/git/leo_bug_demos/external_change/file-to-be-changed-externally.leo
has changed outside Leo.
Reload the outline node in Leo?
Yes Yes to All No No to All

Trying to Act on the Puzzling Query

With my open file clean, I tried to save it to disk. Up popped the puzzling query. I chose No. No error was reported, so I assumed the write had been done. It was not done.

I tried the same thing, but before the write I made the desktop version dirty. Again, I chose No and no error was reported, but the file remained dirty. It was clear that I had failed to accomplish what I wanted to do.

So I tried answering yes, even though I did NOT want to "Reload the outline node in Leo". Much to my surprise, this accomplished what I wanted to do. It did NOT reload the open file from disk. Instead it overwrote the disk file with the open file contents. This is what I wanted to do.

Problem One:

The query is NOT about an "outline node". The query tells the user the disk file the query is about. The query should say "file" or "disk file".

A Leo-Editor file can reference external files (e.g., @file, @auto, @clean, @edit) so one save might cause a series of queries about a series of external files and/or the Leo-Editor file. Hence, the need for the "Yes to All" and "No to All" options.

Problem Two:

Based on what yes and no cause, the query should be "Overwrite disk file with data from the open outline?" Then it would be clear that yes means overwriting the disk file with the open outline contents; and no means no write and the disk file remains different than the open outline contents.

Suggested Query

<absolute-disk-file-pathname>
was changed outside Leo after Leo loaded it into the open outline.
Overwrite this disk file with data from the open outline?

@vitalije
Copy link
Contributor

Leo used to ask user to overwrite changed file using same message dialog regardless of whether it is concerning just one external file or whole outline. Since 799c364 Leo makes a distinction between the two cases and shows more proper message.

@edreamleo edreamleo added this to the 5.7 milestone Feb 23, 2018
@SegundoBob
Copy link
Contributor Author

vitalije,

Thanks for improving the message. I like your new message.

Test System

Leo 5.7b2, build 20180223195002, Fri Feb 23 19:50:02 UTC 2018
Git repo info: branch = master, commit = b50029bc4e72
Python 3.5.2, PyQt version 5.5.1
linux

@edreamleo edreamleo removed the First label Apr 6, 2018
@edreamleo edreamleo removed the EKR label Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants