From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 22:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 22479@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145393368927456 (code B ref -1); Wed, 27 Jan 2016 22:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jan 2016 22:28:09 +0000 Received: from localhost ([127.0.0.1]:39006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOYZN-00078m-IN for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52846) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOYZM-00078Z-3R for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOYZG-0002VL-2a for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYZF-0002VH-VY for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYZF-0008TT-1X for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 17:28:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOYZA-0002U9-1e for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 17:28:00 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:54013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYZ9-0002U3-Pi for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 17:27:55 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5359321AF1 for ; Wed, 27 Jan 2016 17:27:55 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 27 Jan 2016 17:27:55 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=kfdPyZC2oWbutJ36jeFxsYpUH1I =; b=Wh4jpWk7zVYxJE6CiYeLhUqv8txZ8rmw/RR2nX5sMRYoUJzN/5QAgq0NAl/ 3q6uoz5N33+fee8V9AOj/fhkcDYo8mxzTFnpKKfkjOyRPDA6gjAEQccMRmR50Lho eLerjkeegRYQ2UFkasVfBm467wxxzbYCypPvTL5QazoOBhTI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=kf dPyZC2oWbutJ36jeFxsYpUH1I=; b=hwzWpsjbwmTlb5uekys7ArqJIQ2AQkz0R1 5peNUQjmXNf6vsBpCZ5/lb6/JadWakrUa1FtSdH3Pf+dfJE2+st4kyCIFcKtrXfe FCcYcroRKav0SiwvgBQEHUbZQCXop8ooSYbU7dFWo9wyoN6LE+Wik2m4WDukdVl9 PnelKMQEs= X-Sasl-enc: M9F4eGHXCchZY4M57hTSBlYziNWbSIf6VO35OAuQvkcL 1453933675 Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id F18506800FD for ; Wed, 27 Jan 2016 17:27:54 -0500 (EST) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aOYZ7-0005MY-Pt for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 14:27:53 -0800 From: Dima Kogan Date: Wed, 27 Jan 2016 14:27:53 -0800 Message-ID: <87zivq8xp2.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi. It is possible to look for a symbol, and for this information to be lost when repeating a search. For instance, say I have this buffer: ======= a b c ab bc ======= 1. I put the point on the first 'a' 2. M-s . (search for symbol at point). This find a symbol 'a', so the 'a' in 'ab' doesn't match 3. C-g (quit the search) 4. C-s C-s (repeat previous search). Here emacs remembers we looked for 'a', but not that it was a symbol, so it finds the 'a' in 'ab' even though it should not A similar sequence is possible with query-replace: 1. Point on 'a' 2. M-s . 3. C-M-%, 'asdf' to replace the symbol 'a' with 'asdf' 4. C-g (quit before replacing anything) 5. C-M-% (repeat last replacement. The symbol-ness of 'a' was forgotten) The simplest way to fix this would probably be to treat these as regex searches wrapped in \_<...\_>. The downside is that to access the history we'd have to do C-M-s C-M-s instead of C-s C-s, but maybe that is ok. Thoughts? From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2016 23:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145393616031275 (code B ref 22479); Wed, 27 Jan 2016 23:10:01 +0000 Received: (at 22479) by debbugs.gnu.org; 27 Jan 2016 23:09:20 +0000 Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOZDE-00088N-Kz for submit@debbugs.gnu.org; Wed, 27 Jan 2016 18:09:20 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:36725 helo=homiemail-a12.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOZDD-00088F-Qu for 22479@debbugs.gnu.org; Wed, 27 Jan 2016 18:09:20 -0500 Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 2E8B51030063; Wed, 27 Jan 2016 15:09:19 -0800 (PST) Received: from localhost.linkov.net (85.253.58.108.cable.starman.ee [85.253.58.108]) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPA id 63C1F1030062; Wed, 27 Jan 2016 15:09:18 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> Date: Thu, 28 Jan 2016 01:08:20 +0200 In-Reply-To: <87zivq8xp2.fsf@secretsauce.net> (Dima Kogan's message of "Wed, 27 Jan 2016 14:27:53 -0800") Message-ID: <87r3h2boyj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Hi. It is possible to look for a symbol, and for this information to be > lost when repeating a search. For instance, say I have this buffer: > > ======= > a b c > ab bc > ======= > > 1. I put the point on the first 'a' > > 2. M-s . (search for symbol at point). This find a symbol 'a', so the > 'a' in 'ab' doesn't match > > 3. C-g (quit the search) > > 4. C-s C-s (repeat previous search). Here emacs remembers we looked for > 'a', but not that it was a symbol, so it finds the 'a' in 'ab' even > though it should not > > > > A similar sequence is possible with query-replace: > > 1. Point on 'a' > > 2. M-s . > > 3. C-M-%, 'asdf' to replace the symbol 'a' with 'asdf' > > 4. C-g (quit before replacing anything) > > 5. C-M-% (repeat last replacement. The symbol-ness of 'a' was forgotten) > > > The simplest way to fix this would probably be to treat these as regex > searches wrapped in \_<...\_>. The downside is that to access the > history we'd have to do C-M-s C-M-s instead of C-s C-s, but maybe that > is ok. Thoughts? Thanks for the test cases. We started designing the customizable variables for this feature in bug#11378, and reached no final implementation. What do you think about the proposal in bug#11378? Since the original subject of bug#11378 was quite different, I propose to close bug#11378, and leave this bug#22479 open to implement this feature here. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jan 2016 08:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145396864715463 (code B ref 22479); Thu, 28 Jan 2016 08:11:01 +0000 Received: (at 22479) by debbugs.gnu.org; 28 Jan 2016 08:10:47 +0000 Received: from localhost ([127.0.0.1]:39076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOhfD-00041L-Cu for submit@debbugs.gnu.org; Thu, 28 Jan 2016 03:10:47 -0500 Received: from mout.gmx.net ([212.227.17.20]:49252) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOhfA-000416-Sf for 22479@debbugs.gnu.org; Thu, 28 Jan 2016 03:10:45 -0500 Received: from rosalinde ([89.245.82.29]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MbOrg-1ahKRT41I4-00In46; Thu, 28 Jan 2016 09:10:36 +0100 From: Stephen Berman References: <87zivq8xp2.fsf@secretsauce.net> Date: Thu, 28 Jan 2016 09:10:33 +0100 In-Reply-To: <87zivq8xp2.fsf@secretsauce.net> (Dima Kogan's message of "Wed, 27 Jan 2016 14:27:53 -0800") Message-ID: <87powm6s5i.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:vq1mQa4gUxjd66w3E/5kwt34+Y2A1okwA64Z473y4/6j9APTKwu Yt2i3mGf4fI31dhE52V4ODzGo3SgswFpsxMJJWtmYQWLq2lwOPmHikzcPMq+rSy9VeeBu2G vkbBM9Nujn6C6KSirUDSGvf5HnkW3XQ2vPywjIqTuHVjAXDn1neCPTN4lhZUlZu6jl+CQvD 9B0KEpHIhXk8+RjlrqQng== X-UI-Out-Filterresults: notjunk:1;V01:K0:DYr3Sufu+Ro=:PhzdRknTyuxxtd2MSFXvD1 +TZqtzs6b4Yx9oetc4/9fxYqDluF4J6gdFrudiLHcPCzR4o6M3raZngO349y0buQwZGHAxNOJ KOrUbrpyXDpoEpOAZElLJQb12bKkeZaBbL2IJmEh1o27CmrBo6hD+sLhWb2RVannFqlGQRasV FnCuzTMvi3pm9iliwGzpSISfWYBO/hCGZtJ+8TCiTdbqI5kaNV5Kt7sAFTYRl+hPOJBUoRz/i e9yYkruuolP7fTHDXCaYOoZ9/CkTwWEup5pDJtXWOBIjwGdMM8e+BQeHD5k5B7Hh7JObl7X4p 37QHLJ1Dp6f9HqIKvHgHzjWRxIBMhSxDmNX5x5/HVp3Ph/HSbDc1o7H5R9ywoaEKWWSNZ7X4W f8DYyy+ZwAkCP1Y2sJzlmfxPTsm9AjOXK02Wtt9QbxTl0ZK0urYKlWjvz4Rr4EHAvTRHz/rTw iFrfQZ9pNN4uIkukk0isveZfLThLklpVjRRbfIfYdUSYdqlzcBRnx2MTXRKJEmHHZAFWCZhd+ DJHnEdR+hxibCtS+Gvv/S0Fja6S9F78Ok3gpVuGtZSHM13pYC/6M1+8M9wzfMyGJJI9WhZe90 wRvWky6q4lULwcGWmoZPpR8wZsbLntIvRDJ//vjUn2IR4BlY1TdfYBTMnZnWGby81HjDeormY 1SR4RqRu8zhXob2dkeK3NlGQYlusBBd4CGNfY/Mvv59DbjPVXMCotz4iTczNH+kQpVHTOmtoT 209Kfx9Yl49gnB9WAIT+LuEDK3ZRInngx2KNSx0g5kRwg2zkd4fLiwY+YhqrJjBhrfQxd7ZQd 2LjMF3b X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Wed, 27 Jan 2016 14:27:53 -0800 Dima Kogan wrote: > Hi. It is possible to look for a symbol, and for this information to be > lost when repeating a search. For instance, say I have this buffer: > > ======= > a b c > ab bc > ======= > > 1. I put the point on the first 'a' > > 2. M-s . (search for symbol at point). This find a symbol 'a', so the > 'a' in 'ab' doesn't match > > 3. C-g (quit the search) > > 4. C-s C-s (repeat previous search). Here emacs remembers we looked for > 'a', but not that it was a symbol, so it finds the 'a' in 'ab' even > though it should not I can't reproduce this with -Q in emacs-25 (revision 5293d1b); doing step 4 displays the message "[No previous search string]". But if prior to step 1 I do `C-s b RET C-a' and then continue with your recipe, doing step 4 makes "b" the search string. So I guess you had searched for "a" before doing `M-s .'. > > A similar sequence is possible with query-replace: > > 1. Point on 'a' > > 2. M-s . > > 3. C-M-%, 'asdf' to replace the symbol 'a' with 'asdf' > > 4. C-g (quit before replacing anything) > > 5. C-M-% (repeat last replacement. The symbol-ness of 'a' was forgotten) This I can reproduce with -Q. Steve Berman From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jan 2016 10:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145397624327243 (code B ref 22479); Thu, 28 Jan 2016 10:18:02 +0000 Received: (at 22479) by debbugs.gnu.org; 28 Jan 2016 10:17:23 +0000 Received: from localhost ([127.0.0.1]:39133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOjdj-00075K-1X for submit@debbugs.gnu.org; Thu, 28 Jan 2016 05:17:23 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:39118) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOjdh-00075C-2K for 22479@debbugs.gnu.org; Thu, 28 Jan 2016 05:17:21 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 90DCA21EE8 for <22479@debbugs.gnu.org>; Thu, 28 Jan 2016 05:17:20 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 28 Jan 2016 05:17:20 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=X31t0 vv0yT9+vOeaAcS+G2Mc3P4=; b=hQQvT5mYUMWamMS7wr7NHKiWQu+Oo7Rv/w1Hk P6mkUqaDjTUaZ+1JD2YRAUE7HVGFvtJVpZZUkMooiB/5zE96cyCxHPpL8ndYY6PJ Kfy2nIhv7rlPvlp9sNUDGMboEPBxIzylpe3nR+TXD4S7xzJ3nDa+Q0C9YMLa/dU7 4u3J6E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=X31t0vv0yT9+vOeaAcS+G2Mc3P4=; b=FlSXP 4CHdn9vZoI4Ricc5DP23Kz7iw3mukLnZn0UkFyu+g3X00oeuNMk/DGrI9gfX1ZHk XyBsfzEebbK7LNGz9F+ZHUYpnKFaqyFjIc9asFGM9bIBJ/fdrY/ZiZxMytBDlZpi Vw5MGAktv5DWuo2yd4h19I2MmH23ysaq7299kE= X-Sasl-enc: Hg12bFH9fRXqfFe2LZ0pruW3Be5wRu1sqhc5rb0EhsNW 1453976240 Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 3AE17680159; Thu, 28 Jan 2016 05:17:20 -0500 (EST) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aOjde-0004Ma-Tw; Thu, 28 Jan 2016 02:17:18 -0800 References: <87zivq8xp2.fsf@secretsauce.net> <87powm6s5i.fsf@gmx.net> User-agent: mu4e 0.9.11; emacs 25.0.50.1 From: Dima Kogan In-reply-to: <87powm6s5i.fsf@gmx.net> Date: Thu, 28 Jan 2016 02:17:18 -0800 Message-ID: <87fuxi3t5d.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stephen Berman writes: > On Wed, 27 Jan 2016 14:27:53 -0800 Dima Kogan wrote: > >> Hi. It is possible to look for a symbol, and for this information to be >> lost when repeating a search. For instance, say I have this buffer: >> >> ======= >> a b c >> ab bc >> ======= >> >> 1. I put the point on the first 'a' >> >> 2. M-s . (search for symbol at point). This find a symbol 'a', so the >> 'a' in 'ab' doesn't match >> >> 3. C-g (quit the search) >> >> 4. C-s C-s (repeat previous search). Here emacs remembers we looked for >> 'a', but not that it was a symbol, so it finds the 'a' in 'ab' even >> though it should not > > I can't reproduce this with -Q in emacs-25 (revision 5293d1b); doing > step 4 displays the message "[No previous search string]". But if prior > to step 1 I do `C-s b RET C-a' and then continue with your recipe, doing > step 4 makes "b" the search string. So I guess you had searched for "a" > before doing `M-s .'. Hi. I want to say the recipe was working exactly as written, but I now see what you say. In any case, if you C-s after the M-s . then the recipe works From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jan 2016 11:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145415421812459 (code B ref 22479); Sat, 30 Jan 2016 11:44:01 +0000 Received: (at 22479) by debbugs.gnu.org; 30 Jan 2016 11:43:38 +0000 Received: from localhost ([127.0.0.1]:41037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPTwI-0003Et-6T for submit@debbugs.gnu.org; Sat, 30 Jan 2016 06:43:38 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:52559) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPTwF-0003Ek-Hk for 22479@debbugs.gnu.org; Sat, 30 Jan 2016 06:43:36 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id EE54827066 for <22479@debbugs.gnu.org>; Sat, 30 Jan 2016 06:43:34 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Sat, 30 Jan 2016 06:43:34 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=8pn0/XfiOOlmNpssXxB2c8DaFWM =; b=gyI9pZOOriUZfsjmLOK9whbYDFOM8cDu8QLj8msZLiU+c10lBVoLulDbPQL WD562K0Wh7cQdVbhOuEw5+CTdGn/mgl+Db5Cvrv+LMIwY55f20YHO3veXmGZTpSj Q7euQkeSnQVhwwMWDrS3tmLtaSO5HcTSQ+j05N9pHdbxNiaE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=8pn0/XfiOOlmNps sXxB2c8DaFWM=; b=EvxJheC74rPi8GC810uHzXxifokHTowGWuh1MGGSTSzHgVt e6sWUQTbDbj+dgQaEiupSKxagScQf43Ida0T9LY68rBdYU8XngI2JO2A2tWKdc1z 3y1Es6khsDxLQQTW2WeICSDtcht+B4XrQnNuAbPHje/H9g3RzT7lhjFyeqpc= X-Sasl-enc: x/aLvO23QpmwIpsNOi0sUfzxgepzpkK3TGgcBrppZuQt 1454154214 Received: from [26.250.175.162] (unknown [172.56.31.113]) by mail.messagingengine.com (Postfix) with ESMTPA id 1FB95C00013; Sat, 30 Jan 2016 06:43:33 -0500 (EST) User-Agent: K-9 Mail for Android In-Reply-To: <87r3h2boyj.fsf@mail.linkov.net> References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: Dima Kogan Date: Sat, 30 Jan 2016 03:43:28 -0800 Message-ID: <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On January 27, 2016 3:08:20 PM PST, Juri Linkov wrote: >> Hi. It is possible to look for a symbol, and for this information to >be >> lost when repeating a search. >> The simplest way to fix this would probably be to treat these as >regex >> searches wrapped in \_<...\_>. The downside is that to access the >> history we'd have to do C-M-s C-M-s instead of C-s C-s, but maybe >that >> is ok. Thoughts? > >Thanks for the test cases. We started designing the customizable >variables >for this feature in bug#11378, and reached no final implementation. >What do you think about the proposal in bug#11378? > >Since the original subject of bug#11378 was quite different, >I propose to close bug#11378, and leave this bug#22479 open >to implement this feature here. Hi. #11378 doesn't talk about keeping the meta-data in the history generically. It mentions remembering the state for the last search, but you'd still have the issue in this bug for older searches. So unless I missed it (very possible since it was a very long thread), that bug doesn't touch on this. We can propose new things, however :) I don't know how much complexity we want here. Each history item can be a richer structure than just the search string. Too much? From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2016 00:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.14541993748946 (code B ref 22479); Sun, 31 Jan 2016 00:17:02 +0000 Received: (at 22479) by debbugs.gnu.org; 31 Jan 2016 00:16:14 +0000 Received: from localhost ([127.0.0.1]:42404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPfgc-0002KE-HH for submit@debbugs.gnu.org; Sat, 30 Jan 2016 19:16:14 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:44173 helo=homiemail-a101.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPfga-0002Jz-FR for 22479@debbugs.gnu.org; Sat, 30 Jan 2016 19:16:12 -0500 Received: from homiemail-a101.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTP id BD87A117E06A; Sat, 30 Jan 2016 16:16:11 -0800 (PST) Received: from localhost.linkov.net (62.65.226.255.cable.starman.ee [62.65.226.255]) (Authenticated sender: jurta@jurta.org) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTPA id DD9DB117E065; Sat, 30 Jan 2016 16:16:10 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> Date: Sun, 31 Jan 2016 02:04:58 +0200 In-Reply-To: <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> (Dima Kogan's message of "Sat, 30 Jan 2016 03:43:28 -0800") Message-ID: <87io2apqad.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Hi. #11378 doesn't talk about keeping the meta-data in the history > generically. It mentions remembering the state for the last search, but > you'd still have the issue in this bug for older searches. So unless > I missed it (very possible since it was a very long thread), that bug > doesn't touch on this. We can propose new things, however :) > > I don't know how much complexity we want here. Each history item can > be a richer structure than just the search string. Too much? Yes, this is a harder problem. We have to remember meta-data for every search history element. There are several possibilities: 1. Changing the current format of =E2=80=98search-ring=E2=80=99 and =E2=80= =98regexp-search-ring=E2=80=99 is not backward-compatible: for external packages, for desktop.el, for savehist.el. Also note that distinction between these two variables already remembers one particular search parameter: either an ordinary or regexp search. So we don't need to remember the regexp search parameter alongside with the value of the search search. OTOH, by remembering it with the value, we can obsolete =E2=80=98regexp-search-ring=E2=80=99. 2. Adding more such variables for other search parameters: =E2=80=98word-search-ring=E2=80=99, =E2=80=98symbol-search-ring=E2=80=99= , =E2=80=98char-fold-search-ring=E2=80=99. A big mess ensues... 3. Using an additional variable with only meta-data requires keeping it in sync with the values in =E2=80=98search-ring=E2=80=99 and =E2=80=98= regexp-search-ring=E2=80=99. 4. Adding meta-data by text-properties to the strings in =E2=80=98search-ring=E2=80=99 and =E2=80=98regexp-search-ring=E2=80=99= poses a problem of saving the values in the desktop and restoring in another session. 5. More ideas? ;) From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2016 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145420202313036 (code B ref 22479); Sun, 31 Jan 2016 01:01:02 +0000 Received: (at 22479) by debbugs.gnu.org; 31 Jan 2016 01:00:23 +0000 Received: from localhost ([127.0.0.1]:42432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPgNL-0003OB-4I for submit@debbugs.gnu.org; Sat, 30 Jan 2016 20:00:23 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:34801) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPgNJ-0003Ny-97 for 22479@debbugs.gnu.org; Sat, 30 Jan 2016 20:00:21 -0500 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u0V10ELo029342 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 31 Jan 2016 01:00:15 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u0V10DTZ010083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 31 Jan 2016 01:00:14 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u0V10D5h021571; Sun, 31 Jan 2016 01:00:13 GMT MIME-Version: 1.0 Message-ID: <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> Date: Sat, 30 Jan 2016 17:00:12 -0800 (PST) From: Drew Adams References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> In-Reply-To: <87io2apqad.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > I don't know how much complexity we want here. Each history item can > > be a richer structure than just the search string. Too much? Yes, too much (IMHO). Trying to solve a non-problem or a minor problem. (Why stop with search for a symbol? There are a zillion things that one could potentially record about the current search state, from the current mode and currently active minor modes, all current variable settings, key bindings, etc. to the current phase of the moon. Who is to say just what the user considered the search context to be: what s?he was looking for and why?) People have been using Isearch for decades without this bothering them. And it's not as if it is difficult for a user to reestablish such a state (symbol search) interactively. > Yes, this is a harder problem. We have to remember meta-data for > every search history element. There are several possibilities: ... > 5. More ideas? ;) Yes, do nothing. ;-) Move on to real problems... From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2016 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 22479@debbugs.gnu.org, Juri Linkov Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145426083830344 (code B ref 22479); Sun, 31 Jan 2016 17:21:01 +0000 Received: (at 22479) by debbugs.gnu.org; 31 Jan 2016 17:20:38 +0000 Received: from localhost ([127.0.0.1]:43378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPvfy-0007tL-Ha for submit@debbugs.gnu.org; Sun, 31 Jan 2016 12:20:38 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38538) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPvfw-0007tE-TC for 22479@debbugs.gnu.org; Sun, 31 Jan 2016 12:20:37 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7BF6929C69 for <22479@debbugs.gnu.org>; Sun, 31 Jan 2016 12:20:36 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 31 Jan 2016 12:20:36 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=0tLSz pJ3WC21PYWYQ5nwb04s4H0=; b=AL5jW6uWQuV9/kkBkUy/yyKk0P9e5K0uYdT/U PZcg5fZzldsOsjrfGAdb8tDOvdfbJ3FSYnfi6XHKcC+OhthYcwhTy7QHV22Y6uYC ebeokOeU9r4X3qX9BLxMK/nbG0dat+2T2yic9Kz7CJ1WQUqNB/iVDgIWjFKc61oK M2QXWs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=0tLSzpJ3WC21PYWYQ5nwb04s4H0=; b=HPH5z Hy7UWgJaHmp+SAwpzVVqmUokLwRRe74a/MtEH/TYVArZMUEDRUtWeSquEaOW/GUg yNY51NFkzD/qaHWPm2GWYZNWbVDT/cjMJL0xCcrQaO6Iv1FeMdnjdl6pIoR1C5eL NoeVN5XETbJrupiFzxXZP1BHm11kch54HUnlsw= X-Sasl-enc: xnFNAFHYyhkJG5qaH9f3cFnhLTHiTYlMkD7RdrQnFE9v 1454260836 Received: from shorty.local (174-28-85-47.albq.qwest.net [174.28.85.47]) by mail.messagingengine.com (Postfix) with ESMTPA id 078A9680105; Sun, 31 Jan 2016 12:20:36 -0500 (EST) Received: from localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aPvft-0002iE-PX; Sun, 31 Jan 2016 09:20:33 -0800 References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> User-agent: mu4e 0.9.11; emacs 25.0.50.1 From: Dima Kogan In-reply-to: <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> Date: Sun, 31 Jan 2016 09:20:33 -0800 Message-ID: <87bn814qe6.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Drew Adams writes: >> > I don't know how much complexity we want here. Each history item can >> > be a richer structure than just the search string. Too much? > > Yes, too much (IMHO). Trying to solve a non-problem or a minor problem. I won't claim that this is the most pressing thing we have to work on, but to me, an editor is a large number of small, nice things. So I do this it's worthwhile to fix this > People have been using Isearch for decades without this bothering > them. And it's not as if it is difficult for a user to reestablish > such a state (symbol search) interactively. I only started using the symbol-finding functionality of isearch recently, and it's clearly underbaked, and that bothers me. > 5. More ideas? ;) - We can retain the two histories: regex, non-regex - Any fancy (word, symbol, etc) searches can be stored into the regex history, bookmarked with the appropriate regexen ("\_<", "\_>" for instance) - When reading the history to present to the user, these can be parsed out. So for instance when the user looks through the symbol-search history by hitting M-s _ C-s emacs can look through the regex history, only selecting entries in \_<...\_>. The C-M-s history can either include all of these, or show only unbookmarked entries; both would be ok, I think. This should be sufficiently compatible with external packages. I can do the implementation if this sounds reasonable. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2016 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org, Drew Adams Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145427826630257 (code B ref 22479); Sun, 31 Jan 2016 22:12:02 +0000 Received: (at 22479) by debbugs.gnu.org; 31 Jan 2016 22:11:06 +0000 Received: from localhost ([127.0.0.1]:43522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQ0D3-0007rx-VY for submit@debbugs.gnu.org; Sun, 31 Jan 2016 17:11:06 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:57725 helo=homiemail-a15.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQ0D2-0007rp-Cr for 22479@debbugs.gnu.org; Sun, 31 Jan 2016 17:11:04 -0500 Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id 05CC476C069; Sun, 31 Jan 2016 14:11:03 -0800 (PST) Received: from localhost.linkov.net (82.131.112.255.cable.starman.ee [82.131.112.255]) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id 049E876C065; Sun, 31 Jan 2016 14:11:01 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> <87bn814qe6.fsf@secretsauce.net> Date: Mon, 01 Feb 2016 00:05:32 +0200 In-Reply-To: <87bn814qe6.fsf@secretsauce.net> (Dima Kogan's message of "Sun, 31 Jan 2016 09:20:33 -0800") Message-ID: <87oac1o15f.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> 5. More ideas? ;) > > - We can retain the two histories: regex, non-regex > > - Any fancy (word, symbol, etc) searches can be stored into the regex > history, bookmarked with the appropriate regexen ("\_<", "\_>" for > instance) > > - When reading the history to present to the user, these can be parsed > out. So for instance when the user looks through the symbol-search > history by hitting > > M-s _ > C-s > > emacs can look through the regex history, only selecting entries in > \_<...\_>. The C-M-s history can either include all of these, or show > only unbookmarked entries; both would be ok, I think. This approach is compromising but unreliable (doesn't distinguish between the case when the user uses the symbol search M-s _ or types \_<...\_> directly in the regexp search) and insufficient (need to remember other search parameters like case-fold and lax-whitespace). From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Feb 2016 05:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org, Drew Adams Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145439114027215 (code B ref 22479); Tue, 02 Feb 2016 05:33:01 +0000 Received: (at 22479) by debbugs.gnu.org; 2 Feb 2016 05:32:20 +0000 Received: from localhost ([127.0.0.1]:55611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQTZc-00074s-BB for submit@debbugs.gnu.org; Tue, 02 Feb 2016 00:32:20 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60781) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQTZa-00074h-Hk for 22479@debbugs.gnu.org; Tue, 02 Feb 2016 00:32:19 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2AF7220DA7 for <22479@debbugs.gnu.org>; Tue, 2 Feb 2016 00:32:18 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 02 Feb 2016 00:32:18 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Zf/YX jorFOEH9LXPL0nJKKB0oP0=; b=PUH378vfPHx96ZkAG0NvtMcnOhsBhg2NnLl82 WuUCLKEl48U7GD8W6q+BouGPQL5NFKMTN4uhthj/wiw8owLi5tg9fLQMdqV46wKH t6yYMmHv267yYW/qry+QSB3d5l5h5v3ZIyIt2ht4XnbRK6lyALwM0UyBiipLdqkL qp3cFc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Zf/YXjorFOEH9LXPL0nJKKB0oP0=; b=WsgRT DGtn+SpMNvRwGrTfE9zuk11+laJTljKQWUwDgyZTu6cgQjZvTc7mH5STCl7lj24b QNh5iD9yMZnRaGCrLxHo0ygnOxoZMmTs0YwT7yheNVHgSZ76UdbPcU/iSwK2CyAo RxeotzQAsF+7ukrKoXGgdrUbWbeOIjwxQVTEBM= X-Sasl-enc: Y5WxGdoWHB+EYYI6aIzYFju5pZZ91K/m1q+bJxkoGQfW 1454391137 Received: from shorty.local (174-28-85-47.albq.qwest.net [174.28.85.47]) by mail.messagingengine.com (Postfix) with ESMTPA id AD572C00023; Tue, 2 Feb 2016 00:32:17 -0500 (EST) Received: from localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aQTZR-0002Dp-EY; Mon, 01 Feb 2016 21:32:09 -0800 References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> <87bn814qe6.fsf@secretsauce.net> <87oac1o15f.fsf@mail.linkov.net> User-agent: mu4e 0.9.11; emacs 25.0.50.1 From: Dima Kogan In-reply-to: <87oac1o15f.fsf@mail.linkov.net> Date: Mon, 01 Feb 2016 21:32:08 -0800 Message-ID: <871t8v4qzr.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Juri Linkov writes: >>> 5. More ideas? ;) >> >> - We can retain the two histories: regex, non-regex >> >> - Any fancy (word, symbol, etc) searches can be stored into the regex >> history, bookmarked with the appropriate regexen ("\_<", "\_>" for >> instance) >> >> - When reading the history to present to the user, these can be parsed >> out. So for instance when the user looks through the symbol-search >> history by hitting >> >> M-s _ >> C-s >> >> emacs can look through the regex history, only selecting entries in >> \_<...\_>. The C-M-s history can either include all of these, or show >> only unbookmarked entries; both would be ok, I think. > > This approach is compromising but unreliable Indeed it is a compromise. It feels to me to be much better than what we have now, and the issues aren't too significant... I think... > (doesn't distinguish between the case when the user uses the symbol > search M-s _ or types \_<...\_> directly in the regexp search) True, but I think this is OK. The symbol-search history would include M-s _ searches AND those C-M-s searches where the intent was to look for symbols; I think this is fine. The regex-search history would include all symbol searches also; maybe that is less fine, but it isn't crazy. The text search history would include none of these; this is GOOD, and is not what we do now. > (need to remember other search parameters like case-fold and > lax-whitespace). Hmmm. This clearly requires metadata so some of your other, more intrusive proposals would be required to handle this. The above proposal would work for word and symbol searches. I think fixing that would be worth it. Do yall just want to leave it alone? From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Feb 2016 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org, Drew Adams Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.14544614378620 (code B ref 22479); Wed, 03 Feb 2016 01:04:02 +0000 Received: (at 22479) by debbugs.gnu.org; 3 Feb 2016 01:03:57 +0000 Received: from localhost ([127.0.0.1]:57277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQlrR-0002Ey-7n for submit@debbugs.gnu.org; Tue, 02 Feb 2016 20:03:57 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:45009 helo=homiemail-a13.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQlrP-0002Ei-Kz for 22479@debbugs.gnu.org; Tue, 02 Feb 2016 20:03:55 -0500 Received: from homiemail-a13.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTP id 35BAF33406F; Tue, 2 Feb 2016 17:03:55 -0800 (PST) Received: from localhost.linkov.net (85.253.204.130.cable.starman.ee [85.253.204.130]) (Authenticated sender: jurta@jurta.org) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPA id 286A033406C; Tue, 2 Feb 2016 17:03:53 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> <87bn814qe6.fsf@secretsauce.net> <87oac1o15f.fsf@mail.linkov.net> <871t8v4qzr.fsf@secretsauce.net> Date: Wed, 03 Feb 2016 02:39:19 +0200 In-Reply-To: <871t8v4qzr.fsf@secretsauce.net> (Dima Kogan's message of "Mon, 01 Feb 2016 21:32:08 -0800") Message-ID: <87k2mm4niw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>> 5. More ideas? ;) >>> >>> - We can retain the two histories: regex, non-regex >>> >>> - Any fancy (word, symbol, etc) searches can be stored into the regex >>> history, bookmarked with the appropriate regexen ("\_<", "\_>" for >>> instance) >>> >>> - When reading the history to present to the user, these can be parsed >>> out. So for instance when the user looks through the symbol-search >>> history by hitting >>> >>> M-s _ >>> C-s >>> >>> emacs can look through the regex history, only selecting entries in >>> \_<...\_>. The C-M-s history can either include all of these, or show >>> only unbookmarked entries; both would be ok, I think. >> >> This approach is compromising but unreliable > > Indeed it is a compromise. It feels to me to be much better than what we > have now, and the issues aren't too significant... I think... > >> (doesn't distinguish between the case when the user uses the symbol >> search M-s _ or types \_<...\_> directly in the regexp search) > > True, but I think this is OK. The symbol-search history would include > M-s _ searches AND those C-M-s searches where the intent was to look for > symbols; I think this is fine. The regex-search history would include > all symbol searches also; maybe that is less fine, but it isn't crazy. > The text search history would include none of these; this is GOOD, and > is not what we do now. How then you would deconstruct an original search string from a char-fold regexp? Almost impossible with such garbage-looking regexp like you demonstrated in bug#22520. >> (need to remember other search parameters like case-fold and >> lax-whitespace). > > Hmmm. This clearly requires metadata so some of your other, more > intrusive proposals would be required to handle this. Might be not too intrusive given that we already have such metadata in isearch-cmds. This means extending the isearch-cmds structure to search-ring, and maybe renaming it to isearch-ring. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2016 01:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145454853622691 (code B ref 22479); Thu, 04 Feb 2016 01:16:01 +0000 Received: (at 22479) by debbugs.gnu.org; 4 Feb 2016 01:15:36 +0000 Received: from localhost ([127.0.0.1]:58540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR8WG-0005tv-Lo for submit@debbugs.gnu.org; Wed, 03 Feb 2016 20:15:36 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:32885 helo=homiemail-a19.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR8WF-0005to-K6 for 22479@debbugs.gnu.org; Wed, 03 Feb 2016 20:15:35 -0500 Received: from homiemail-a19.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTP id CCB16604069; Wed, 3 Feb 2016 17:15:34 -0800 (PST) Received: from localhost.linkov.net (85.253.168.42.cable.starman.ee [85.253.168.42]) (Authenticated sender: jurta@jurta.org) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPA id 07B3A60405D; Wed, 3 Feb 2016 17:15:33 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> <87bn814qe6.fsf@secretsauce.net> <87oac1o15f.fsf@mail.linkov.net> <871t8v4qzr.fsf@secretsauce.net> Date: Thu, 04 Feb 2016 02:35:29 +0200 In-Reply-To: <871t8v4qzr.fsf@secretsauce.net> (Dima Kogan's message of "Mon, 01 Feb 2016 21:32:08 -0800") Message-ID: <87twlp2w9y.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >>>> 5. More ideas? ;) >>> >>> - We can retain the two histories: regex, non-regex One additional question: what do you expect =E2=80=98M-s _ M-p M-p M-p ..= .=E2=80=99 to do? Should it browse the previous search strings only from the currently acti= ve search mode (in this case symbol search)? Or while browsing previous ele= ments, should it change the search mode, e.g. when a previous search string was saved to the search-ring by word mode, then toggle word mode from symbol mode after typing 'M-p'? From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2016 01:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145454991324728 (code B ref 22479); Thu, 04 Feb 2016 01:39:01 +0000 Received: (at 22479) by debbugs.gnu.org; 4 Feb 2016 01:38:33 +0000 Received: from localhost ([127.0.0.1]:58549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR8sS-0006Qm-Oy for submit@debbugs.gnu.org; Wed, 03 Feb 2016 20:38:32 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:59692) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR8sR-0006Qe-8e for 22479@debbugs.gnu.org; Wed, 03 Feb 2016 20:38:31 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CFD4B2079C for <22479@debbugs.gnu.org>; Wed, 3 Feb 2016 20:38:30 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Wed, 03 Feb 2016 20:38:30 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=0J/rA38P1MlS6RjotKoTXn2O1+0 =; b=O9QEG2rzowZRc7Tqx0XAeRYWg1p6827EeVw6OXAyDOcoNh2f0Wf0k6o77Yv HrH8KygDIy8bi8ud07t+HrCHXYG6CbC4QvQmGNMAFPb1sawUJKJdiYkf6m+xMP09 vPe5Z3PM5q15KvFHFkpla/95PQFXavUFSNcJACkM3/BMByuM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=0J/rA38P1MlS6Rj otKoTXn2O1+0=; b=n8n/p+TV02QHeSwaqTosAlP+YrI+pdp2nVxLOQc3sR8UEt7 GGxLiipRCeHTKWc1z2jAyQFq5XQPkt4iI6qNUkvq94FRRlEihHmK7eqUvQksYCvq ZqZxsCRRyTJamHCaXK4qSkbrTdeCJjaxVyZcY/lH1JvW+kyGSWGGe8GZVLrk= X-Sasl-enc: Pkym3rhGlxYW7Y0x5QJIHl4Pml+Jw1QgzaybqltIwjSM 1454549910 Received: from shorty.local (174-28-85-47.albq.qwest.net [174.28.85.47]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E78AC00014; Wed, 3 Feb 2016 20:38:30 -0500 (EST) Received: from localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aR8sP-0004fY-30; Wed, 03 Feb 2016 17:38:29 -0800 References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> <87bn814qe6.fsf@secretsauce.net> <87oac1o15f.fsf@mail.linkov.net> <871t8v4qzr.fsf@secretsauce.net> <87twlp2w9y.fsf@mail.linkov.net> User-agent: mu4e 0.9.11; emacs 25.0.50.1 From: Dima Kogan In-reply-to: <87twlp2w9y.fsf@mail.linkov.net> Date: Wed, 03 Feb 2016 17:38:29 -0800 Message-ID: <87oabx2r1m.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Juri Linkov writes: >>>>> 5. More ideas? ;) >>>> >>>> - We can retain the two histories: regex, non-regex > > One additional question: what do you expect ‘M-s _ M-p M-p M-p ...’ to do? > Should it browse the previous search strings only from the currently active > search mode (in this case symbol search)? Or while browsing previous elements, > should it change the search mode, e.g. when a previous search string > was saved to the search-ring by word mode, then toggle word mode > from symbol mode after typing 'M-p'? I was thinking that M-p would retain whatever mode we're in. So in that example, we'd cycle only through symbol searches. Since there are multiple different modes that combine combinatorially, maybe this is not an ideal way to do it, but that's what I'm thinking now. This conversation has been useful, and I'm now digging through isearch.el to see what the quickest (and least intrusive) approach to a patch would be. Thanks From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2016 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145457174616778 (code B ref 22479); Thu, 04 Feb 2016 07:43:01 +0000 Received: (at 22479) by debbugs.gnu.org; 4 Feb 2016 07:42:26 +0000 Received: from localhost ([127.0.0.1]:58881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aREYc-0004MX-1z for submit@debbugs.gnu.org; Thu, 04 Feb 2016 02:42:26 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43621) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aREYa-0004MP-CJ for 22479@debbugs.gnu.org; Thu, 04 Feb 2016 02:42:24 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D90B6207EC for <22479@debbugs.gnu.org>; Thu, 4 Feb 2016 02:42:23 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 04 Feb 2016 02:42:23 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=BcfrATX8HkH2Z6SPzE35biRIkHQ =; b=JdiaxLh47V4aWRutG+DqjUrWHyvKCRXUIHPza1WdVjlZyY6sauyXP2mRhYK dJ5k4uW3poI2eFX3zthMsXU2E+TFrulMTgSkTknfOdTeUlbpd3+Rh73zQJMTYk4e WrJpbR4rmIkxDc2nZYIBNMxUSzN1dNCdE6urGXgUdpMCnN6A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=BcfrATX8HkH2Z6S PzE35biRIkHQ=; b=e/vMIA0x95P//o8NTPWxlTqSAwtt4cOOfhNnpNA8ibti/gu yIxyhz/qpOsmWB9k5sr+JIOe22RwQFwG5DOCTHeGQl8NWG6shHHAQMauhRjAAFa4 MwAPU9MYN52SjmdcIMclkZYuwIZIvcIB03rjX9oOepKFVisrt4UwGuW7ucyc= X-Sasl-enc: 2i/8B9OwbBCrOeKqDUT+CkZTsuicMFk6vz0wubSK3XTc 1454571743 Received: from shorty.local (174-28-85-47.albq.qwest.net [174.28.85.47]) by mail.messagingengine.com (Postfix) with ESMTPA id 67106680159; Thu, 4 Feb 2016 02:42:23 -0500 (EST) Received: from localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aREYY-00046J-1j; Wed, 03 Feb 2016 23:42:22 -0800 References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> User-agent: mu4e 0.9.11; emacs 25.0.50.1 From: Dima Kogan In-reply-to: <87io2apqad.fsf@mail.linkov.net> Date: Wed, 03 Feb 2016 23:42:21 -0800 Message-ID: <87k2mk3orm.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Juri Linkov writes: > Yes, this is a harder problem. We have to remember meta-data for > every search history element. There are several possibilities: > > 4. Adding meta-data by text-properties to the strings in > ‘search-ring’ and ‘regexp-search-ring’ poses a problem of saving > the values in the desktop and restoring in another session. This feels like the best solution. I looked at desktop.el, and it doesn't save the properties, as you say. But it could be made to. Do you think some external packages would get broken by this change? From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2016 01:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.14546357368358 (code B ref 22479); Fri, 05 Feb 2016 01:29:02 +0000 Received: (at 22479) by debbugs.gnu.org; 5 Feb 2016 01:28:56 +0000 Received: from localhost ([127.0.0.1]:60758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRVCi-0002Af-Mc for submit@debbugs.gnu.org; Thu, 04 Feb 2016 20:28:56 -0500 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:37286 helo=homiemail-a100.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRVCg-0002AO-Qz for 22479@debbugs.gnu.org; Thu, 04 Feb 2016 20:28:55 -0500 Received: from homiemail-a100.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTP id EBF0B31A070; Thu, 4 Feb 2016 17:28:53 -0800 (PST) Received: from localhost.linkov.net (85.253.170.183.cable.starman.ee [85.253.170.183]) (Authenticated sender: jurta@jurta.org) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTPA id 10F2831A061; Thu, 4 Feb 2016 17:28:52 -0800 (PST) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> Date: Fri, 05 Feb 2016 02:50:35 +0200 In-Reply-To: <87k2mk3orm.fsf@secretsauce.net> (Dima Kogan's message of "Wed, 03 Feb 2016 23:42:21 -0800") Message-ID: <878u302bmw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> Yes, this is a harder problem. We have to remember meta-data for >> every search history element. There are several possibilities: >> >> 4. Adding meta-data by text-properties to the strings in >> =E2=80=98search-ring=E2=80=99 and =E2=80=98regexp-search-ring=E2=80= =99 poses a problem of saving >> the values in the desktop and restoring in another session. > > This feels like the best solution. I looked at desktop.el, and it > doesn't save the properties, as you say. But it could be made to. Do yo= u > think some external packages would get broken by this change? In addition to desktop.el, other external packages save histories as well like savehist.el. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Mar 2018 22:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.152089195619171 (code B ref 22479); Mon, 12 Mar 2018 22:00:03 +0000 Received: (at 22479) by debbugs.gnu.org; 12 Mar 2018 21:59:16 +0000 Received: from localhost ([127.0.0.1]:57740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evVTP-0004z9-Vy for submit@debbugs.gnu.org; Mon, 12 Mar 2018 17:59:16 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:47908 helo=homiemail-a15.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1evVTO-0004yz-3O for 22479@debbugs.gnu.org; Mon, 12 Mar 2018 17:59:14 -0400 Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id E2C5D76C06B; Mon, 12 Mar 2018 14:59:12 -0700 (PDT) Received: from localhost.linkov.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPSA id D315276C065; Mon, 12 Mar 2018 14:59:11 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> Date: Mon, 12 Mar 2018 23:43:54 +0200 In-Reply-To: <87k2mk3orm.fsf@secretsauce.net> (Dima Kogan's message of "Wed, 03 Feb 2016 23:42:21 -0800") Message-ID: <87bmftotph.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> Yes, this is a harder problem. We have to remember meta-data for >> every search history element. There are several possibilities: >> >> 4. Adding meta-data by text-properties to the strings in >> =E2=80=98search-ring=E2=80=99 and =E2=80=98regexp-search-ring=E2=80= =99 poses a problem of saving >> the values in the desktop and restoring in another session. > > This feels like the best solution. I looked at desktop.el, and it > doesn't save the properties, as you say. But it could be made to. Do yo= u > think some external packages would get broken by this change? This seems to be the least radical change as concluded in https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00296.html The patch makes the search mode to be remembered in isearch as well as in query-replace. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-text-properties.2.patch diff --git a/lisp/isearch.el b/lisp/isearch.el index 84b121a..56a44d8 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1103,7 +1111,9 @@ isearch-done (if (and (> (length isearch-string) 0) (not nopush)) ;; Update the ring data. - (isearch-update-ring isearch-string isearch-regexp)) + (isearch-update-ring isearch-string isearch-regexp + `(regexp-function ,isearch-regexp-function + case-fold-search ,isearch-case-fold-search))) (let ((isearch-mode-end-hook-quit (and nopush (not edit)))) (run-hooks 'isearch-mode-end-hook)) @@ -1119,13 +1129,14 @@ isearch-done (and (not edit) isearch-recursive-edit (exit-recursive-edit))) -(defun isearch-update-ring (string &optional regexp) +(defun isearch-update-ring (string &optional regexp properties) "Add STRING to the beginning of the search ring. REGEXP if non-nil says use the regexp search ring." (add-to-history (if regexp 'regexp-search-ring 'search-ring) - string - (if regexp regexp-search-ring-max search-ring-max))) + (if properties (apply 'propertize string properties) string) + (if regexp regexp-search-ring-max search-ring-max) + t)) ;; Switching buffers should first terminate isearch-mode. ;; ;; For Emacs 19, the frame switch event is handled. @@ -1834,7 +1845,11 @@ isearch-query-replace ;; `exit-recursive-edit' in `isearch-done' that terminates ;; the execution of this command when it is non-nil. ;; We call `exit-recursive-edit' explicitly at the end below. - (isearch-recursive-edit nil)) + (isearch-recursive-edit nil) + (isearch-string-propertized + (propertize isearch-string + 'isearch-regexp-function isearch-regexp-function + 'isearch-case-fold-search isearch-case-fold-search))) (isearch-done nil t) (isearch-clean-overlays) (if (and isearch-other-end @@ -1847,12 +1862,12 @@ isearch-query-replace (< (mark) (point)))))) (goto-char isearch-other-end)) (set query-replace-from-history-variable - (cons isearch-string + (cons isearch-string-propertized (symbol-value query-replace-from-history-variable))) (perform-replace - isearch-string + isearch-string-propertized (query-replace-read-to - isearch-string + isearch-string-propertized (concat "Query replace" (isearch--describe-regexp-mode (or delimited isearch-regexp-function) t) (if backward " backward" "") @@ -2556,7 +2575,13 @@ isearch-ring-adjust1 length))) (setq isearch-string (nth yank-pointer ring) isearch-message (mapconcat 'isearch-text-char-description - isearch-string ""))))) + isearch-string "")) + (when (memq 'regexp-function (text-properties-at 0 isearch-string)) + (setq isearch-regexp-function + (get-text-property 0 'regexp-function isearch-string))) + (when (memq 'case-fold-search (text-properties-at 0 isearch-string)) + (setq isearch-case-fold-search + (get-text-property 0 'case-fold-search isearch-string)))))) (defun isearch-ring-adjust (advance) ;; Helper for isearch-ring-advance and isearch-ring-retreat @@ -2772,11 +2797,16 @@ isearch-search-fun (defun isearch--lax-regexp-function-p () "Non-nil if next regexp-function call should be lax." + ;; FIXME: maybe simpler to use this: + ;; (or (memq this-command '(isearch-printing-char isearch-del-char)) + ;; isearch-yank-flag) (not (or isearch-nonincremental (null (car isearch-cmds)) (eq (length isearch-string) (length (isearch--state-string - (car isearch-cmds))))))) + (car isearch-cmds)))) + ;; Search string comes from the history with text properties + (memq 'regexp-function (text-properties-at 0 isearch-string))))) (defun isearch-search-fun-default () "Return default functions to use for the search." diff --git a/lisp/replace.el b/lisp/replace.el index c28c9b3..ac37bd7 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -301,7 +301,9 @@ query-replace-read-args (to (if (consp from) (prog1 (cdr from) (setq from (car from))) (query-replace-read-to from prompt regexp-flag)))) (list from to - (and current-prefix-arg (not (eq current-prefix-arg '-))) + (or (and current-prefix-arg (not (eq current-prefix-arg '-))) + (and (memq 'isearch-regexp-function (text-properties-at 0 from)) + (get-text-property 0 'isearch-regexp-function from))) (and current-prefix-arg (eq current-prefix-arg '-))))) (defun query-replace (from-string to-string &optional delimited start end backward region-noncontiguous-p) @@ -2361,8 +2363,17 @@ perform-replace (message (if query-flag (apply 'propertize - (substitute-command-keys - "Query replacing %s with %s: (\\\\[help] for help) ") + (concat "Query replacing " + (if backward "backward " "") + (if delimited-flag + (or (and (symbolp delimited-flag) + (get delimited-flag + 'isearch-message-prefix)) + "word ") "") + (if regexp-flag "regexp " "") + "%s with %s: " + (substitute-command-keys + "(\\\\[help] for help) ")) minibuffer-prompt-properties)))) ;; Unless a single contiguous chunk is selected, operate on multiple chunks. @@ -2580,13 +2591,13 @@ perform-replace (with-output-to-temp-buffer "*Help*" (princ (concat "Query replacing " + (if backward "backward " "") (if delimited-flag (or (and (symbolp delimited-flag) (get delimited-flag 'isearch-message-prefix)) "word ") "") (if regexp-flag "regexp " "") - (if backward "backward " "") from-string " with " next-replacement ".\n\n" (substitute-command-keys --=-=-=-- From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Apr 2018 22:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 22479@debbugs.gnu.org Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.152374430123207 (code B ref 22479); Sat, 14 Apr 2018 22:19:02 +0000 Received: (at 22479) by debbugs.gnu.org; 14 Apr 2018 22:18:21 +0000 Received: from localhost ([127.0.0.1]:52863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7TUy-00062E-V9 for submit@debbugs.gnu.org; Sat, 14 Apr 2018 18:18:21 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:56376 helo=homiemail-a12.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7TUw-000626-T6 for 22479@debbugs.gnu.org; Sat, 14 Apr 2018 18:18:19 -0400 Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id DA33F262065; Sat, 14 Apr 2018 15:18:17 -0700 (PDT) Received: from localhost.linkov.net (m91-129-105-236.cust.tele2.ee [91.129.105.236]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPSA id 90D90262062; Sat, 14 Apr 2018 15:18:16 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> Date: Sun, 15 Apr 2018 00:22:50 +0300 In-Reply-To: <87bmftotph.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 12 Mar 2018 23:43:54 +0200") Message-ID: <871sfhmo7r.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>> Yes, this is a harder problem. We have to remember meta-data for >>> every search history element. There are several possibilities: >>> >>> 4. Adding meta-data by text-properties to the strings in >>> =E2=80=98search-ring=E2=80=99 and =E2=80=98regexp-search-ring=E2=80= =99 poses a problem of saving >>> the values in the desktop and restoring in another session. >> >> This feels like the best solution. I looked at desktop.el, and it >> doesn't save the properties, as you say. But it could be made to. Do y= ou >> think some external packages would get broken by this change? > > This seems to be the least radical change as concluded in > https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00296.html > The patch makes the search mode to be remembered in isearch as well as > in query-replace. As predicted, the solution with using text properties caused more trouble= : 1. To be able to use =E2=80=98C-s M-p=E2=80=99 and restore a previous sym= bol isearch it was necessary to let-bind minibuffer-allow-text-properties to t in isearch-edit-string. 2. To use a previous replacement with text properties required to replace =E2=80=98substring-no-properties=E2=80=99 with =E2=80=98substring=E2=80= =99 in =E2=80=98query-replace--split-string=E2=80=99. 3. For the same purpose to use e.g. =E2=80=98M-% M-p RET=E2=80=99 also re= quired to completely rewrite =E2=80=98query-replace-descr=E2=80=99 to keep text properties = non-destructively in the replacement string. I'm not sure if I found all problems or there will be more trouble, but at least these fixes were necessary for this patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-text-properties.3.patch diff --git a/lisp/isearch.el b/lisp/isearch.el index 15a1543..c0f6f92 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1105,7 +1105,9 @@ isearch-done (if (and (> (length isearch-string) 0) (not nopush)) ;; Update the ring data. - (isearch-update-ring isearch-string isearch-regexp)) + (isearch-update-ring isearch-string isearch-regexp + `(isearch-regexp-function ,isearch-regexp-function + isearch-case-fold-search ,isearch-case-fold-search))) (let ((isearch-mode-end-hook-quit (and nopush (not edit)))) (run-hooks 'isearch-mode-end-hook)) @@ -1121,13 +1123,14 @@ isearch-done (and (not edit) isearch-recursive-edit (exit-recursive-edit))) -(defun isearch-update-ring (string &optional regexp) +(defun isearch-update-ring (string &optional regexp properties) "Add STRING to the beginning of the search ring. REGEXP if non-nil says use the regexp search ring." (add-to-history (if regexp 'regexp-search-ring 'search-ring) - string - (if regexp regexp-search-ring-max search-ring-max))) + (if properties (apply 'propertize string properties) string) + (if regexp regexp-search-ring-max search-ring-max) + t)) ;; Switching buffers should first terminate isearch-mode. ;; ;; For Emacs 19, the frame switch event is handled. @@ -1342,6 +1345,13 @@ with-isearch-suspended multi-isearch-file-list multi-isearch-file-list-new multi-isearch-buffer-list multi-isearch-buffer-list-new) + (when (memq 'isearch-regexp-function (text-properties-at 0 isearch-string)) + (setq isearch-regexp-function + (get-text-property 0 'isearch-regexp-function isearch-string))) + (when (memq 'isearch-case-fold-search (text-properties-at 0 isearch-string)) + (setq isearch-case-fold-search + (get-text-property 0 'isearch-case-fold-search isearch-string))) + ;; Restore the minibuffer message before moving point. (funcall (or isearch-message-function #'isearch-message) nil t) @@ -1408,7 +1418,9 @@ isearch-edit-string (history-add-new-input nil) ;; Binding minibuffer-history-symbol to nil is a work-around ;; for some incompatibility with gmhist. - (minibuffer-history-symbol)) + (minibuffer-history-symbol) + ;; Search string might have meta information on text properties. + (minibuffer-allow-text-properties t)) (setq isearch-new-string (read-from-minibuffer (isearch-message-prefix nil isearch-nonincremental) @@ -1836,7 +1848,11 @@ isearch-query-replace ;; `exit-recursive-edit' in `isearch-done' that terminates ;; the execution of this command when it is non-nil. ;; We call `exit-recursive-edit' explicitly at the end below. - (isearch-recursive-edit nil)) + (isearch-recursive-edit nil) + (isearch-string-propertized + (propertize isearch-string + 'isearch-regexp-function isearch-regexp-function + 'isearch-case-fold-search isearch-case-fold-search))) (isearch-done nil t) (isearch-clean-overlays) (if (and isearch-other-end @@ -1849,12 +1865,12 @@ isearch-query-replace (< (mark) (point)))))) (goto-char isearch-other-end)) (set query-replace-from-history-variable - (cons isearch-string + (cons isearch-string-propertized (symbol-value query-replace-from-history-variable))) (perform-replace - isearch-string + isearch-string-propertized (query-replace-read-to - isearch-string + isearch-string-propertized (concat "Query replace" (isearch--describe-regexp-mode (or delimited isearch-regexp-function) t) (if backward " backward" "") @@ -2562,7 +2578,13 @@ isearch-ring-adjust1 length))) (setq isearch-string (nth yank-pointer ring) isearch-message (mapconcat 'isearch-text-char-description - isearch-string ""))))) + isearch-string "")) + (when (memq 'isearch-regexp-function (text-properties-at 0 isearch-string)) + (setq isearch-regexp-function + (get-text-property 0 'isearch-regexp-function isearch-string))) + (when (memq 'isearch-case-fold-search (text-properties-at 0 isearch-string)) + (setq isearch-case-fold-search + (get-text-property 0 'isearch-case-fold-search isearch-string)))))) (defun isearch-ring-adjust (advance) ;; Helper for isearch-ring-advance and isearch-ring-retreat @@ -2778,11 +2800,17 @@ isearch-search-fun (defun isearch--lax-regexp-function-p () "Non-nil if next regexp-function call should be lax." - (not (or isearch-nonincremental - (null (car isearch-cmds)) - (eq (length isearch-string) - (length (isearch--state-string - (car isearch-cmds))))))) + ;; FIXME: maybe simpler to use this: + (or (memq this-command '(isearch-printing-char isearch-del-char)) + isearch-yank-flag) + ;; (not (or isearch-nonincremental + ;; (null (car isearch-cmds)) + ;; (eq (length isearch-string) + ;; (length (isearch--state-string + ;; (car isearch-cmds)))) + ;; ;; Search string comes from the history with text properties + ;; (memq 'isearch-regexp-function (text-properties-at 0 isearch-string)))) + ) (defun isearch-search-fun-default () "Return default functions to use for the search." diff --git a/lisp/replace.el b/lisp/replace.el index 4916cb1..b943a2e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -147,16 +147,27 @@ replace-count See `replace-regexp' and `query-replace-regexp-eval'.") (defun query-replace-descr (string) - (mapconcat 'isearch-text-char-description string "")) + (let ((string (copy-sequence string))) + (dotimes (i (length string) string) + (let ((c (aref string i))) + (cond + ((< c ?\s) (add-text-properties + i (1+ i) + `(display ,(propertize (format "^%c" (+ c 64)) 'face 'escape-glyph)) + string)) + ((= c ?\^?) (add-text-properties + i (1+ i) + `(display ,(propertize "^?" 'face 'escape-glyph)) + string))))))) (defun query-replace--split-string (string) "Split string STRING at a substring with property `separator'." (let* ((length (length string)) (split-pos (text-property-any 0 length 'separator t string))) (if (not split-pos) - (substring-no-properties string) - (cons (substring-no-properties string 0 split-pos) - (substring-no-properties + string + (cons (substring string 0 split-pos) + (substring string (or (text-property-not-all (1+ split-pos) length 'separator t string) length) @@ -301,7 +312,9 @@ query-replace-read-args (to (if (consp from) (prog1 (cdr from) (setq from (car from))) (query-replace-read-to from prompt regexp-flag)))) (list from to - (and current-prefix-arg (not (eq current-prefix-arg '-))) + (or (and current-prefix-arg (not (eq current-prefix-arg '-))) + (and (memq 'isearch-regexp-function (text-properties-at 0 from)) + (get-text-property 0 'isearch-regexp-function from))) (and current-prefix-arg (eq current-prefix-arg '-))))) (defun query-replace (from-string to-string &optional delimited start end backward region-noncontiguous-p) @@ -2361,8 +2372,17 @@ perform-replace (message (if query-flag (apply 'propertize - (substitute-command-keys - "Query replacing %s with %s: (\\\\[help] for help) ") + (concat "Query replacing " + (if backward "backward " "") + (if delimited-flag + (or (and (symbolp delimited-flag) + (get delimited-flag + 'isearch-message-prefix)) + "word ") "") + (if regexp-flag "regexp " "") + "%s with %s: " + (substitute-command-keys + "(\\\\[help] for help) ")) minibuffer-prompt-properties)))) ;; Unless a single contiguous chunk is selected, operate on multiple chunks. @@ -2580,13 +2600,13 @@ perform-replace (with-output-to-temp-buffer "*Help*" (princ (concat "Query replacing " + (if backward "backward " "") (if delimited-flag (or (and (symbolp delimited-flag) (get delimited-flag 'isearch-message-prefix)) "word ") "") (if regexp-flag "regexp " "") - (if backward "backward " "") from-string " with " next-replacement ".\n\n" (substitute-command-keys --=-=-=-- From unknown Sat Aug 16 21:20:15 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dima Kogan Subject: bug#22479: closed (Re: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols) Message-ID: References: <87efjb2bub.fsf@mail.linkov.net> <87zivq8xp2.fsf@secretsauce.net> X-Gnu-PR-Message: they-closed 22479 X-Gnu-PR-Package: emacs Reply-To: 22479@debbugs.gnu.org Date: Thu, 19 Apr 2018 20:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1524169982-14892-1" This is a multi-part message in MIME format... ------------=_1524169982-14892-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22479: 25.0.50; isearch and query-replace histories do not remember if we = were looking for symbols which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22479@debbugs.gnu.org. --=20 22479: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22479 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1524169982-14892-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22479-done) by debbugs.gnu.org; 19 Apr 2018 20:32:59 +0000 Received: from localhost ([127.0.0.1]:33270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9GEl-0003rw-52 for submit@debbugs.gnu.org; Thu, 19 Apr 2018 16:32:59 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:57168 helo=homiemail-a18.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9GEj-0003rn-HK for 22479-done@debbugs.gnu.org; Thu, 19 Apr 2018 16:32:57 -0400 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 96BDD258069; Thu, 19 Apr 2018 13:32:56 -0700 (PDT) Received: from localhost.linkov.net (m91-129-110-22.cust.tele2.ee [91.129.110.22]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPSA id 9F729258068; Thu, 19 Apr 2018 13:32:55 -0700 (PDT) From: Juri Linkov To: Dima Kogan Subject: Re: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> <871sfhmo7r.fsf@mail.linkov.net> Date: Thu, 19 Apr 2018 23:32:04 +0300 In-Reply-To: <871sfhmo7r.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 15 Apr 2018 00:22:50 +0300") Message-ID: <87efjb2bub.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22479-done Cc: 22479-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 27.0.50 > I'm not sure if I found all problems or there will be more trouble, > but at least these fixes were necessary for this patch: Pushed to master as 99de04e. ------------=_1524169982-14892-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Jan 2016 22:28:09 +0000 Received: from localhost ([127.0.0.1]:39006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOYZN-00078m-IN for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52846) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aOYZM-00078Z-3R for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOYZG-0002VL-2a for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYZF-0002VH-VY for submit@debbugs.gnu.org; Wed, 27 Jan 2016 17:28:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYZF-0008TT-1X for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 17:28:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOYZA-0002U9-1e for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 17:28:00 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:54013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYZ9-0002U3-Pi for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 17:27:55 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5359321AF1 for ; Wed, 27 Jan 2016 17:27:55 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 27 Jan 2016 17:27:55 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=kfdPyZC2oWbutJ36jeFxsYpUH1I =; b=Wh4jpWk7zVYxJE6CiYeLhUqv8txZ8rmw/RR2nX5sMRYoUJzN/5QAgq0NAl/ 3q6uoz5N33+fee8V9AOj/fhkcDYo8mxzTFnpKKfkjOyRPDA6gjAEQccMRmR50Lho eLerjkeegRYQ2UFkasVfBm467wxxzbYCypPvTL5QazoOBhTI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=kf dPyZC2oWbutJ36jeFxsYpUH1I=; b=hwzWpsjbwmTlb5uekys7ArqJIQ2AQkz0R1 5peNUQjmXNf6vsBpCZ5/lb6/JadWakrUa1FtSdH3Pf+dfJE2+st4kyCIFcKtrXfe FCcYcroRKav0SiwvgBQEHUbZQCXop8ooSYbU7dFWo9wyoN6LE+Wik2m4WDukdVl9 PnelKMQEs= X-Sasl-enc: M9F4eGHXCchZY4M57hTSBlYziNWbSIf6VO35OAuQvkcL 1453933675 Received: from shorty.local (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id F18506800FD for ; Wed, 27 Jan 2016 17:27:54 -0500 (EST) Received: from ip6-localhost ([::1] helo=shorty) by shorty.local with esmtp (Exim 4.84) (envelope-from ) id 1aOYZ7-0005MY-Pt for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 14:27:53 -0800 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Date: Wed, 27 Jan 2016 14:27:53 -0800 Message-ID: <87zivq8xp2.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi. It is possible to look for a symbol, and for this information to be lost when repeating a search. For instance, say I have this buffer: ======= a b c ab bc ======= 1. I put the point on the first 'a' 2. M-s . (search for symbol at point). This find a symbol 'a', so the 'a' in 'ab' doesn't match 3. C-g (quit the search) 4. C-s C-s (repeat previous search). Here emacs remembers we looked for 'a', but not that it was a symbol, so it finds the 'a' in 'ab' even though it should not A similar sequence is possible with query-replace: 1. Point on 'a' 2. M-s . 3. C-M-%, 'asdf' to replace the symbol 'a' with 'asdf' 4. C-g (quit before replacing anything) 5. C-M-% (repeat last replacement. The symbol-ness of 'a' was forgotten) The simplest way to fix this would probably be to treat these as regex searches wrapped in \_<...\_>. The downside is that to access the history we'd have to do C-M-s C-M-s instead of C-s C-s, but maybe that is ok. Thoughts? ------------=_1524169982-14892-1-- From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Apr 2018 07:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org, dima@secretsauce.net Reply-To: Eli Zaretskii Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.152420938315193 (code B ref 22479); Fri, 20 Apr 2018 07:30:02 +0000 Received: (at 22479) by debbugs.gnu.org; 20 Apr 2018 07:29:43 +0000 Received: from localhost ([127.0.0.1]:33455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9QUJ-0003wz-88 for submit@debbugs.gnu.org; Fri, 20 Apr 2018 03:29:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9QUH-0003wk-2B for 22479@debbugs.gnu.org; Fri, 20 Apr 2018 03:29:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9QUB-00085s-8F for 22479@debbugs.gnu.org; Fri, 20 Apr 2018 03:29:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9QU4-0007ed-Kz; Fri, 20 Apr 2018 03:29:28 -0400 Received: from [176.228.60.248] (port=3716 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f9QU3-0004KS-Q4; Fri, 20 Apr 2018 03:29:28 -0400 Date: Fri, 20 Apr 2018 10:29:42 +0300 Message-Id: <834lk6z66x.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87efjb2bub.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 19 Apr 2018 23:32:04 +0300) References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> <871sfhmo7r.fsf@mail.linkov.net> <87efjb2bub.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Date: Thu, 19 Apr 2018 23:32:04 +0300 > Cc: 22479-done@debbugs.gnu.org > > Version: 27.0.50 > > > I'm not sure if I found all problems or there will be more trouble, > > but at least these fixes were necessary for this patch: > > Pushed to master as 99de04e. Thanks. This change seems to have some user-visible effects, in which case it should be in NEWS and in the manual. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Apr 2018 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 22479@debbugs.gnu.org, dima@secretsauce.net Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.15243410201880 (code B ref 22479); Sat, 21 Apr 2018 20:04:02 +0000 Received: (at 22479) by debbugs.gnu.org; 21 Apr 2018 20:03:40 +0000 Received: from localhost ([127.0.0.1]:35182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9yjU-0000UG-7U for submit@debbugs.gnu.org; Sat, 21 Apr 2018 16:03:40 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:53637 helo=homiemail-a100.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f9yjS-0000U7-4g for 22479@debbugs.gnu.org; Sat, 21 Apr 2018 16:03:39 -0400 Received: from homiemail-a100.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTP id A10D031A073; Sat, 21 Apr 2018 13:03:37 -0700 (PDT) Received: from localhost.linkov.net (m91-129-110-22.cust.tele2.ee [91.129.110.22]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a100.g.dreamhost.com (Postfix) with ESMTPSA id 9053D31A070; Sat, 21 Apr 2018 13:03:36 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> <871sfhmo7r.fsf@mail.linkov.net> <87efjb2bub.fsf@mail.linkov.net> <834lk6z66x.fsf@gnu.org> Date: Sat, 21 Apr 2018 23:02:54 +0300 In-Reply-To: <834lk6z66x.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 20 Apr 2018 10:29:42 +0300") Message-ID: <87r2n8tjip.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Pushed to master as 99de04e. > > Thanks. > > This change seems to have some user-visible effects, in which case it > should be in NEWS and in the manual. This change remembers the search mode in the history and reuses it in repeated searches. This can be mentioned in NEWS, but I have no idea what to document in the manual. Maybe this feature should be configurable, then its customization can be documented in the manual. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Apr 2018 02:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org, dima@secretsauce.net Reply-To: Eli Zaretskii Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.152436468511954 (code B ref 22479); Sun, 22 Apr 2018 02:39:01 +0000 Received: (at 22479) by debbugs.gnu.org; 22 Apr 2018 02:38:05 +0000 Received: from localhost ([127.0.0.1]:35284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fA4tA-00036k-Mw for submit@debbugs.gnu.org; Sat, 21 Apr 2018 22:38:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fA4t9-00036G-Mw for 22479@debbugs.gnu.org; Sat, 21 Apr 2018 22:38:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fA4t3-0004ch-Tx for 22479@debbugs.gnu.org; Sat, 21 Apr 2018 22:37: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=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fA4sz-0004ZR-2q; Sat, 21 Apr 2018 22:37:53 -0400 Received: from [176.228.60.248] (port=3052 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fA4sy-00068u-IE; Sat, 21 Apr 2018 22:37:52 -0400 Date: Sun, 22 Apr 2018 05:37:40 +0300 Message-Id: <8336zox8y3.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87r2n8tjip.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 21 Apr 2018 23:02:54 +0300) References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> <871sfhmo7r.fsf@mail.linkov.net> <87efjb2bub.fsf@mail.linkov.net> <834lk6z66x.fsf@gnu.org> <87r2n8tjip.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Cc: 22479@debbugs.gnu.org, dima@secretsauce.net > Date: Sat, 21 Apr 2018 23:02:54 +0300 > > >> Pushed to master as 99de04e. > > > > Thanks. > > > > This change seems to have some user-visible effects, in which case it > > should be in NEWS and in the manual. > > This change remembers the search mode in the history and reuses it in > repeated searches. This can be mentioned in NEWS, but I have no idea > what to document in the manual. The manual can say what NEWS says, for starters. It also seemed to me that the Isearch prompt has changed a little; if that is true, maybe that should be documented. From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Apr 2018 22:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 22479@debbugs.gnu.org, dima@secretsauce.net Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.15244351653012 (code B ref 22479); Sun, 22 Apr 2018 22:13:02 +0000 Received: (at 22479) by debbugs.gnu.org; 22 Apr 2018 22:12:45 +0000 Received: from localhost ([127.0.0.1]:36189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fANDx-0000mW-4p for submit@debbugs.gnu.org; Sun, 22 Apr 2018 18:12:45 -0400 Received: from sub3.mail.dreamhost.com ([69.163.253.7]:33787 helo=homiemail-a23.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fANDv-0000mN-BP for 22479@debbugs.gnu.org; Sun, 22 Apr 2018 18:12:43 -0400 Received: from homiemail-a23.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTP id 52DFA4B0063; Sun, 22 Apr 2018 15:12:42 -0700 (PDT) Received: from localhost.linkov.net (m91-129-96-255.cust.tele2.ee [91.129.96.255]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a23.g.dreamhost.com (Postfix) with ESMTPSA id 422874B0062; Sun, 22 Apr 2018 15:12:41 -0700 (PDT) From: Juri Linkov Organization: LINKOV.NET References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> <871sfhmo7r.fsf@mail.linkov.net> <87efjb2bub.fsf@mail.linkov.net> <834lk6z66x.fsf@gnu.org> <87r2n8tjip.fsf@mail.linkov.net> <8336zox8y3.fsf@gnu.org> Date: Mon, 23 Apr 2018 01:11:18 +0300 In-Reply-To: <8336zox8y3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 22 Apr 2018 05:37:40 +0300") Message-ID: <87bmeaaphd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> > This change seems to have some user-visible effects, in which case it >> > should be in NEWS and in the manual. >> >> This change remembers the search mode in the history and reuses it in >> repeated searches. This can be mentioned in NEWS, but I have no idea >> what to document in the manual. > > The manual can say what NEWS says, for starters. > > It also seemed to me that the Isearch prompt has changed a little; if > that is true, maybe that should be documented. Now the prompt has changed a little. Should this be mentioned in NEWS, or this fact is self-evident? From unknown Sat Aug 16 21:20:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Apr 2018 02:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 22479@debbugs.gnu.org, dima@secretsauce.net Reply-To: Eli Zaretskii Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.152445088426164 (code B ref 22479); Mon, 23 Apr 2018 02:35:02 +0000 Received: (at 22479) by debbugs.gnu.org; 23 Apr 2018 02:34:44 +0000 Received: from localhost ([127.0.0.1]:36325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fARJU-0006nw-3J for submit@debbugs.gnu.org; Sun, 22 Apr 2018 22:34:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fARJR-0006nh-U9 for 22479@debbugs.gnu.org; Sun, 22 Apr 2018 22:34:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fARJM-0005mf-1U for 22479@debbugs.gnu.org; Sun, 22 Apr 2018 22:34:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fARJG-0005jM-W0; Sun, 22 Apr 2018 22:34:31 -0400 Received: from [176.228.60.248] (port=3297 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fARJG-0004v4-Dr; Sun, 22 Apr 2018 22:34:30 -0400 Date: Mon, 23 Apr 2018 05:34:20 +0300 Message-Id: <83r2n6wt03.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87bmeaaphd.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 23 Apr 2018 01:11:18 +0300) References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <87k2mk3orm.fsf@secretsauce.net> <87bmftotph.fsf@mail.linkov.net> <871sfhmo7r.fsf@mail.linkov.net> <87efjb2bub.fsf@mail.linkov.net> <834lk6z66x.fsf@gnu.org> <87r2n8tjip.fsf@mail.linkov.net> <8336zox8y3.fsf@gnu.org> <87bmeaaphd.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Juri Linkov > Cc: 22479@debbugs.gnu.org, dima@secretsauce.net > Date: Mon, 23 Apr 2018 01:11:18 +0300 > > > The manual can say what NEWS says, for starters. > > > > It also seemed to me that the Isearch prompt has changed a little; if > > that is true, maybe that should be documented. > > Now the prompt has changed a little. Should this be mentioned in NEWS, > or this fact is self-evident? I think every user-visible change should be called out in NEWS, especially if the prompt itself may need some explanation (e.g., due to abbreviated words, acronyms, etc.).