From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#10885: Replace expressions: enhance functionality when searching in filled paragraphs Date: Thu, 6 Sep 2012 19:39:12 +0200 Message-ID: References: <33392837.post@talk.nabble.com> <1oipiuxspa.fsf@fencepost.gnu.org> <87d38z1bp3.fsf@mail.jurta.org> <87linm79pc.fsf@mail.jurta.org> <8762ebbehj.fsf@mail.jurta.org> <87oblo21xe.fsf@mail.jurta.org> <87boho1wyz.fsf@mail.jurta.org> <87ligozwx1.fsf@mail.jurta.org> <87y5knpm4r.fsf@mail.jurta.org> <871uif3xjh.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1346953194 20637 80.91.229.3 (6 Sep 2012 17:39:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 17:39:54 +0000 (UTC) Cc: 10885@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 19:39:56 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9g3Y-0007tK-EL for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 19:39:56 +0200 Original-Received: from localhost ([::1]:43682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9g3V-0004jQ-EN for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 13:39:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9g3S-0004jL-RW for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:39:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9g3R-0003Bz-J1 for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:39:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9g3R-0003Bu-Eq for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:39:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T9g3e-0002gU-As for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Sep 2012 17:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10885 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10885-submit@debbugs.gnu.org id=B10885.134695317110276 (code B ref 10885); Thu, 06 Sep 2012 17:40:02 +0000 Original-Received: (at 10885) by debbugs.gnu.org; 6 Sep 2012 17:39:31 +0000 Original-Received: from localhost ([127.0.0.1]:44597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9g38-0002fh-CF for submit@debbugs.gnu.org; Thu, 06 Sep 2012 13:39:30 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:50918) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9g34-0002fW-Iu for 10885@debbugs.gnu.org; Thu, 06 Sep 2012 13:39:27 -0400 Original-Received: by obbwc20 with SMTP id wc20so2787995obb.3 for <10885@debbugs.gnu.org>; Thu, 06 Sep 2012 10:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xfOPQkoaX17MPRxwdG34VXbLRrssNbtQsuCElUvswMI=; b=bvECNUQZUFfnSF3KOt0chcef2GS3896+GlbxcLBhueFLmCmVPGXKTiNBR+u5UZhpRm lg+eDuLb8kdcclu58nyH9LFbWrxwUwD71P3ToqtXkAxWBZcj8XJOeEyFmWCxo5sq22CM ennFwjqVv1z9YtFjS1634iPUD5cAq2IzYSO67GJ40ywRdxru+HUonJ/geAUsYoSFuN0E FxK/cRpAyOyQt/BtiIAfMhrZ+bhUMDrZvf2RECUcun0oZmw1iFA6x/471cgYSfX1OHVU wxhh2R1IgZjJT82TydBBZVyb7qYEAbNizhzab4EJY+Eo6Mi1szWKC+IuY9mIouIQd1Uf EAXA== Original-Received: by 10.182.89.102 with SMTP id bn6mr3255536obb.7.1346953152770; Thu, 06 Sep 2012 10:39:12 -0700 (PDT) Original-Received: by 10.60.50.130 with HTTP; Thu, 6 Sep 2012 10:39:12 -0700 (PDT) In-Reply-To: <871uif3xjh.fsf@mail.jurta.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63869 Archived-At: On Thu, Sep 6, 2012 at 6:50 PM, Juri Linkov wrote: >> 1. You've defined two separate variables (`isearch-lax-whitespace' >> and `isearch-regexp-lax-whitespace') to enable/disable the lax >> whitespace matching in search commands: one for basic search commands >> and the other for regexp search commands. But there is only one >> similar variable (replace-lax-whitespace) which controls both basic >> and regexp replace commands. Why this inconsistency? I.e. why not >> define also a `replace-regexp-lax-whitespace' variable? > > `isearch-regexp-lax-whitespace' was necessary to provide > backward-compatibility for old functionality. Very likely > it will be declared obsolete. Ah Good. I think we all agree that this feature is confusing/unnecessary in regexp search & replace. > But of course, it would be better > to have `replace-regexp-lax-whitespace' for consistency until > they both will be declared obsolete simultaneously. > >> 2. While in an incremental search commands, it is possible to toggle >> the value of the corresponding variable with `M-s SPC'. Why not >> having the same possibility in incremental replace commands? > > Isearch has different implementation than query-replace. > query-replace uses the normal minibuffer to read a string to replace. > Implementing `M-s SPC' for it means more trouble: > `query-replace-read-from' should set the arg `keymap' of > `read-from-minibuffer' to a new keymap with the `M-s SPC' keybinding > bound to a function to toggle the value of the defcustom option. But I meant to bind `M-s SPC' not while reading the arguments, but right after that, i.e. during the interactive replacing. >> 3. Many users will want a consistent behavior wrt whitespace-matching >> between (regexp) search and (regexp) replace commands. So, why not >> allowing to "connect" the corresponding variables? I.e. why not >> defining some special value for `replace-lax-whitespace' and >> `replace-regexp-lax-whitespace' which means "get the value from the >> corresponding search variable" ? > > When it will be decided that isearch and query-replace should have > the same default values, then `replace-lax-whitespace' could inherit > its default value from `isearch-lax-whitespace'. But I don't meant that. What I want is the possibility to have these two variables "synchronized" or "connected" at every moment, even after toggling its value with `M-s SPC'. IOW: make Isearch and query-replace _share_ the same setting (at every moment). -- Dani Moncayo