From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 09:04:05 2012 Received: (at submit) by debbugs.gnu.org; 27 Sep 2012 13:04:05 +0000 Received: from localhost ([127.0.0.1]:58214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THDl6-0003Dn-Q4 for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:04:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46148) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THDl4-0003Dg-NV for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:04:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THDkx-0003GN-QE for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:03:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THDkx-0003GJ-MS for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:03:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THDks-0004FF-QY for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2012 09:03:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THDkm-0003EQ-6q for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2012 09:03:50 -0400 Received: from mail-oa0-f41.google.com ([209.85.219.41]:38348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THDkm-0003EK-21 for bug-gnu-emacs@gnu.org; Thu, 27 Sep 2012 09:03:44 -0400 Received: by oagk14 with SMTP id k14so2036290oag.0 for ; Thu, 27 Sep 2012 06:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/teN/mP+ZRiWqclmnWHE35AjyYPFcRpXG0MCBDuX6j0=; b=1KcHqKvFwmrBWv07bZc1uGG1hdScQPlj6azh3a1UG1qQOXtwDpMXy+SfXpeRC2VluI DQV4vd+KogoYqMPGcsHY06rWIXkq/hNfIdscoyMg1xBn4xZMwJGU/H/smJrdDIoO1t+a 7JMJ/FGARYBtoh5KYzq70IHRtjiR5jcyiN2TuQFn/p0bvsjpzCkSKNDKbVkRVOZ8tIkJ INvK4WQydWfuEpm2yilnmL8hcR9JSE2/KwlYo0xKReMeEg8bY8Ks/2+xJq+SwJLAzcYa NGIjvAdqtTlBQ+cLuGX5VZSVa3/4DvBwku+52YII7BW42X7NU7d9poBjCpVlQ5Spn0a8 ypxw== MIME-Version: 1.0 Received: by 10.182.40.34 with SMTP id u2mr3135753obk.7.1348751022975; Thu, 27 Sep 2012 06:03:42 -0700 (PDT) Received: by 10.60.4.132 with HTTP; Thu, 27 Sep 2012 06:03:42 -0700 (PDT) Date: Thu, 27 Sep 2012 15:03:42 +0200 Message-ID: Subject: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) >From emacs -Q: M-< C-s t h i s M-% Expected result: the query-replace command ask me for both the "from" and the "to" strings. (note that the variable `query-replace-interactive' is nil). Observed result: the command uses the last search string ("this") as the "from" string and ask me only for the "to" string. In GNU Emacs 24.2.50.1 (i386-mingw-nt6.1.7601) of 2012-09-23 on DANI-PC Bzr revision: 110171 rgm@gnu.org-20120923184055-lgm2en2gxt2lkqr1 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -I../../libs/libxpm-3.5.8/include -I../../libs/libxpm-3.5.8/src -I../../libs/libpng-1.4.10 -I../../libs/zlib-1.2.6 -I../../libs/giflib-4.1.4-1/include -I../../libs/jpeg-6b-4/include -I../../libs/tiff-3.8.2-1/include -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2 -I../../libs/gnutls-3.0.16/include -I../../libs/libiconv-1.14-2-mingw32-dev/include' Important settings: value of $LANG: ESN locale-coding-system: cp1252 default enable-multibyte-characters: t -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 09:41:44 2012 Received: (at 12526) by debbugs.gnu.org; 27 Sep 2012 13:41:44 +0000 Received: from localhost ([127.0.0.1]:58232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THELY-00045T-1e for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:41:44 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:56135) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THELV-00045J-77 for 12526@debbugs.gnu.org; Thu, 27 Sep 2012 09:41:41 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLT4/2dsb2JhbABEsEiDSYEIghYBBVYjEAsOJhIUGA0kiCG6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="200112711" Received: from 69-196-180-248.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.248]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Sep 2012 09:41:36 -0400 Received: by pastel.home (Postfix, from userid 20848) id D8CCD5938D; Thu, 27 Sep 2012 09:41:35 -0400 (EDT) From: Stefan Monnier To: Dani Moncayo Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected Message-ID: References: Date: Thu, 27 Sep 2012 09:41:35 -0400 In-Reply-To: (Dani Moncayo's message of "Thu, 27 Sep 2012 15:03:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> From emacs -Q: M-< C-s t h i s M-% > Expected result: the query-replace command ask me for both the "from" > and the "to" strings. (note that the variable > `query-replace-interactive' is nil). > Observed result: the command uses the last search string ("this") as > the "from" string and ask me only for the "to" string. That's a feature independent from query-replace-interactive, indeed. If you want to be prompted, then terminate your search (e.g. with RET) before hitting M-%. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 09:49:13 2012 Received: (at 12526) by debbugs.gnu.org; 27 Sep 2012 13:49:13 +0000 Received: from localhost ([127.0.0.1]:58241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THESm-0004Ga-GK for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:49:13 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:51596) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THESj-0004GS-TW for 12526@debbugs.gnu.org; Thu, 27 Sep 2012 09:49:10 -0400 Received: by obqv19 with SMTP id v19so1819929obq.3 for <12526@debbugs.gnu.org>; Thu, 27 Sep 2012 06:49:05 -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=EsM/RZxYZJNLlrkxCrWw6222a7hvt5qC5m1eECo9rhc=; b=HJpD3wRWOzxBpLWlIfuo4iuVHyQaki4NwWCZBjtHlA7zzoksFrEyxWfHNkY5gQffB+ 57Ln39u5g3d69k3NIi3p3xM0zb6GERb/9yHTbxIL6mwfK6EA0eFqq1ke0A/JZJl5CdfA mizGIwDpxgd8MA1WRrcA6j/P3k+EI+8/EBSdaTHQNZdDLTV42VRB17YhV2RMhwqBRrx9 DGOjIgM7vJyAADt3Nl1GK3Cke1trRAzp/NQxlcXgAzBzDIzvZ7BCDhuRqbkrMSwJprWe yNrs9B+Xjh4z4EiR60jqAzXCJOnEX0EdAZvywzIGVVreU5vHRPIikhNVi89BZjOPKEF9 SJgA== MIME-Version: 1.0 Received: by 10.182.40.34 with SMTP id u2mr3253332obk.7.1348753745164; Thu, 27 Sep 2012 06:49:05 -0700 (PDT) Received: by 10.60.4.132 with HTTP; Thu, 27 Sep 2012 06:49:05 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Sep 2012 15:49:05 +0200 Message-ID: Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: Stefan Monnier Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Thu, Sep 27, 2012 at 3:41 PM, Stefan Monnier wrote: >>> From emacs -Q: M-< C-s t h i s M-% >> Expected result: the query-replace command ask me for both the "from" >> and the "to" strings. (note that the variable >> `query-replace-interactive' is nil). >> Observed result: the command uses the last search string ("this") as >> the "from" string and ask me only for the "to" string. > > That's a feature independent from query-replace-interactive, indeed. > If you want to be prompted, then terminate your search (e.g. with RET) > before hitting M-%. Ah, thanks. Is that feature documented somewhere? Is there a way to disable that feature? -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 27 09:52:42 2012 Received: (at 12526) by debbugs.gnu.org; 27 Sep 2012 13:52:43 +0000 Received: from localhost ([127.0.0.1]:58245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THEW9-0004Le-Kt for submit@debbugs.gnu.org; Thu, 27 Sep 2012 09:52:42 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:58430) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THEW7-0004LX-HN for 12526@debbugs.gnu.org; Thu, 27 Sep 2012 09:52:40 -0400 Received: by oagn5 with SMTP id n5so1841722oag.3 for <12526@debbugs.gnu.org>; Thu, 27 Sep 2012 06:52:33 -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=31EYEF3scOurigUzOQvI3fRleBufztg6Pw7IgpjAXl4=; b=OzQkAVscMXzyZp+sXeBZux1vttRSTpfKiFPyvJ2rrQ1Os/47UJH00lMbRjUXbmotno uVGyiZRjZ6gmU1QLI2CGZ299x01psD15D4fcUF771Tws7BhWPsu87f8A6hasUCTHTjgE zPf0Xu9804jUg/JIhHZqb2+rmYVSxmDPMJv8BFfbCBzux0qduawkN7m7jGHuLqKfOv9o mx0X1bUh9O6tgi+VbA/TP0RBUhJWm2WUlLR9XDYuQBcr6wHn52Gr3qiJ9Xtnklo5I6WB Az5RCIlVBbYykb+CpLzSHvX7oebY6pp2YGeEh3MHd4LsqMfLmZIwAzlkA6uFZI4NDiUG 8yPQ== MIME-Version: 1.0 Received: by 10.60.169.148 with SMTP id ae20mr3145679oec.53.1348753953665; Thu, 27 Sep 2012 06:52:33 -0700 (PDT) Received: by 10.60.4.132 with HTTP; Thu, 27 Sep 2012 06:52:33 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Sep 2012 15:52:33 +0200 Message-ID: Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: Stefan Monnier Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> That's a feature independent from query-replace-interactive, indeed. >> If you want to be prompted, then terminate your search (e.g. with RET) >> before hitting M-%. > > Ah, thanks. > > Is that feature documented somewhere? BTW: I think it should be documented (at least) in the docstring of query-replace. > Is there a way to disable that feature? -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 28 04:03:17 2012 Received: (at 12526) by debbugs.gnu.org; 28 Sep 2012 08:03:17 +0000 Received: from localhost ([127.0.0.1]:59751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THVXZ-0006LM-7G for submit@debbugs.gnu.org; Fri, 28 Sep 2012 04:03:17 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:65279) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THVXW-0006LE-4c for 12526@debbugs.gnu.org; Fri, 28 Sep 2012 04:03:15 -0400 Received: by obqv19 with SMTP id v19so2712070obq.3 for <12526@debbugs.gnu.org>; Fri, 28 Sep 2012 01:03:05 -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=1hKtvo2d7uELUnFAqKyVT5TooM4NeYEz/xgEMYHRId0=; b=v6r28jaMq+lETUrBvPt7ME7SWJc3N9d/WYVlBQuEbmb8WrGUoPa6gJ+MTj6QVa4aBQ a2Gg/jF08vgm6D9umNMzGGaQijioTQvueuYIsHDAuBJalvjCWgSUxHQ32WFb3u7UPJBZ ABZHWncj9FNOGfVeFwtiX3jerwRUAjzOhe8Omd/zb6x3LnxQK2jnt4/bap8UlNz4d6Cp Wu3RLKgNH0c/DtqU14e3kCGBOXzCRYmYnff1QXWLyyTZjqt3BOSWfhIiuL5R7Nttd/ZF 9FGbFWc8FymJ43gGw+GmYOeiLE/q+g7pFWNqAJ4uZmOkZOiChq4DOBb/zjiNgY8p5YZe IdIw== MIME-Version: 1.0 Received: by 10.60.30.168 with SMTP id t8mr5334660oeh.89.1348819385243; Fri, 28 Sep 2012 01:03:05 -0700 (PDT) Received: by 10.60.4.132 with HTTP; Fri, 28 Sep 2012 01:03:05 -0700 (PDT) In-Reply-To: References: Date: Fri, 28 Sep 2012 10:03:05 +0200 Message-ID: Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: Stefan Monnier Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> That's a feature independent from query-replace-interactive, indeed. >> If you want to be prompted, then terminate your search (e.g. with RET) >> before hitting M-%. > > Ah, thanks. > > Is that feature documented somewhere? > Is there a way to disable that feature? What about (slightly) altering the current semantics of `query-replace-interactive' so that the "from" string in query-replace is taken from: * if "nil" --> from the minibuffer. * if "t" --> from the last search string (if any), else from the minibuffer. * if "any other non-nil value" --> from the last search string, if `query-replace' was invoked from an I-search session, and else from the minibuffer. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 02 16:45:01 2012 Received: (at 12526) by debbugs.gnu.org; 2 Oct 2012 20:45:02 +0000 Received: from localhost ([127.0.0.1]:38134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJ9Kv-0000iX-8m for submit@debbugs.gnu.org; Tue, 02 Oct 2012 16:45:01 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:47460 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJ9Kr-0000iN-Kp for 12526@debbugs.gnu.org; Tue, 02 Oct 2012 16:44:58 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 62AF5451CA54; Tue, 2 Oct 2012 13:44:20 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected Organization: JURTA References: Date: Tue, 02 Oct 2012 23:37:10 +0300 In-Reply-To: (Dani Moncayo's message of "Thu, 27 Sep 2012 15:49:05 +0200") Message-ID: <877gr8obbs.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) >> That's a feature independent from query-replace-interactive, indeed. >> If you want to be prompted, then terminate your search (e.g. with RET) >> before hitting M-%. > > Ah, thanks. > > Is that feature documented somewhere? Yes, it is documented in the Info node (info "(emacs) Special Isearch") > Is there a way to disable that feature? Yes, you can easily disable this feature by adding this keybinding to your init file: (define-key isearch-mode-map [?\M-%] (lambda () (interactive) (isearch-exit) ;; I'm too lazy to terminate search with RET. (call-interactively 'query-replace))) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 03 06:00:47 2012 Received: (at 12526) by debbugs.gnu.org; 3 Oct 2012 10:00:47 +0000 Received: from localhost ([127.0.0.1]:38653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJLl0-0002uG-FI for submit@debbugs.gnu.org; Wed, 03 Oct 2012 06:00:46 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:43593) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJLkx-0002u7-84 for 12526@debbugs.gnu.org; Wed, 03 Oct 2012 06:00:44 -0400 Received: by eekd4 with SMTP id d4so3599765eek.3 for <12526@debbugs.gnu.org>; Wed, 03 Oct 2012 03:00:05 -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=GYNGdUlJiZRmrXDyuDU4ZKMzyECZiiIjdDyo1v9inl8=; b=QoSONZFCLzwcLbipQ/HU+cE/F7THtheWf7LDRUe9YeZOezrQaXSsFTYB1sJuAfy628 5fShxuIeioJM2xe50bVTv50U91XcOmTavtpVJ5VSirevbznvaPvjFluRRLF83jVLe2XV PlR2MrO32ncNRM6wjSB13Zjp6DhSx5zd6kd5pqAkIxOY+8ZEN4UAqMbL/dvmr/L89ssh dNtz6exR6DvblW+dRyP5e2R4rguQzsEl7+pMvUbYApGEPexhINcJVghHg/hLH+twiOmj Eju/kgqNQg7a3XUVg4AKHjV23BzQEydbnG3lkbXVC6zq6DovRpQAojcUrpGs3XLyOrW+ 7wbg== MIME-Version: 1.0 Received: by 10.14.224.135 with SMTP id x7mr1854054eep.34.1349258405214; Wed, 03 Oct 2012 03:00:05 -0700 (PDT) Received: by 10.14.203.135 with HTTP; Wed, 3 Oct 2012 03:00:05 -0700 (PDT) In-Reply-To: <877gr8obbs.fsf@mail.jurta.org> References: <877gr8obbs.fsf@mail.jurta.org> Date: Wed, 3 Oct 2012 12:00:05 +0200 Message-ID: Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: Juri Linkov Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) >> Is that feature documented somewhere? > > Yes, it is documented in the Info node > (info "(emacs) Special Isearch") Ok, but definitely the docstring of query-replace should be updated, because currently it is misleading: If `query-replace-interactive' is non-nil, the last incremental search string is used as FROM-STRING--you don't have to specify it with the minibuffer. This paragraph is incomplete (and therefore misleading) because it doesn't explain the behavior I complained about. Also, the docstring of `query-replace-interactive' should be update for the same reason. >> Is there a way to disable that feature? > > Yes, you can easily disable this feature > by adding this keybinding to your init file: > > (define-key isearch-mode-map [?\M-%] > (lambda () > (interactive) > (isearch-exit) ;; I'm too lazy to terminate search with RET. > (call-interactively 'query-replace))) This is an ugly solution, IMO. I don't want to define a new command and bind M-% to it; I'd like to set some user-option in my init file so that query-replace never assumes nothing about the "from" string. BTW: I think that a much better approach would be to add the last search string to the list of default arguments, so that, after an Isearch, I could do `M-% M-n' if I wanted to retrieve that last search string. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 03 20:12:43 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 00:12:43 +0000 Received: from localhost ([127.0.0.1]:51950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJZ3S-00037K-HU for submit@debbugs.gnu.org; Wed, 03 Oct 2012 20:12:43 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:34825 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJZ3P-000376-N0 for 12526@debbugs.gnu.org; Wed, 03 Oct 2012 20:12:41 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 335BF451CD1A; Wed, 3 Oct 2012 17:12:36 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected Organization: JURTA References: <877gr8obbs.fsf@mail.jurta.org> Date: Thu, 04 Oct 2012 02:38:11 +0300 In-Reply-To: (Dani Moncayo's message of "Wed, 3 Oct 2012 12:00:05 +0200") Message-ID: <878vbnnmmc.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) >>> Is that feature documented somewhere? >> >> Yes, it is documented in the Info node >> (info "(emacs) Special Isearch") > > Ok, but definitely the docstring of query-replace should be updated, > because currently it is misleading: > If `query-replace-interactive' is non-nil, the last incremental search > string is used as FROM-STRING--you don't have to specify it with the > minibuffer. Thanks for the suggestion. I fixed this docstring in the patch below. > Also, the docstring of `query-replace-interactive' should be update > for the same reason. Since it's easy to do `C-s C-s M-%' to replace the last search string, the option `query-replace-interactive' is useless now and can be declared obsolete. Another reason to remove it is your suggestion below to use `M-% M-n' as its replacement. >> (define-key isearch-mode-map [?\M-%] >> (lambda () >> (interactive) >> (isearch-exit) ;; I'm too lazy to terminate search with RET. >> (call-interactively 'query-replace))) > > This is an ugly solution, IMO. I don't want to define a new command > and bind M-% to it; If you don't want to define a new command, then you can add just one line to your init file: (define-key isearch-mode-map [?\M-%] 'isearch-other-meta-char) > I'd like to set some user-option in my init file so that query-replace > never assumes nothing about the "from" string. If you don't want to use `define-key' for configuration purposes, we might consider using an user option, but not `query-replace-interactive' that is irrelevant for isearch. Such an option has been discussed but not yet implemented. To get an idea how this option could work, please see bug#9706 and its related thread on emacs-devel. With this new option, you will be able to define any command (not only `query-replace') to bypass its isearch keybinding to its original command. > BTW: I think that a much better approach would be to add the last > search string to the list of default arguments, so that, after an > Isearch, I could do `M-% M-n' if I wanted to retrieve that last search > string. Two weeks ago I added the last search string to `C-M-% M-n'. But it's still missing for `M-% M-n'. Thank you for noticing this omission. This is fixed in the patch below. This is another reason to declare `query-replace-interactive' obsolete because now there are two functional replacements for it as is documented in the fixed docstrings. Also I verified that "Query replace (default foo -> bar): RET" still works correctly and empty input redoes the last replace. === modified file 'lisp/replace.el' --- lisp/replace.el 2012-09-25 04:13:02 +0000 +++ lisp/replace.el 2012-10-03 23:38:00 +0000 @@ -62,6 +62,10 @@ (defvar query-replace-defaults nil (defvar query-replace-interactive nil "Non-nil means `query-replace' uses the last search string. That becomes the \"string to replace\".") +(make-obsolete-variable 'query-replace-interactive + "use `M-n' in the minibuffer +that asks for the string to replace, or run `query-replace' +from Isearch by using a key sequence like `C-s C-s M-%'." "24.3") (defcustom query-replace-from-history-variable 'query-replace-history "History list to use for the FROM argument of `query-replace' commands. @@ -125,8 +129,6 @@ (defun query-replace-read-from (prompt r "Query and return the `from' argument of a query-replace operation. The return value can also be a pair (FROM . TO) indicating that the user wants to replace FROM with TO." - (if query-replace-interactive - (car (if regexp-flag regexp-search-ring search-ring)) (let* ((history-add-new-input nil) (prompt (if query-replace-defaults @@ -142,7 +144,8 @@ (defun query-replace-read-from (prompt r (if regexp-flag (read-regexp prompt nil query-replace-from-history-variable) (read-from-minibuffer - prompt nil nil nil query-replace-from-history-variable nil t))))) + prompt nil nil nil query-replace-from-history-variable + (car (if regexp-flag regexp-search-ring search-ring)) t))))) (if (and (zerop (length from)) query-replace-defaults) (cons (car query-replace-defaults) (query-replace-compile-replacement @@ -158,7 +161,7 @@ (defun query-replace-read-from (prompt r ((string= match "\\t") (message "Note: `\\t' here doesn't match a tab; to do that, just type TAB"))) (sit-for 2))) - from)))) + from))) (defun query-replace-compile-replacement (to regexp-flag) "Maybe convert a regexp replacement TO to Lisp. @@ -231,9 +234,11 @@ (defun query-replace (from-string to-str In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of the buffer. -If `query-replace-interactive' is non-nil, the last incremental search -string is used as FROM-STRING--you don't have to specify it with the -minibuffer. +Use \\\\[next-history-element] \ +to pull the last incremental search string to the minibuffer +that reads FROM-STRING, or start `query-replace' from +incremental search with a key sequence like `C-s C-s M-%' +to use its current search string as the string to replace. Matching is independent of case if `case-fold-search' is non-nil and FROM-STRING has no uppercase letters. Replacement transfers the case @@ -279,9 +284,11 @@ (defun query-replace-regexp (regexp to-s In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of the buffer. -If `query-replace-interactive' is non-nil, the last incremental search -regexp is used as REGEXP--you don't have to specify it with the -minibuffer. +Use \\\\[next-history-element] \ +to pull the last incremental search regexp to the minibuffer +that reads REGEXP, or start `query-replace-regexp' from +incremental search with a key sequence like `C-M-s C-M-s C-M-%' +to use its current search regexp as the regexp to replace. Matching is independent of case if `case-fold-search' is non-nil and REGEXP has no uppercase letters. Replacement transfers the case @@ -364,9 +371,9 @@ (defun query-replace-regexp-eval (regexp In Transient Mark mode, if the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of the buffer. -If `query-replace-interactive' is non-nil, the last incremental search -regexp is used as REGEXP--you don't have to specify it with the -minibuffer. +Use \\\\[next-history-element] \ +to pull the last incremental search regexp to the minibuffer +that reads REGEXP. Preserves case in each replacement if `case-replace' and `case-fold-search' are non-nil and REGEXP has no uppercase letters. @@ -417,19 +424,16 @@ (defun map-query-replace-regexp (regexp Non-interactively, TO-STRINGS may be a list of replacement strings. -If `query-replace-interactive' is non-nil, the last incremental search -regexp is used as REGEXP--you don't have to specify it with the minibuffer. +Use \\\\[next-history-element] \ +to pull the last incremental search regexp to the minibuffer +that reads REGEXP. A prefix argument N says to use each replacement string N times before rotating to the next. Fourth and fifth arg START and END specify the region to operate on." (interactive - (let* ((from (if query-replace-interactive - (car regexp-search-ring) - (read-from-minibuffer "Map query replace (regexp): " - nil nil nil - query-replace-from-history-variable - nil t))) + (let* ((from (read-regexp "Map query replace (regexp): " nil + query-replace-from-history-variable)) (to (read-from-minibuffer (format "Query replace %s with (space-separated strings): " (query-replace-descr from)) @@ -475,9 +479,9 @@ (defun replace-string (from-string to-st only matches surrounded by word boundaries. Fourth and fifth arg START and END specify the region to operate on. -If `query-replace-interactive' is non-nil, the last incremental search -string is used as FROM-STRING--you don't have to specify it with the -minibuffer. +Use \\\\[next-history-element] \ +to pull the last incremental search string to the minibuffer +that reads FROM-STRING. This function is usually the wrong thing to use in a Lisp program. What you probably want is a loop like this: @@ -540,8 +544,9 @@ (defun replace-regexp (regexp to-string text, TO-STRING is actually made a list instead of a string. Use \\[repeat-complex-command] after this command for details. -If `query-replace-interactive' is non-nil, the last incremental search -regexp is used as REGEXP--you don't have to specify it with the minibuffer. +Use \\\\[next-history-element] \ +to pull the last incremental search regexp to the minibuffer +that reads REGEXP. This function is usually the wrong thing to use in a Lisp program. What you probably want is a loop like this: From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 04:39:45 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 08:39:45 +0000 Received: from localhost ([127.0.0.1]:52309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJgy9-0006p9-6D for submit@debbugs.gnu.org; Thu, 04 Oct 2012 04:39:45 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:55805) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJgy6-0006ow-5R for 12526@debbugs.gnu.org; Thu, 04 Oct 2012 04:39:43 -0400 Received: by mail-ob0-f172.google.com with SMTP id v19so221024obq.3 for <12526@debbugs.gnu.org>; Thu, 04 Oct 2012 01:39:32 -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=wRokeaS4RLTaAOLvxxWXMdht+AqGVeY3Z2YeohDBzog=; b=f6IYw2ijHvSJLHFp4KkFpONIhGSwAk2W+j/0qKbr+yl7Guxn/qvMMZn9kW7TC2ZFU8 7UqrgyRDfz9zqP/y/QRR6Diswzw9x775ujUMaBG+J5b+oU4Ne9onOBKrHIUrMdG0WlYl 8PfgCg5OR2iFil7VHF8pHju+fuUwkhJJis6wXGCHI43UkTvJwRKD6F+EoaaCoBPL/6mr f4avJf8R0Fdjrud5qxN6awa2yyWZiX2COIOiTLZKKEqOp1VKEG25JJhsVf0qdgQtO6UK 65VoFiztQEv3JcR9Fj9+BHGFA0TM9+Mj2RJKxCDyC2vxncEt3KosGgAvswry5hTMqeY4 YPQA== MIME-Version: 1.0 Received: by 10.60.30.168 with SMTP id t8mr3702151oeh.89.1349339972424; Thu, 04 Oct 2012 01:39:32 -0700 (PDT) Received: by 10.60.4.132 with HTTP; Thu, 4 Oct 2012 01:39:32 -0700 (PDT) In-Reply-To: <878vbnnmmc.fsf@mail.jurta.org> References: <877gr8obbs.fsf@mail.jurta.org> <878vbnnmmc.fsf@mail.jurta.org> Date: Thu, 4 Oct 2012 10:39:32 +0200 Message-ID: Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: Juri Linkov Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) >>>> Is that feature documented somewhere? >>> >>> Yes, it is documented in the Info node >>> (info "(emacs) Special Isearch") >> >> Ok, but definitely the docstring of query-replace should be updated, >> because currently it is misleading: >> If `query-replace-interactive' is non-nil, the last incremental search >> string is used as FROM-STRING--you don't have to specify it with the >> minibuffer. > > Thanks for the suggestion. I fixed this docstring in the patch below. Good, thanks. >> Also, the docstring of `query-replace-interactive' should be update >> for the same reason. > > Since it's easy to do `C-s C-s M-%' to replace the last search string, > the option `query-replace-interactive' is useless now and can be > declared obsolete. Another reason to remove it is your suggestion below > to use `M-% M-n' as its replacement. As I said before, I think it is unsuitable to assume that the user always wants to use the last search string as "from" string in query-replace (when query-replace is invoked from Isearch). It is much better to let the user decide, i.e., to always prompt for the "from" string in the minibuffer. If the user wants to use the last search string, it is pretty easy to type `M-n'. At least, please, make this behavior optional. >> I'd like to set some user-option in my init file so that query-replace >> never assumes nothing about the "from" string. > > If you don't want to use `define-key' for configuration purposes, > we might consider using an user option, but not `query-replace-interactive' > that is irrelevant for isearch. > > Such an option has been discussed but not yet implemented. > To get an idea how this option could work, please see bug#9706 > and its related thread on emacs-devel. With this new option, > you will be able to define any command (not only `query-replace') > to bypass its isearch keybinding to its original command. I fail to see exactly how that is related to the problem discussed here, but I think that the proper fix here is simpler (see my previous comment). >> BTW: I think that a much better approach would be to add the last >> search string to the list of default arguments, so that, after an >> Isearch, I could do `M-% M-n' if I wanted to retrieve that last search >> string. > > Two weeks ago I added the last search string to `C-M-% M-n'. > But it's still missing for `M-% M-n'. Thank you for noticing this omission. > This is fixed in the patch below. This is another reason > to declare `query-replace-interactive' obsolete because now > there are two functional replacements for it as is documented > in the fixed docstrings. > > Also I verified that "Query replace (default foo -> bar): RET" > still works correctly and empty input redoes the last replace. Ok, thank you for working on this. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 05:15:51 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 09:15:51 +0000 Received: from localhost ([127.0.0.1]:52364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJhX5-0007ck-DE for submit@debbugs.gnu.org; Thu, 04 Oct 2012 05:15:51 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:52081 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJhX3-0007cd-1Q for 12526@debbugs.gnu.org; Thu, 04 Oct 2012 05:15:49 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 05B49451CCFC; Thu, 4 Oct 2012 02:15:42 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected Organization: JURTA References: <877gr8obbs.fsf@mail.jurta.org> <878vbnnmmc.fsf@mail.jurta.org> Date: Thu, 04 Oct 2012 12:09:17 +0300 Message-ID: <87d30y7gea.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > As I said before, I think it is unsuitable to assume that the user > always wants to use the last search string as "from" string in > query-replace (when query-replace is invoked from Isearch). `query-replace' is not invoked from Isearch. `isearch-query-replace' is invoked from Isearch. So your wish is about invoking `query-replace' instead of `isearch-query-replace' from Isearch. Your wish is not different from other similar desires e.g.: "I want `M-e' in Isearch to exit Isearch and call `forward-sentence' instead of editing the search string" or "I want `C-y' in Isearch to exit Isearch and call `yank' instead of pulling string from the kill ring into the search string" and the same can be said for other Isearch keybindings too. All of them could be solved at once by implementing a new feature that will bypass Isearch keybindings to original commands. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 07:45:53 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 11:45:53 +0000 Received: from localhost ([127.0.0.1]:52467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJjsG-0003Qe-Fg for submit@debbugs.gnu.org; Thu, 04 Oct 2012 07:45:53 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:48369) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJjsD-0003QR-Iy for 12526@debbugs.gnu.org; Thu, 04 Oct 2012 07:45:51 -0400 Received: by mail-ob0-f172.google.com with SMTP id v19so348409obq.3 for <12526@debbugs.gnu.org>; Thu, 04 Oct 2012 04:45:38 -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=LycAG/otSR8c+u5l92EfaxjwrkRTfbfY1OjToUoU9UE=; b=eRhSb0sZkArs4Z3qp/r+Cpq0ZNSC3Q6rT8YDOojXajvdU9XYJsHa/Aqqm+k4z30v4k NYA9nmDXMg4au7krl0omW/7Rj5+zcT/BRX+i5XEtrqy+t/yqMnjayRgFGjnnm75LyO9K k8J/rlCazxtWex5dO2BBL/fGPVa+HGeTOYL9QML0j6nZv85WFgOa2ULX4SHGxEu3hu8k I5KyhRuC1OsYNKBZLhlUW0XJwx7ln8A2nSTPttoPm4+3hsY0Ct41BHOoRlo6EdOSrJUc WKwqx7GwLKTHFAVejKJVlrkVd8l/bpTESixrUHIbhSTxkCWoHVmyM379Lk7fPwwQH8aE 4Aig== MIME-Version: 1.0 Received: by 10.182.144.100 with SMTP id sl4mr4116199obb.14.1349351138432; Thu, 04 Oct 2012 04:45:38 -0700 (PDT) Received: by 10.60.4.132 with HTTP; Thu, 4 Oct 2012 04:45:38 -0700 (PDT) In-Reply-To: <87d30y7gea.fsf@mail.jurta.org> References: <877gr8obbs.fsf@mail.jurta.org> <878vbnnmmc.fsf@mail.jurta.org> <87d30y7gea.fsf@mail.jurta.org> Date: Thu, 4 Oct 2012 13:45:38 +0200 Message-ID: Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected From: Dani Moncayo To: Juri Linkov Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) On Thu, Oct 4, 2012 at 11:09 AM, Juri Linkov wrote: >> As I said before, I think it is unsuitable to assume that the user >> always wants to use the last search string as "from" string in >> query-replace (when query-replace is invoked from Isearch). > > `query-replace' is not invoked from Isearch. > `isearch-query-replace' is invoked from Isearch. Ah, right. I didn't notice it. I thought that M-% wasn't rebound in Isearch. > So your wish is about invoking `query-replace' > instead of `isearch-query-replace' from Isearch. I think so. What is the difference between these two commands, apart from the one involving the "from" string? > Your wish is not different from other similar desires e.g.: > "I want `M-e' in Isearch to exit Isearch and call `forward-sentence' > instead of editing the search string" or "I want `C-y' in Isearch > to exit Isearch and call `yank' instead of pulling string from the kill ring > into the search string" and the same can be said for other Isearch > keybindings too. > > All of them could be solved at once by implementing a new feature > that will bypass Isearch keybindings to original commands. Ok, thanks for clarifying this. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 10:15:34 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 14:15:34 +0000 Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJmD7-0007C8-OB for submit@debbugs.gnu.org; Thu, 04 Oct 2012 10:15:34 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:31580) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJmD6-0007Bw-3D for 12526@debbugs.gnu.org; Thu, 04 Oct 2012 10:15:32 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q94EFKEj006726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Oct 2012 14:15:21 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q94EFJk1005708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Oct 2012 14:15:20 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q94EFJfB032185; Thu, 4 Oct 2012 09:15:19 -0500 Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Oct 2012 07:15:19 -0700 From: "Drew Adams" To: "'Juri Linkov'" , "'Dani Moncayo'" References: <877gr8obbs.fsf@mail.jurta.org><878vbnnmmc.fsf@mail.jurta.org> <87d30y7gea.fsf@mail.jurta.org> Subject: RE: bug#12526: 24.2.50; `query-replace-interactive' not always respected Date: Thu, 4 Oct 2012 07:15:15 -0700 Message-ID: <6C64376EA99546178B88A2C9FB3DD1CB@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87d30y7gea.fsf@mail.jurta.org> Thread-Index: Ac2iEOd1yJXEm5wsTFCVr7KONOQeLwAKLxyQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) FWIW, in my local version, `query-replace-read-(from|to)' provides defaults (in order): a. The secondary selection, if option `search/replace-2nd-sel-as-default-flag' is non-nil. b. Using the (function) value of option `search/replace-default-fn'. This is a thing-at-point function such as `non-nil-symbol-name-nearest-point' or `word-at-point'. If it returns a list of values then they are all available as defaults. c. Using `completing-read', if option `replace-w-completion-flag' is non-nil, with default `query-replace-from-history-variable'. d. The usual way, from the history list. That gives the user a fair number of choices. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 15:32:09 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 19:32:09 +0000 Received: from localhost ([127.0.0.1]:54600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJr9U-0000Lf-CV for submit@debbugs.gnu.org; Thu, 04 Oct 2012 15:32:09 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:44687 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJr9R-0000LW-Tv for 12526@debbugs.gnu.org; Thu, 04 Oct 2012 15:32:06 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 11B5D451CCFC; Thu, 4 Oct 2012 12:31:56 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected Organization: JURTA References: <877gr8obbs.fsf@mail.jurta.org> <878vbnnmmc.fsf@mail.jurta.org> <87d30y7gea.fsf@mail.jurta.org> Date: Thu, 04 Oct 2012 22:30:30 +0300 In-Reply-To: (Dani Moncayo's message of "Thu, 4 Oct 2012 13:45:38 +0200") Message-ID: <87d30ydoiq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) >> So your wish is about invoking `query-replace' >> instead of `isearch-query-replace' from Isearch. > > I think so. What is the difference between these two commands, apart > from the one involving the "from" string? Another difference is that `isearch-query-replace' invokes replacements using the current Isearch state (case-sensitivity used in the current search, word delimiters, lax whitespace, etc.), so replacements will replace exactly the same matches as visited by Isearch. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 15:32:12 2012 Received: (at 12526) by debbugs.gnu.org; 4 Oct 2012 19:32:12 +0000 Received: from localhost ([127.0.0.1]:54602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJr9X-0000Ls-UR for submit@debbugs.gnu.org; Thu, 04 Oct 2012 15:32:12 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:44705 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJr9U-0000Ld-5k for 12526@debbugs.gnu.org; Thu, 04 Oct 2012 15:32:08 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 0BF8F451CD20; Thu, 4 Oct 2012 12:31:59 -0700 (PDT) From: Juri Linkov To: "Drew Adams" Subject: Re: bug#12526: 24.2.50; `query-replace-interactive' not always respected Organization: JURTA References: <877gr8obbs.fsf@mail.jurta.org> <878vbnnmmc.fsf@mail.jurta.org> <87d30y7gea.fsf@mail.jurta.org> <6C64376EA99546178B88A2C9FB3DD1CB@us.oracle.com> Date: Thu, 04 Oct 2012 22:30:40 +0300 In-Reply-To: <6C64376EA99546178B88A2C9FB3DD1CB@us.oracle.com> (Drew Adams's message of "Thu, 4 Oct 2012 07:15:15 -0700") Message-ID: <87a9w2doi7.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12526 Cc: 12526@debbugs.gnu.org, 'Dani Moncayo' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) > b. Using the (function) value of option `search/replace-default-fn'. This is a > thing-at-point function such as `non-nil-symbol-name-nearest-point' or > `word-at-point'. If it returns a list of values then they are all available as > defaults. I intended to do something like this after the feature freeze is over. But let's do this in a separate feature request. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 04 15:36:01 2012 Received: (at control) by debbugs.gnu.org; 4 Oct 2012 19:36:01 +0000 Received: from localhost ([127.0.0.1]:54607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJrDE-0000RH-C7 for submit@debbugs.gnu.org; Thu, 04 Oct 2012 15:36:00 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:47019 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJrDC-0000R8-P0 for control@debbugs.gnu.org; Thu, 04 Oct 2012 15:35:59 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2B582451CCFC for ; Thu, 4 Oct 2012 12:35:50 -0700 (PDT) From: Juri Linkov To: control@debbugs.gnu.org Subject: close 12526 Organization: JURTA Date: Thu, 04 Oct 2012 22:31:13 +0300 Message-ID: <874nmadocm.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) close 12526 thanks From unknown Sat Sep 13 08:55:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 02 Nov 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator