With this, and move by visual lines through multline history elements like the above example, and then on the first line or on the last brings up the next history element. But going back and forth between history elements changes the goal-column when the elements have different lengths. In fact, the current implementations of next-line-or-history-element and previous-line-or-history-element have the same problem. This can be prevented by setting goal-column: