unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Miles Bader <miles@gnu.org>
Cc: David Reitter <david.reitter@gmail.com>, emacs-pretest-bug@gnu.org
Subject: Re: query-replace doesn't match spaces with soft newlines
Date: Tue, 12 Feb 2008 02:16:12 +0200	[thread overview]
Message-ID: <87zlu7xczw.fsf@jurta.org> (raw)
In-Reply-To: <87r6fkclkx.fsf@catnip.gol.com> (Miles Bader's message of "Mon, 11 Feb 2008 10:45:34 +0900")

>> Perhaps I missed a discussion about the design of longlines-mode,
>> so I don't understand why longlines-mode doesn't put a `display'
>> property with a newline on whitespace to display it as soft newlines.
>> This would avoid many such problems.
>
> Because doing that makes many important emacs commands work incorrectly
> (from the user's viewpoint) -- e.g., C-e will move to the end of the
> paragraph...

Ok, I see now.  Many commands are expected to work on the visual
representation, so only a few commands that incorrectly treat inserted
newlines should be fixed.  I see no problem in matching additional
newlines in `query-replace' and the regexp search, but I don't see
how to distinguish soft newlines inserted by longlines-mode and hard
newlines with the `hard' property using the regexp search, i.e. how
(re-search-forward "[ \t\n]") could find soft newlines and skip
hard newlines?

-- 
Juri Linkov
http://www.jurta.org/emacs/




      reply	other threads:[~2008-02-12  0:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 12:08 query-replace doesn't match spaces with soft newlines David Reitter
2008-02-10 22:52 ` Juri Linkov
2008-02-11  1:45   ` Miles Bader
2008-02-12  0:16     ` Juri Linkov [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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zlu7xczw.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=david.reitter@gmail.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=miles@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).