Re: [libreoffice-users] Re: limited undo.

2016-09-04 Thread Philip Jackson
On 04/09/16 18:15, Xen wrote:

> No my friend, it is as I said.
> 
...
> 
> Work flow:
> 
> type text
> delete block of text
> rewrite block of text
> figure I was wrong in deleting it
> undo the writing
> undelete the block I just deleted
> 
> The deletion happend in one block.
> 
> However the writing happens by character and it doesn't coalesce or
> merge them into words in the undo buffer.
> 
> Since, in order to get back to my previous text, that I deleted in one
> operation, I have to go through the undo buffer (since it is sequential
> in history) I first have to undo the writing I just did.

Thanks for the detailed explanation. I see what you mean.

My understanding of the problem was at fault. Sorry.

Philip

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Re: limited undo.

2016-09-04 Thread Xen

Philip Jackson schreef op 04-09-2016 15:58:

On 03/09/16 21:39, Gabriele Ponzo wrote:

2016-09-03 20:02 GMT+02:00 Xen :


[…]
They are not grouped together like in other applications.

Ok, I got it now.


Sorry for my misunderstanding :)
---
Gabriele Ponzo



Hi - wait a minute. I think Gabriele has it right according to the way 
I

understand the OP's problem.


No my friend, it is as I said.

I am not deleting text.

I am undoing writes.

Work flow:

type text
delete block of text
rewrite block of text
figure I was wrong in deleting it
undo the writing
undelete the block I just deleted

The deletion happend in one block.

However the writing happens by character and it doesn't coalesce or 
merge them into words in the undo buffer.


Since, in order to get back to my previous text, that I deleted in one 
operation, I have to go through the undo buffer (since it is sequential 
in history) I first have to undo the writing I just did.


But the writing took up one undelete step per character and quickly 
expunged or evacuated the delete buffer from the history.


At one point that delete buffer was there. But writing individual 
characters takes up so much undelete steps and they are not merged 
together in memory (so as to form, for example, words) even a modest 
amount of typing will quickly fill the undo buffer completely and 
thereby delete the delete buffer that existed prior.


It is thrown out of memory because those 100 characters quickly fill up 
the "chain".


So, you can't get your text back because LO threw it away.

And really for no other reason than that it treats single characters 
the same as huge blocks of text. It will happily remember a block of 5k. 
That you just deleted, for instance. But it also happily remembers 
blocks of 1 character, and it treats all of those blocks the same.


It has no qualms remembering 100 blocks of 5k. It also has no qualms 
remembring 100 blocks of 1. It has huge qualms, in that sense, about 
remembering one block of 5k and 100 blocks of 1. After the 100th block 
of 1, it will dump that one block of 5k that preceded it.


Not only is this just stupid in terms of remembering what is important, 
or remembering it in a way that makes sense for getting text back, it 
also makes undoing typed text a character-by-character process when 
other programs would usually undo in blocks (by word, for example, or by 
group of words).


Now this was the same in OpenOffice and just hasn't been changed since.

I just can't help but think it is not a very good idea to do it in this 
way.


Most other program I know internally merge the characters into words 
when remembering them.


So say you write a word and a word boundary.

Then the next word and word boundary you write will cause the engine to 
look back into the undo buffer and check the previous word boundary, 
then merge everything in between into one word undo.


Or, likewise, or conversely, it can put every character you type into 
the previous undo buffer so you can only undo words that are delimited 
by a word boundary (or interspersed and as such delimited by other 
actions such as deletes or pastes or whatever).


Then when the next word is reached, a new undo buffer is created for 
that new word. But I think most programs actively rewrite their history 
to group characters into words and words into blocks of words. They do 
this to have a sort of logarithmic view on the undo history in which 
older events get grouped together into bigger writes, while more recent 
events are kept smaller.


If you also remember a time stamp with each undo block then it is rather 
easy also to merge blocks of words based on time. But it gets more 
complicated that way.


A simple heuristic of "more than 8 words in the past: group the 
preceding block of 8 words into one buffer. Have started a new 
paragraph? turn the paragraph before the previous into one block.


I don't know how people usually do it. But most any program has it. You 
could even look at the algo for Webkit/Chromium, or Kate, for all you 
cared.


Maybe they even use common libraries for it. It's just that it's not 
that hard to do it yourself and if your engine even supported the 
minimum which would be grouping into words, you would already get very 
far. Now your buffer of 100 steps is 100 words instead of 100 
characters, mostly.


And that really doesn't take any memory okay.

Such a rewrite of the previous word could probably done in less than a 
100 clock cycles ;-).


Well, if you did it in assembler.

Not saying I can do it.

Just saying it is not going to be a performance hindrance.

I also cannot really imagine the amount of memory required for words as 
opposed to single characters is going to make a dent in your memory 
consumption.


Most of the memory you require is overhead anyway, probably, for such 
small chunks.


Anyway.

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? 

Re: [libreoffice-users] Re: limited undo.

2016-09-04 Thread Philip Jackson
On 03/09/16 21:39, Gabriele Ponzo wrote:
> 2016-09-03 20:02 GMT+02:00 Xen :
> 
>> […]
>> They are not grouped together like in other applications.
>>
>> Ok, I got it now.
> 
> Sorry for my misunderstanding :)
> ---
> Gabriele Ponzo
> 

Hi - wait a minute. I think Gabriele has it right according to the way I
understand the OP's problem.

If you highlight six lines of text in Writer and delete it, the first
undo action you try will restore the whole six lines.

Similarly, if you delete whole words one at a time, using Ctrl-Delete
for each word, then immediately hit the undo button, this will restore
all of the last deleted word plus its following space. Hitting undo a
second time will restore all of the next to last word deleted plus its
following space. And so on...

Where you run into trouble is if you delete six lines by holding down
the backspace key, for example. Then the first undo restores the last
word deleted, the second undo restores its space, the 3rd restores the
next to last word deleted, the 4th restores its space etc ... This only
adds the spaces as an additional burden on the undo cache - not every
single letter.

At least, this is what I observe on my LO Writer 5.1.4.2

So to make the best of your default 100 undos, deleting in larger blocks
seems to be a good idea and that is what Gabriele proposed.

Philip

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Re: limited undo.

2016-09-03 Thread Gabriele Ponzo
2016-09-03 20:02 GMT+02:00 Xen :

> […]
> They are not grouped together like in other applications.
>
> Ok, I got it now.

Sorry for my misunderstanding :)
---
Gabriele Ponzo


>
> --
> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
> Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-uns
> ubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be
> deleted
>
>

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


Re: [libreoffice-users] Re: limited undo.

2016-09-03 Thread Xen

Gabriele Ponzo schreef op 03-09-2016 19:40:

To be honest, I believe that a proper use of Writer could avoid this
"problem".

What I mean is that probably it could be enough to delete word by word,
using CTRL key together with BackSpace or Delete key. In this way it 
should

take one step of undo per each word, instead of a single character.

Also consider selecting and THEN delete. For example you could use 
Shift

with Home and End keys or with CTRL and arrows keys...

Word processing IS NOT exactly like using a typewriter ;)


You misinterpret this.

We are not talking about deleting things step by step, but undoing 
things step by step, which is hardcoded. We are not talking of forcing 
individual deletes into the undo buffer, but of seeing individual 
"restores" being taken out of the undo buffer.


These individual restores result from individual character presses while 
typing.


They are not grouped together like in other applications.

--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Re: limited undo.

2016-09-03 Thread Gabriele Ponzo
To be honest, I believe that a proper use of Writer could avoid this
"problem".

What I mean is that probably it could be enough to delete word by word,
using CTRL key together with BackSpace or Delete key. In this way it should
take one step of undo per each word, instead of a single character.

Also consider selecting and THEN delete. For example you could use Shift
with Home and End keys or with CTRL and arrows keys...

Word processing IS NOT exactly like using a typewriter ;)

Il 03 set 2016 17:16, "m.a.riosv"  ha
scritto:

> Since 5.1 undo step are available only into the expert configuration
> Menu/Tools/Options/LibreOffice/Advanced -  TOpen expert configuration.
> Verify if steps value is enough, default value is 100.
>
> 
>
>
>
> --
> View this message in context: http://nabble.documentfoundation.org/
> limited-undo-tp4192509p4192514.html
> Sent from the Users mailing list archive at Nabble.com.
>
> --
> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
> Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-
> unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be
> deleted
>
>

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted