Dmitry Gutov writes: > On 17/01/2023 22:44, Theodor Thornhill via Bug reports for GNU Emacs, > the Swiss army knife of text editors wrote: >> 1. What should a sexp be? >> >> Is it basically "everything", or is there a distincition between >> "word", "sexp" and "sentence"? For lisp forward-sexp looks like a >> "jump over words, or a balanced pair of parens". In other languages >> that can look a little weird - consider: >> >> ``` >> foo().|bar().baz(); -> foo().bar|().baz(); -> foo().bar()|.baz(); >> ``` >> >> In a sense it could be considered "better", or at least distinct from >> forward-word to: >> >> ``` >> foo().|bar().baz(); -> foo().bar()|.baz(); -> foo().bar().baz()|; > > One of the key things for Ruby, I think, is to jump over expressions. > > E.g. when the point is before 'def' in > > def foo > ... > end > > forward-sexp jumps to after 'end'. And backward-sexp jumps back. > > Same for > > if 2 == 3 > ... > end > > , parenthesized expressions and (less important) method calls and > statements as well. Test this very untested addition to the patch (I know no ruby). It seems to do what you want. I'd consider this sentence movement, though. For M-e Theo