emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: longlines mode and kill-line: missing space between boundary words


From: Kevin Rodgers
Subject: Re: longlines mode and kill-line: missing space between boundary words
Date: Wed, 12 Dec 2007 06:57:54 -0700
User-agent: Thunderbird 1.5.0.13 (Macintosh/20070809)

martin rudalics wrote:
 > In longlines mode when I press C-k (i.e. a kill-line command) in a
 > long paragraph with soft linebreaks and then press C-y to yank the
 > killed line somewhere, the spaces between the words on soft-broken
 > lines' boundaries disapear.
 >
...
 >
 > I guess after kill-line the longline mode automatically compresses the
 > soft-linebreak at the end of the line (because the space is
 > temporarily turned into a soft linebreak) and the information about
 > the space does not get into the kill ring.

Yes.  `kill-line' kills the line without the newline and longlines mode
removes the newline character after that.

 > The consistent behaviour would be either to add the missing space to
 > the kill ring or (it that is impossible or too hard) to kill the whole
 > paragraph at once (since it in fact is a single line). The first
 > behaviour clearly looks better to me.

I'm afraid that it's hardly possible to DTRT here.  Adding the space is
not quite correct since `kill-line' doesn't kill the newline character
which substitutes the space.  Note that you get a similar bug when you
kill the line + the newline character.  Reinserting the killed stretch
will get you a hard newline instead of the soft one.

Killing everything up to the next hard newline appears conceptually
right.  It would clash, however, with the current concept that a line
for `kill-line' is pretty much a line as it appears on the screen.
Moreover, `kill-line' would have to become aware of longlines' way of
distinguishing soft and hard newlines.

Would it make sense for longlines mode to have a local keymap in which
C-k was bound to a new command (named longlines-kill-line, of course)
that is aware of longlines' way of distinguishing soft and hard
newlines?

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]