From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Date: Thu, 28 Jan 2016 01:08:20 +0200 Organization: LINKOV.NET Message-ID: <87r3h2boyj.fsf@mail.linkov.net> References: <87zivq8xp2.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453943989 4147 80.91.229.3 (28 Jan 2016 01:19:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2016 01:19:49 +0000 (UTC) Cc: 22479@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 28 00:10:10 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aOZE2-0004mR-C2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Jan 2016 00:10:10 +0100 Original-Received: from localhost ([::1]:53017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOZE1-0004CR-9w for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jan 2016 18:10:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOZDx-0004C6-EI for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 18:10:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOZDu-0005ln-8a for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 18:10:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOZDu-0005lj-5W for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 18:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aOZDt-00089R-SI for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2016 18:10:01 -0500 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.145393616031275 (code B ref 22479); Wed, 27 Jan 2016 23:10:01 +0000 Original-Received: (at 22479) by debbugs.gnu.org; 27 Jan 2016 23:09:20 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <87zivq8xp2.fsf@secretsauce.net> (Dima Kogan's message of "Wed, 27 Jan 2016 14:27:53 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112044 > 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.