>> 0. emacs -Q >> 1. Type these two lines: >> str 1 >> str 2 >> 2. On the third line type: >> s ;; self-insert-command >> M-/ ;; dabbrev-expand >> SPC ;; self-insert-command >> C-M-/ ;; dabbrev-completion >> >> This correctly displays all available completions >> “str 1” and “str 2”. But ‘s M-/ SPC M-/ M-/’ doesn't get >> the second completion. > > ’s M-/ SPC M-/’ doesn’t do a normal completion, it does this (from > the manual): > > After you have expanded a dynamic abbrev, you can copy additional > words that follow the expansion in its original context. Simply type > M-/ for each additional word you want to copy. The spacing and > punctuation between words is copied along with the words. Oh, this special-casing unfortunately breaks the natural workflow. > I suppose that subsequent M-/’s are undocumented, but the current > behaviour is, IMO, definitely confusing as it seems to search other > buffers for completions even though there are valid completions in the > current buffer. Maybe it's possible to break out of the vicious cycle of ‘SPC M-/’ repetitions by making ‘SPC M-/’ look like a normal expansion, e.g.: