Bug Hunting Session
Bug 120809 - Undo/Redo buffer should record input until next punctuation mark
Summary: Undo/Redo buffer should record input until next punctuation mark
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2018-10-23 02:34 UTC by Leandro Martín Drudi
Modified: 2019-05-22 15:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Undo list (15.36 KB, image/png)
2018-10-23 02:36 UTC, Leandro Martín Drudi
Details
Word and Writer (165.09 KB, image/png)
2018-10-25 19:48 UTC, Leandro Martín Drudi
Details
Excel and Calc (76.50 KB, image/png)
2018-10-25 20:00 UTC, Leandro Martín Drudi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leandro Martín Drudi 2018-10-23 02:34:11 UTC
Description:
[ES]
En la actualidad, los comandos deshacer y rehacer almacenan una palabra, un espacio, un signo de puntuación por cada comando. Entonces, en la frase "Este párrafo es de ejemplo", un clic deshace "Ejemplo", otro clic deshace el espacio, otro clic el "de", otro clic, el espacio, otro clic "es".
De la forma actual, en un texto de 50 palabras podrías ocupar todos los comandos deshacer.
Lo que propongo como posibilidad (obviamente dejo en manos de los expertos como lograrlo) que se usen bloques determinados por signos de puntuación, o bien alguna pausa, o cierta cantidad de caracteres. Esto permitiría, quizá, en vez de poder deshacer dos o tres líneas de texto, una página entera. Quizá más.
[EN]
Currently, the undo and redo commands store a word, a space, a punctuation mark for each command. Then, in the sentence "This paragraph is an example", one click undoes "Example", another click undoes the space, another click the "an", another click, the space, another click "is".
In the current way, in a text of 50 words you could occupy all the undo commands.
What I propose as a possibility (obviously I leave in the hands of experts how to achieve it) that blocks are used determined by punctuation marks, or some pause, or a certain number of characters. This would allow, perhaps, instead of being able to undo two or three lines of text, a whole page. Maybe more.

Steps to Reproduce:
1. Write a phrase with 5 words and 4 spaces.
2. Undo 9 actions to return to the beginning
3. Redo 9 actions to return to the text.

Actual Results:
1 word, 1 action.
1 space ( ), 1 action.
1 comma, dot, etc. 1 action.

Expected Results:
In some way, an oration, paragraph can be 1 action.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
[ES]
Este cambio es sumamente imprescindible para ámbitos donde los documentos largos llevan mucha redacción y correcciones y volver a un punto anterior debe ser en un tiempo optimizado.
En lo personal, como escritor, es realmente molesto, contraproducente y muy lento deshacer un texto de 50 palabras añadidas y que, para volver al punto previo a añadirlas a las palabras, tener que deshacer una palabra, espacio o signo a la vez.
A la vez, aumentar la cantidad de acciones a deshacer o usar el control de cambios muchas veces no nos dan la flexibilidad que uno requiere o resultan demasiado complejas para ciertas acciones.
En otro sentido mucho menos formal, resulta absurdo el funcionamiento actual.

[EN]
This change is extremely essential for areas where long documents have a lot of writing and corrections and to return to an earlier point should be in an optimized time.
Personally, as a writer, it is really annoying, counterproductive and very slow to undo a text of 50 words added and that, to return to the previous point to add them to the words, having to undo a word, space or sign at a time.
At the same time, increasing the number of actions to be undone or using change control often does not give us the flexibility that one requires or they are too complex for certain actions.
In a much less formal sense, the current functioning is absurd.
Comment 1 Leandro Martín Drudi 2018-10-23 02:36:58 UTC
Created attachment 145915 [details]
Undo list

The phrase is: "pensó en salir corriendo. Pero"
Undo word by word in this phrase 10 undo actions when only one can be much more useful.
Comment 2 Telesto 2018-10-23 18:12:12 UTC
FWIW: It's possible to extent the number of undo steps.
Tools -> Options -> Advanced -> Open Expert Configuration -> Search for "Undo"
Scroll down the list -> Search for "100" as value. Replace it for the amount of Undo steps expected

It's a global setting. A large number of undo steps is less ideal for large data-amounts (for example when working with Calc) but fine for Writer (I think), except when working with large number of pictures and such.
Comment 3 Leandro Martín Drudi 2018-10-23 18:50:52 UTC
(In reply to Telesto from comment #2)
> FWIW: It's possible to extent the number of undo steps.
> Tools -> Options -> Advanced -> Open Expert Configuration -> Search for
> "Undo"
> Scroll down the list -> Search for "100" as value. Replace it for the amount
> of Undo steps expected
> 
> It's a global setting. A large number of undo steps is less ideal for large
> data-amounts (for example when working with Calc) but fine for Writer (I
> think), except when working with large number of pictures and such.


[ES]
Tener 10.000 opciones de deshacer es tan INEFICIENTE como tener 100 si cada acción solo almacena 1 palabra o 1 caracter. Como escritor resulta sumamente contraproducente e inutil el sistema actual pues cada clic deshace apenas una palabra o un caracter.

[EN]
Having 10,000 undo options is as INEFFICIENT as having 100 if each action only stores 1 word or 1 character. As a writer, the current system is extremely counterproductive and useless, as each click undoes just one word or one character.
Comment 4 Heiko Tietze 2018-10-24 10:51:12 UTC
Maybe I don't get your envisioned algorithm but let's think about pauses, meaning you undo until the last pause of typing. This likely fails for most users as the speed is different - could be adaptive, of course - and since reverting phrases/sentences or anything longer than a word is more precisely achieved with selection and delete. OTOH, do you have an example where the undo functions works as expected?
Comment 5 Heiko Tietze 2018-10-25 11:51:12 UTC
Topic is scheduled for the next design meeting (postponed from this week); setting to NEW meanwhile. Would be good to get your reply on comment 4, Leandro.
Comment 6 Leandro Martín Drudi 2018-10-25 19:46:51 UTC
(In reply to Heiko Tietze from comment #4)
> Maybe I don't get your envisioned algorithm but let's think about pauses,
> meaning you undo until the last pause of typing. This likely fails for most
> users as the speed is different - could be adaptive, of course - and since
> reverting phrases/sentences or anything longer than a word is more precisely
> achieved with selection and delete. OTOH, do you have an example where the
> undo functions works as expected?

[ES]
No comprendo mucho lo que dices porque Google no traduce demasiado bien (supongo que desde el Español al Inglés sucede lo mismo).
Pero, en MS Word el comando deshacer utiliza una forma similar a la que he propuesto. Escribir una página antera puede ser deshecho en 2 o 3 acciones de deshacer. Ahora, qué método usa, cómo lo logra, no lo sé. Solo se que esta forma de hacerlo de LibreOffice simplemente entorpece la fluidez de mi trabajo.
No sé si usarán pausas, ciertas teclas, ciertos caracteres, no lo sé. Solo puedo decir que la forma actual de manejarlo, es demasiado ineficiente.
En Calc creo que es muy útil: cada acción es lo escrito en una celda. Pero transportar esto a otro programa creo que no es una buena decisión.

[EN]
I do not understand much what you say because Google does not translate too well (I suppose that from Spanish to English the same thing happens).
But, in MS Word, the undo command uses a form similar to the one I have proposed. Writing an anther page can be undone in 2 or 3 undo actions. Now, what method do you use, how do you do it, I do not know. I just know that this way of doing it from LibreOffice simply hinders the fluidity of my work.
I do not know if they will use pauses, certain keys, certain characters, I do not know. I can only say that the current way of handling it is too inefficient.
In Calc I think it is very useful: every action is what is written in a cell. But transporting this to another program I think is not a good decision.
Comment 7 Leandro Martín Drudi 2018-10-25 19:48:43 UTC
Created attachment 146013 [details]
Word and Writer

[ES]
Vean ustedes mismos: Word usa 1 acción de deshacer para 15 palabras (porque esas escribí, seguramente si continuaba sin pausar, usaría la misma acción para un bloque grande de contenido). Por otro lado, Writer usa 10 acciones de deshacer para solo 5 palabras.

[EN]
See yourselves: Word uses 1 undo action for 15 words (because I wrote those, surely if I continued without pausing, I would use the same action for a large block of content). On the other hand, Writer uses 10 undo actions for only 5 words.
Comment 8 Leandro Martín Drudi 2018-10-25 20:00:55 UTC
Created attachment 146014 [details]
Excel and Calc

[ES]
No está nada mal. Pero no sería una mala idea añadir esa descripción de la acción.

[EN]
It's not bad at all. But it would not be a bad idea to add that description of the action.
Comment 9 Thomas Lendo 2018-10-30 21:31:07 UTC
In principle, I support a smarter behavior of the undo command. But it's difficult to meet the needs of different people. E.g. when writing much text, a sentence-like undo is good, when only writing 2 sentences then I would feel only 2 steps are too few.

(In reply to Leandro Martín Drudi from comment #8)
> Created attachment 146014 [details]
> Excel and Calc
> 
> It's not bad at all. But it would not be a bad idea to add that description
> of the action.
Please create a new bug for a better description of undo steps. One bug for one issue.
Comment 10 Heiko Tietze 2018-11-01 09:26:48 UTC
We discussed the topic in the design meeting. First of all you can select and cut/delete to "undo" input, which of course is a bit more interaction. The Microsoft undo buffer takes all input until the next paragraph (Enter) or when a different function than input is executed, for example auto correction, formatting, selection. Our fine-grained buffer is definitely better than this solution.

However, never settle and maybe we can introduce an option to "[ ] Chunk input for Undo" that takes all typing until the next punctuation mark. Our dummy text would be split like this:


He heard quiet steps behind him. 
That didn't bode well. 
Who could be following him this late at night:
 and in this deadbeat part of town? 
And at this particular moment, 
just after he pulled off the big time and was making off with the greenbacks. 


As a closed task it might be an interesting GSoC project.
Comment 11 Leandro Martín Drudi 2019-05-22 02:50:41 UTC
Sorry for bothering. I would like to know if there is anything new about this. The possibility of using "cut" is not useful because if you add text in between something already written, undoing is the best option to restore the original version.
Comment 12 Heiko Tietze 2019-05-22 15:01:51 UTC
So far no developer has commented. If you have an urgent need you may ask for professional support https://www.libreoffice.org/get-help/professional-support/