Re: [LyX/master] Rename emergency file when it is kept.

2019-03-20 Thread Pavel Sanda


... ping ...

On Mon, Jan 21, 2019 at 01:47:37PM +0100, Pavel Sanda wrote:
> On Fri, Jan 18, 2019 at 09:10:13PM -0500, Richard Kimberly Heck wrote:
> > On 1/18/19 8:29 PM, Pavel Sanda wrote:
> > > I guess my point now is that experienced user is not expecting
> > > emergency file to be renamed and stored, so some hint should be provided. 
> > 
> > How about a dialog after that's done: "Emergency file saved as
> > whatever.lyx"?
> 
> That's completely fine with me as well.
> 
> > >>> What I would find as a real improvement in the emergency case workflow
> > >>> is to offer comparison of the emergency and stored file.
> > >>> I found myself doing this manually bunch of times after emergency file
> > >>> was created, so new button for that would be handy and not so much work
> > >>> I believe.
> > >> Sure, we could certainly do that.
> > >>
> > >> Personally, I have not found the comparison stuff very useful. It seems
> > >> to proceed character by character, which can be lead to bizarre diffs.
> > >> I've occasionally thought about converting it (or adding an option) so
> > >> that it went word by word. That would be more informative, I think.
> > > Agreed, I use comparison just for getting indication which part of 
> > > document
> > > changed, the character based diff makes the comparison feature somewhat
> > > useless due to the bizarre diffs you mentioned. We even have bug 
> > > discussing
> > > this issue, unf Vincent never got to fix that and it might not be trivial.
> > 
> > I keep thinking this can't be that hard. I'll have a look.
> 
> This would be great to have fixed and it might get even much faster if word
> based. My impressioon from the cursory look at the code some years back 
> was that it's not straightforward change...
> 
> Also just switching to words without touching the comparison algorithm itself
> might produce similar problems we have now, see Vincent's comments on #6889.
> 
> Pavel


Re: [LyX/master] Rename emergency file when it is kept.

2019-01-21 Thread Pavel Sanda
On Fri, Jan 18, 2019 at 09:10:13PM -0500, Richard Kimberly Heck wrote:
> On 1/18/19 8:29 PM, Pavel Sanda wrote:
> > I guess my point now is that experienced user is not expecting
> > emergency file to be renamed and stored, so some hint should be provided. 
> 
> How about a dialog after that's done: "Emergency file saved as
> whatever.lyx"?

That's completely fine with me as well.

> >>> What I would find as a real improvement in the emergency case workflow
> >>> is to offer comparison of the emergency and stored file.
> >>> I found myself doing this manually bunch of times after emergency file
> >>> was created, so new button for that would be handy and not so much work
> >>> I believe.
> >> Sure, we could certainly do that.
> >>
> >> Personally, I have not found the comparison stuff very useful. It seems
> >> to proceed character by character, which can be lead to bizarre diffs.
> >> I've occasionally thought about converting it (or adding an option) so
> >> that it went word by word. That would be more informative, I think.
> > Agreed, I use comparison just for getting indication which part of document
> > changed, the character based diff makes the comparison feature somewhat
> > useless due to the bizarre diffs you mentioned. We even have bug discussing
> > this issue, unf Vincent never got to fix that and it might not be trivial.
> 
> I keep thinking this can't be that hard. I'll have a look.

This would be great to have fixed and it might get even much faster if word
based. My impressioon from the cursory look at the code some years back 
was that it's not straightforward change...

Also just switching to words without touching the comparison algorithm itself
might produce similar problems we have now, see Vincent's comments on #6889.

Pavel


Re: [LyX/master] Rename emergency file when it is kept.

2019-01-19 Thread Kornel Benko
Am Freitag, 18. Januar 2019 04:57:19 CET schrieb Richard Kimberly Heck 
:
> commit b804e8851c33b68caa5057e809a12333741dfe2e

Typo:

> +   "You should do so manually. 
> Otherwise, you will be"
> +   "asked about it again the next time 
> you try to load"

will be turned in into "..., you will beasked about it again ..."

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: [LyX/master] Rename emergency file when it is kept.

2019-01-18 Thread Richard Kimberly Heck
On 1/18/19 8:29 PM, Pavel Sanda wrote:
> I guess my point now is that experienced user is not expecting
> emergency file to be renamed and stored, so some hint should be provided. 

How about a dialog after that's done: "Emergency file saved as
whatever.lyx"?


>>> What I would find as a real improvement in the emergency case workflow
>>> is to offer comparison of the emergency and stored file.
>>> I found myself doing this manually bunch of times after emergency file
>>> was created, so new button for that would be handy and not so much work
>>> I believe.
>> Sure, we could certainly do that.
>>
>> Personally, I have not found the comparison stuff very useful. It seems
>> to proceed character by character, which can be lead to bizarre diffs.
>> I've occasionally thought about converting it (or adding an option) so
>> that it went word by word. That would be more informative, I think.
> Agreed, I use comparison just for getting indication which part of document
> changed, the character based diff makes the comparison feature somewhat
> useless due to the bizarre diffs you mentioned. We even have bug discussing
> this issue, unf Vincent never got to fix that and it might not be trivial.

I keep thinking this can't be that hard. I'll have a look.

Riki




Re: [LyX/master] Rename emergency file when it is kept.

2019-01-18 Thread Pavel Sanda
On Fri, Jan 18, 2019 at 04:42:29PM -0500, Richard Kimberly Heck wrote:
> > The previous code
> > forced you to do *something* about the situation when it's most due -- 
> > until you deal with the emergency file properly, you will be asked.
> Not really. You can perfectly well leave the file sitting there. Then,
> as you say, you'll be asked about it again the next time, but only if
> you do not save the original file (so that it's modtime is later). But

I did not know about this modtime check (I guess my workflow is always
to solve the issue first).

> if you have another crash, then the emergency file will be over-written.
> We could try to rename it or something first, but presumably we need to
> do as little as possible when writing the emergency file.
> > Now you you just hit Keep and postpone/forget about that, which is way
> > more prone to dataloss than previous situation IMHO.
> I'm not sure I understand that worry. The file's there, right?

The worry was that you forget about the mismatch between file and its
emergency, thus losing the changes in the emergency; anyway the modtime
feature made my argument wrong. 

> > It's also change of the behaviour for the experienced users so if we
> > keep this commit we should at least notify about the changed workflow.
> > Perhaps "Keep and Rename" as the button.
> Let's resolve this first, and then I will change the button or message
> or something.

I guess my point now is that experienced user is not expecting emergency
file to be renamed and stored, so some hint should be provided.

> > What I would find as a real improvement in the emergency case workflow
> > is to offer comparison of the emergency and stored file.
> > I found myself doing this manually bunch of times after emergency file
> > was created, so new button for that would be handy and not so much work
> > I believe.
> 
> Sure, we could certainly do that.
> 
> Personally, I have not found the comparison stuff very useful. It seems
> to proceed character by character, which can be lead to bizarre diffs.
> I've occasionally thought about converting it (or adding an option) so
> that it went word by word. That would be more informative, I think.

Agreed, I use comparison just for getting indication which part of document
changed, the character based diff makes the comparison feature somewhat
useless due to the bizarre diffs you mentioned. We even have bug discussing
this issue, unf Vincent never got to fix that and it might not be trivial.
OTOH to have sense whether something changed in the emergency file this
feauture is enough.

Pavel


Re: [LyX/master] Rename emergency file when it is kept.

2019-01-18 Thread Richard Kimberly Heck
On 1/18/19 7:36 AM, Pavel Sanda wrote:
> On Fri, Jan 18, 2019 at 04:57:19AM +0100, Richard Kimberly Heck wrote:
>> commit b804e8851c33b68caa5057e809a12333741dfe2e
>> Author: Richard Kimberly Heck 
>> Date:   Wed Jan 16 11:13:53 2019 -0500
>>
>> Rename emergency file when it is kept.
>> 
>> Otherwise, we will ask about it again next time, when the file
>> may have changed. Also, if we crash again, we'll over-write that
>> file, which we may not want to do.
> Huh. I don't personally find this as an improvement. 

Sorry, maybe I should have brought this to the list. It didn't occur to
me that it might be controversial.

> The previous code
> forced you to do *something* about the situation when it's most due -- 
> until you deal with the emergency file properly, you will be asked.
Not really. You can perfectly well leave the file sitting there. Then,
as you say, you'll be asked about it again the next time, but only if
you do not save the original file (so that it's modtime is later). But
if you have another crash, then the emergency file will be over-written.
We could try to rename it or something first, but presumably we need to
do as little as possible when writing the emergency file.
> Now you you just hit Keep and postpone/forget about that, which is way
> more prone to dataloss than previous situation IMHO.
I'm not sure I understand that worry. The file's there, right?
> It's also change of the behaviour for the experienced users so if we
> keep this commit we should at least notify about the changed workflow.
> Perhaps "Keep and Rename" as the button.
Let's resolve this first, and then I will change the button or message
or something.
> What I would find as a real improvement in the emergency case workflow
> is to offer comparison of the emergency and stored file.
> I found myself doing this manually bunch of times after emergency file
> was created, so new button for that would be handy and not so much work
> I believe.

Sure, we could certainly do that.

Personally, I have not found the comparison stuff very useful. It seems
to proceed character by character, which can be lead to bizarre diffs.
I've occasionally thought about converting it (or adding an option) so
that it went word by word. That would be more informative, I think.

Riki




Re: [LyX/master] Rename emergency file when it is kept.

2019-01-18 Thread Pavel Sanda
On Fri, Jan 18, 2019 at 04:57:19AM +0100, Richard Kimberly Heck wrote:
> commit b804e8851c33b68caa5057e809a12333741dfe2e
> Author: Richard Kimberly Heck 
> Date:   Wed Jan 16 11:13:53 2019 -0500
> 
> Rename emergency file when it is kept.
> 
> Otherwise, we will ask about it again next time, when the file
> may have changed. Also, if we crash again, we'll over-write that
> file, which we may not want to do.

Huh. I don't personally find this as an improvement. The previous code
forced you to do *something* about the situation when it's most due -- 
until you deal with the emergency file properly, you will be asked.
Now you you just hit Keep and postpone/forget about that, which is way
more prone to dataloss than previous situation IMHO.

It's also change of the behaviour for the experienced users so if we
keep this commit we should at least notify about the changed workflow.
Perhaps "Keep and Rename" as the button.

What I would find as a real improvement in the emergency case workflow
is to offer comparison of the emergency and stored file.
I found myself doing this manually bunch of times after emergency file
was created, so new button for that would be handy and not so much work
I believe.

Pavel