all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: emacs-devel@gnu.org
Cc: emacs-pretest-bug@gnu.org
Subject: Re: longlines mode and kill-line: missing space between boundary words
Date: Wed, 12 Dec 2007 06:57:54 -0700	[thread overview]
Message-ID: <fjopct$qhr$1@ger.gmane.org> (raw)
In-Reply-To: <47572D2F.9010307@gmx.at>

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	other threads:[~2007-12-12 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 22:52 longlines mode and kill-line: missing space between boundary words Jacek Chrząszcz
2007-12-05 22:58 ` martin rudalics
2007-12-12 13:57   ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fjopct$qhr$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.