* strange dabbrev for whole lines and double spaces in cvs Emacs 23
@ 2009-01-07 23:37 Peter Tury
0 siblings, 0 replies; only message in thread
From: Peter Tury @ 2009-01-07 23:37 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
in a file I many times have to repeat the same line again an again.
They might have longer whitespace sequences (like e.g. double space:
" ").
For this I customized `dabbrev-abbrev-char-regexp' to be a period (.)
meaning "any single character except a newline" will be counted as a
word constituent for dabbrev. It works inperfectly(?) for first time,
and this might result weird result after a repeated M-/ (dabbrev-
expand).
As I see double spaces makes M-/ crazy: first time it doesn't copy
them (just a simple one instead)...
Here is an example to reproduce the situation:
Try this text in a file
Try a second line with same starters and some double spaces
Now I want to insert the first line ("Try this...") again as a new,
3rd line. If I type `T r M-/' it inserts "Try a second ..." almost
correctly, i.e. inserts "...some double..." instead of "...some
double...". (I think this contradicts to (info "(emacs) Dynamic
Abbrevs"), since it states: "The spacing and punctuation between words
is copied along with the words.")
But repeating M-/ (to insert the other matching line instead) leaves
the newly inserted 3rd line unchanged (="Try a second...") but
replaces the original 2nd line (="Try a second...") instead with the
first line (="Try this..."), so finally I get a complete mess, the
buffer has this:
Try this text in a file
Try this text in a file
Try a second line with same starters and some double spaces
It seems as if second M-/ would "continue" replacing from the wrong
point.
Please note:
1) if no double space is in the lines, everything is fine!
2) spacing is not kept anyway, i.e. without any customization (of
`dabbrev-abbrev-char-regexp') it neither works. Try this:
one two three
Then type o n M-/ <SPC> M-/
It gives
"one two" instead of "one two". (Though punctiation is preserved if
exists well.)
Is this a bug?
Thanks,
P
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-07 23:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 23:37 strange dabbrev for whole lines and double spaces in cvs Emacs 23 Peter Tury
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.