GNU bug report logs - #10885
Replace expressions: enhance functionality when searching in filled paragraphs

Previous Next

Package: emacs;

Reported by: linuxfever <linuxfever <at> yahoo.gr>

Date: Sun, 26 Feb 2012 01:31:01 UTC

Severity: wishlist

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#10885: closed (Replace expressions: enhance functionality
 when searching in filled paragraphs)
Date: Thu, 06 Sep 2012 08:58:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 06 Sep 2012 11:54:12 +0300
with message-id <87y5knpm4r.fsf <at> mail.jurta.org>
and subject line Re: bug#10885: Replace expressions: enhance functionality when searching in filled paragraphs
has caused the debbugs.gnu.org bug report #10885,
regarding Replace expressions: enhance functionality when searching in filled paragraphs
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
10885: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10885
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: linuxfever <linuxfever <at> yahoo.gr>
To: Bug-gnu-emacs <at> gnu.org
Subject: Replace expressions: enhance functionality when searching in filled
	paragraphs
Date: Sat, 25 Feb 2012 17:02:45 -0800 (PST)
Hello,

This is more of a suggestion/wish, rather than an actual bug, which could
enhance significantly replacement functionality in a filled text (region,
paragraph, buffer, etc).

Currently it seems that when trying to replace an expression comprising two
words, say for example 'replace this', then the functions 'replace-string'
or 'replace-regexp' fail to locate the expression when that is split along
two lines in the text, i.e., in the above example when the word 'replace' is
at the end of one line, and the word 'this' is at the beginning of the next
one.

I learned today
(http://old.nabble.com/Search-in-filled-text-does-not-work-correctly-td33390451.html#a33392628)
that there are ways around this by specifying a newline between words, for
example, searching for 'replace C-q C-j this' would actually do the work but
there are two problems with this. First, it is inefficient as it takes
longer to type, and second it would replace only the expressions that are
actually split in two lines and leave out the ones separated by a normal
SPC.

In a nutshell, I believe enhancing the functionality of the replacement
functions to accommodate for expressions split in two lines, would make
their usability so much easier. Thanks for your time and for such a great
and versatile editor!

-- 
View this message in context: http://old.nabble.com/Replace-expressions%3A-enhance-functionality-when-searching-in-filled-paragraphs-tp33392837p33392837.html
Sent from the Emacs - Bugs mailing list archive at Nabble.com.



[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10885-done <at> debbugs.gnu.org
Subject: Re: bug#10885: Replace expressions: enhance functionality when
	searching in filled paragraphs
Date: Thu, 06 Sep 2012 11:54:12 +0300
>> Since query-replace is going in the direction of closer integration with
>> isearch, the right thing would be to get its search function from isearch.
>
> Agreed.

Installed.  Since this enhancement request is completely implemented,
and all mentioned problems are fixed, I'm closing it.

>>  (defun replace-highlight (match-beg match-end range-beg range-end
>> -			  string regexp case-fold)
>> +			  string regexp word case-fold)
>
> Maybe we should use an isearch-state argument?

Actually these arguments correspond to the variables of `perform-replace',
not isearch state.  So I renamed them to the names used in `perform-replace',
causing isearch-related let-bindings in `replace-highlight' to be
the exact copy of let-bindings in `perform-replace'.


This bug report was last modified 12 years and 259 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.