GNU bug report logs -
#1948
confusion and bug in dabbrev.el
Previous Next
Reported by: Peter Tury <tury.peter <at> gmail.com>
Date: Sun, 18 Jan 2009 19:45:04 UTC
Severity: normal
Tags: confirmed, fixed, patch
Fixed in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 1948 <at> debbugs.gnu.org (full text, mbox):
Alan J Third <alan <at> idiocy.org> writes:
> Type:
>
> one tt
> one ww
>
> Then in the next line I have to type:
>
> one
> ^- space
>
> and M-/ (dabbrev-expand) completes it to:
>
> one ww
>
> Then if I hit M-/ again, point jumps up to the line above and replaces
> "ww". Subsequent M-/'s continue to fiddle with the same line.
I got this slightly wrong. The full set of commands is:
Type:
one tt
one ww
on M-/ SPC M-/ M-/
I've written a test, but I'm not sure what to do with it:
(ert-deftest dabbrev-expand-test ()
"Test for bug#1948.
When DABBREV-ELIMINATE-NEWLINES is non-nil (the default),
repeated calls to DABBREV-EXPAND can result in the source of
first expansion being replaced rather than the destination."
(with-temp-buffer
(insert "ab x\na\nab y")
(goto-char 8)
(save-window-excursion
(set-window-buffer nil (current-buffer))
;; M-/ SPC M-/ M-/
(execute-kbd-macro "\257 \257\257"))
(should (string= (buffer-string) "ab x\nab y\nab y"))))
I haven't signed the copyright assignment stuff.
--
Alan Third
This bug report was last modified 9 years and 142 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.