From unknown Fri Jun 20 18:24:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#24801 <24801@debbugs.gnu.org> To: bug#24801 <24801@debbugs.gnu.org> Subject: Status: 25.1; Reverse regexp search highlighting Reply-To: bug#24801 <24801@debbugs.gnu.org> Date: Sat, 21 Jun 2025 01:24:36 +0000 retitle 24801 25.1; Reverse regexp search highlighting reassign 24801 emacs submitter 24801 Drew Adams severity 24801 minor tag 24801 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 12:24:23 2016 Received: (at submit) by debbugs.gnu.org; 26 Oct 2016 16:24:23 +0000 Received: from localhost ([127.0.0.1]:57755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzR03-0008Vn-90 for submit@debbugs.gnu.org; Wed, 26 Oct 2016 12:24:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzR00-0008VZ-H6 for submit@debbugs.gnu.org; Wed, 26 Oct 2016 12:24:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzQzu-00006Y-HN for submit@debbugs.gnu.org; Wed, 26 Oct 2016 12:24:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,LONGWORDS, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54418) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzQzu-00006G-Dq for submit@debbugs.gnu.org; Wed, 26 Oct 2016 12:24:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzQzt-0000iW-9R for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 12:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzQzo-0008Rk-W4 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 12:24:13 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:40570) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzQzo-0008Qm-NW for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2016 12:24:08 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u9QGO7wb030105 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 26 Oct 2016 16:24:07 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u9QGO6L2031480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 Oct 2016 16:24:07 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u9QGO42j013482 for ; Wed, 26 Oct 2016 16:24:05 GMT MIME-Version: 1.0 Message-ID: <4efa49bf-c223-4148-a291-12a722db033c@default> Date: Wed, 26 Oct 2016 09:24:02 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 25.1; Reverse regexp search highlighting X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: multipart/mixed; boundary="__1477499044215186212abhmp0015.oracle.com" X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.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: -1.7 (-) 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: -1.7 (-) --__1477499044215186212abhmp0015.oracle.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable emacs -Q Visit the attached file in text mode. `C-M-s aa.*' and repeat. highlighting seems fine, and search moves forward with one search hit per line, with that search hit including all of the consecutive a's in the line. `C-M-r' and repeat (same search pattern). Search hits are just _pairs_ of consecutive a's (so more than one hit per line), and lines that have an odd number of consecutive a's do not include the first a in a search hit. This seems wrong. Am I missing something, or is this a bug? I see this behavior in Emacs 23 and later, but not in Emacs 22 and before, so I'm guessing this change is maybe intentional. But it's not clear to me why it would be. In GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17 built on LAPHROAIG Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Configured using: 'configure --without-dbus --without-compress-install CFLAGS=3D-static' --__1477499044215186212abhmp0015.oracle.com Content-Type: text/plain; charset=Windows-1252; name="throw-C-M-r--aa-dot-star.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="throw-C-M-r--aa-dot-star.txt" a~ a aa~ aa aaa aaaa aaaaa~ aaaaa aaaaaa~ aaaaaa aaaaaaa aaaaaaaa aaaaaaaaa aaaaaaaaaa aaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa baaaaaaaaaaaaaaaaaaa --__1477499044215186212abhmp0015.oracle.com-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 18:41:49 2016 Received: (at 24801) by debbugs.gnu.org; 26 Oct 2016 22:41:49 +0000 Received: from localhost ([127.0.0.1]:57966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzWtI-0003rj-QG for submit@debbugs.gnu.org; Wed, 26 Oct 2016 18:41:49 -0400 Received: from mail-yw0-f179.google.com ([209.85.161.179]:33029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzWtH-0003rW-9w for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 18:41:47 -0400 Received: by mail-yw0-f179.google.com with SMTP id p22so9261867ywe.0 for <24801@debbugs.gnu.org>; Wed, 26 Oct 2016 15:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+aMf4B/XII+9f+pEe8XIz8/DH/tBb119KQ4CRqs//3c=; b=MmwPCA56B0uNpvUOmAsp4hbl+EjlwI84MHoSeb79yEFvCRFYc9aQYVQV+sNUxxHGqQ 5+rLoe6AjS6rG1PuG4rhOWSJQKQZEVXWui7e1G0l4okQHqXopefyjwZ7QUrFT8MBN7kN OW6/9Wu9g5FfiMKsMTD9aXtZaljP75QEHGzSMZOgvpe06qGJSYwWwMsNPcDPTvHaIKPG O4Nng1lnR95IcbUYyUHXhy8CHGe/b+0rHERy5CIHN2pEqj2gB9vlHh7Mo8TN6QYeowyy t6sTGhmF8lJBA4WAWd3FE23wP2qdHP+pvIgp7+fQTE4pQST2i70exIY71tPzZueEUz2B 8Slg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=+aMf4B/XII+9f+pEe8XIz8/DH/tBb119KQ4CRqs//3c=; b=TDgwA/pe1qzu2AKMgUofwKxwkR95PAa4kSWDCkXLuv5uv0MCt7WYz/gaoAm5LD/nXR +Rg7jEvnz+kATa04A/+k4MwkygFTHAaotf9uM7NdecW62KJvxp59eFomCbUFaE46PmoJ lQ1N8NiETo1IXDFO5BO5pAMQan/BxwLrE3PHRib3g8EqPpaoPaa2KS8LDnCVkDDETPWA mC3CUhmEUtysktiklINGbD5oCPsgaRPMazZYeAAoTl8C85j1SUReOpzXfw6Wy1Jjn1ba Ms8LbMMU7moooXNW3tbqUOWdAHu5a31uOzbtFfGyoSLLvnB9bST13YUaS273vKy2yVnd EJIA== X-Gm-Message-State: ABUngvczEmCZ/M/ppPSVgNd62wjJ6PG6QZaSGHjFJcZoOHYHWTb3VnBGSMIgCh37JFARpw== X-Received: by 10.36.115.6 with SMTP id y6mr8310726itb.77.1477521701695; Wed, 26 Oct 2016 15:41:41 -0700 (PDT) Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id j98sm1823758ioo.11.2016.10.26.15.41.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Oct 2016 15:41:41 -0700 (PDT) From: npostavs@users.sourceforge.net To: Drew Adams Subject: Re: bug#24801: 25.1; Reverse regexp search highlighting References: <4efa49bf-c223-4148-a291-12a722db033c@default> Date: Wed, 26 Oct 2016 18:42:20 -0400 In-Reply-To: <4efa49bf-c223-4148-a291-12a722db033c@default> (Drew Adams's message of "Wed, 26 Oct 2016 09:24:02 -0700 (PDT)") Message-ID: <8737jispf7.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 24801 Cc: 24801@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: 0.7 (/) Drew Adams writes: > emacs -Q > > Visit the attached file in text mode. > > `C-M-s aa.*' and repeat. highlighting seems fine, and search moves > forward with one search hit per line, with that search hit including all > of the consecutive a's in the line. > > `C-M-r' and repeat (same search pattern). Search hits are just _pairs_ > of consecutive a's (so more than one hit per line), and lines that have > an odd number of consecutive a's do not include the first a in a search > hit. > > This seems wrong. Am I missing something, or is this a bug? > > I see this behavior in Emacs 23 and later, but not in Emacs 22 and > before, so I'm guessing this change is maybe intentional. But it's not > clear to me why it would be. `(elisp) Regexp Search', under `re-search-backward' says: This function is analogous to `re-search-forward', but they are not simple mirror images. `re-search-forward' finds the match whose beginning is as close as possible to the starting point. If `re-search-backward' were a perfect mirror image, it would find the match whose end is as close as possible. However, in fact it finds the match whose beginning is as close as possible (and yet ends before the starting point). The reason for this is that matching a regular expression at a given spot always works from beginning to end, and starts at a specified beginning position. A true mirror-image of `re-search-forward' would require a special feature for matching regular expressions from end to beginning. It's not worth the trouble of implementing that. And the texi source says the same at tag emacs-22.1; I've only built Emacs back to 23.4 though, so I can't test it. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 19:23:37 2016 Received: (at 24801) by debbugs.gnu.org; 26 Oct 2016 23:23:37 +0000 Received: from localhost ([127.0.0.1]:58031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzXXl-0004q6-6f for submit@debbugs.gnu.org; Wed, 26 Oct 2016 19:23:37 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:20647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzXXj-0004pu-GW for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 19:23:35 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u9QNNS0J014566 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Oct 2016 23:23:29 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u9QNNRAC026454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Oct 2016 23:23:28 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u9QNNR6b016528; Wed, 26 Oct 2016 23:23:27 GMT MIME-Version: 1.0 Message-ID: <5537d36d-a365-4a3f-97a3-78c32e86e7ea@default> Date: Wed, 26 Oct 2016 16:23:26 -0700 (PDT) From: Drew Adams To: npostavs@users.sourceforge.net Subject: RE: bug#24801: 25.1; Reverse regexp search highlighting References: <4efa49bf-c223-4148-a291-12a722db033c@default> <8737jispf7.fsf@users.sourceforge.net> In-Reply-To: <8737jispf7.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 24801 Cc: 24801@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: -3.6 (---) > `(elisp) Regexp Search', under `re-search-backward' says:... That has always been the case. The same node from Emacs 20.7 says the same thing: - Command: re-search-backward REGEXP &optional LIMIT NOERROR REPEAT This function searches backward in the current buffer for a string of text that is matched by the regular expression REGEXP, leaving point at the beginning of the first text found. This function is analogous to `re-search-forward', but they are not simple mirror images. `re-search-forward' finds the match whose beginning is as close as possible to the starting point. If `re-search-backward' were a perfect mirror image, it would find the match whose end is as close as possible. However, in fact it finds the match whose beginning is as close as possible. The reason is that matching a regular expression at a given spot always works from beginning to end, and starts at a specified beginning position. A true mirror-image of `re-search-forward' would require a special feature for matching regular expressions from end to beginning. It's not worth the trouble of implementing that. I don't think that description is germain to this bug report, except insofar as what it describes is _not_ the behavior reported. This really looks like a bug to me. But regexp search is so basic to Emacs, and this has been like this since Emacs 23, so I can only guess that the change in behavior must have been intentional. But if so, why? What's the advantage/point of such behavior? In Emacs 23.4, `C-h n', then `C-s search', shows that there were a zillion changes in Isearch behavior. But this one is not mentioned at all. I have to guess (so far) that this is a bug that was introduced when implementing one or more of those zillion documented changes. But if so, why has no one reported it before? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 19:35:39 2016 Received: (at 24801) by debbugs.gnu.org; 26 Oct 2016 23:35:39 +0000 Received: from localhost ([127.0.0.1]:58061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzXjP-00057Z-Ba for submit@debbugs.gnu.org; Wed, 26 Oct 2016 19:35:39 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:34573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzXjN-00057L-B4 for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 19:35:37 -0400 Received: by mail-oi0-f49.google.com with SMTP id a195so19117977oib.1 for <24801@debbugs.gnu.org>; Wed, 26 Oct 2016 16:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oUEEeZoLKAtQvOHrwSNt0X/qxFAEg8Ykj9lqknbkx5I=; b=eJa6vF73Ngc2MVjaSw1AXUrjW208In7k8Ew6NFeWjM0ibXn9bhHSfWqv1/BYSITGWA SXN2Hesi32Z4Bd6FMpzf9Y4XBXgRRMZRLk/QddOUhg5QI7aoheO9YEcLkPaW3PE/E0Fs 5T3olVoDtKvdOwz7mRQsV0MNk8aYbB/8SfPFLR1cYgOar98B6WCfUfMrLKEvrDjorAbD wquyKXEHxCbccip5VBPIQgs5id0WlCn6S8vdCvIy8ZoBpBcrBY210J60khgRm/2VJzCW Kkbg0gBdHb91Ou9g5z26X6d/ujNXzb8Axc8stmsIs8TcGdOXO1mSIQ5/+r3i95G3aXX/ IQ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=oUEEeZoLKAtQvOHrwSNt0X/qxFAEg8Ykj9lqknbkx5I=; b=EYZ2Qlyzl1cyWvUDFi3TieeG4tbRZUDXJNATmbdcB6KHpQNtmD4Bkh7ehl81Jw/HN0 nOAez6qwoGubMARY1Idawrl7acAWvRMjutw/m6txNMjTq6ghwbz/ad6cuKl22dbGxTOy QiKNIeOFUbJo9n6EQSyxB+xhN5D9oVcUV4oemu6sGS42J6pD/teKyklhPFTUkmHB4kY3 fBeaVGcthi6AiimWap//WNNizv63aiolTg/9zhxw7Har83z0dGBNzyAbf7unMHDOTq1A PW2jlizddV2Fk+qeTgLSwxL+LrCA6Qxoqhtp6MTqPCqB9gdOpBrMyvARu/aya/tsHiFg ei0Q== X-Gm-Message-State: ABUngvclxekuGGJ5knyGHhWn52wx0xJPRqXRCGadyuQcKPU8SrE/LzXOl3OVGcxYoJF/3A== X-Received: by 10.107.175.218 with SMTP id p87mr5271072ioo.80.1477524931296; Wed, 26 Oct 2016 16:35:31 -0700 (PDT) Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id v197sm31122ita.0.2016.10.26.16.35.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Oct 2016 16:35:30 -0700 (PDT) From: npostavs@users.sourceforge.net To: Drew Adams Subject: Re: bug#24801: 25.1; Reverse regexp search highlighting References: <4efa49bf-c223-4148-a291-12a722db033c@default> <8737jispf7.fsf@users.sourceforge.net> <5537d36d-a365-4a3f-97a3-78c32e86e7ea@default> Date: Wed, 26 Oct 2016 19:36:10 -0400 In-Reply-To: <5537d36d-a365-4a3f-97a3-78c32e86e7ea@default> (Drew Adams's message of "Wed, 26 Oct 2016 16:23:26 -0700 (PDT)") Message-ID: <87zilqr8d1.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 24801 Cc: 24801@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: 0.2 (/) Drew Adams writes: >> `(elisp) Regexp Search', under `re-search-backward' says:... > [...] > If > `re-search-backward' were a perfect mirror image, it would find the > match whose end is as close as possible. However, in fact it > finds the match whose beginning is as close as possible. [...] > > I don't think that description is germain to this bug report, except > insofar as what it describes is _not_ the behavior reported. > Isn't it? The match of aa.* "whose beginning is as close as possible" when point is at the of a line of a's, is "aa". So it seems expected that searching backwards would match pairs of a's. > This really looks like a bug to me. But regexp search is so basic > to Emacs, and this has been like this since Emacs 23, so I can only > guess that the change in behavior must have been intentional. But > if so, why? What's the advantage/point of such behavior? Can you describe exactly how the behaviour is different in Emacs 22? > > In Emacs 23.4, `C-h n', then `C-s search', shows that there were a > zillion changes in Isearch behavior. But this one is not mentioned > at all. > > I have to guess (so far) that this is a bug that was introduced when > implementing one or more of those zillion documented changes. But > if so, why has no one reported it before? Actually, this report looks similar to 9681, although I see no claims there that it worked in version 22. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 21:52:06 2016 Received: (at 24801) by debbugs.gnu.org; 27 Oct 2016 01:52:06 +0000 Received: from localhost ([127.0.0.1]:58476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzZrR-0008JN-Tt for submit@debbugs.gnu.org; Wed, 26 Oct 2016 21:52:06 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:43636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzZrQ-0008It-03 for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 21:52:04 -0400 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 u9R1pvlL003768 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Oct 2016 01:51:57 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id u9R1puCJ004661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Oct 2016 01:51:56 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 u9R1ps1w015118; Thu, 27 Oct 2016 01:51:55 GMT MIME-Version: 1.0 Message-ID: <152b38c0-5aff-4c96-b976-8df0cbb3199a@default> Date: Wed, 26 Oct 2016 18:51:53 -0700 (PDT) From: Drew Adams To: npostavs@users.sourceforge.net Subject: RE: bug#24801: 25.1; Reverse regexp search highlighting References: <4efa49bf-c223-4148-a291-12a722db033c@default> <8737jispf7.fsf@users.sourceforge.net> <5537d36d-a365-4a3f-97a3-78c32e86e7ea@default> <87zilqr8d1.fsf@users.sourceforge.net> In-Reply-To: <87zilqr8d1.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.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: -3.1 (---) X-Debbugs-Envelope-To: 24801 Cc: 24801@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: -3.1 (---) > Isn't it? The match of aa.* "whose beginning is as close as > possible" when point is at the of a line of a's, is "aa". So it seems > expected that searching backwards would match pairs of a's. You are right. > Can you describe exactly how the behaviour is different in Emacs 22? I was mistaken. The same search hits are found in 22 (and before) as now. Somehow I thought I was seeing something different when I tried 22 and 20 earlier today. > Actually, this report looks similar to 9681, although I see no > claims there that it worked in version 22. Yes, this is the same. I will close this bug. Funny that I never noticed this before. I guess that in practice it doesn't bite that often. It is multiple matches in the same line that makes this really stand out as weird behavior. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 22:34:03 2016 Received: (at 24801) by debbugs.gnu.org; 27 Oct 2016 02:34:03 +0000 Received: from localhost ([127.0.0.1]:58587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzaW3-0002U4-E7 for submit@debbugs.gnu.org; Wed, 26 Oct 2016 22:34:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzaW0-0002TZ-Q8 for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 22:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzaVr-0008IF-Nc for 24801@debbugs.gnu.org; Wed, 26 Oct 2016 22:33:55 -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.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzaVr-0008I2-KB; Wed, 26 Oct 2016 22:33:51 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2820 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bzaVq-0001Bw-8h; Wed, 26 Oct 2016 22:33:50 -0400 Date: Thu, 27 Oct 2016 05:33:52 +0300 Message-Id: <83mvhqtt9r.fsf@gnu.org> From: Eli Zaretskii To: npostavs@users.sourceforge.net In-reply-to: <8737jispf7.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) Subject: Re: bug#24801: 25.1; Reverse regexp search highlighting References: <4efa49bf-c223-4148-a291-12a722db033c@default> <8737jispf7.fsf@users.sourceforge.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: -6.4 (------) X-Debbugs-Envelope-To: 24801 Cc: 24801@debbugs.gnu.org, drew.adams@oracle.com 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: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > From: npostavs@users.sourceforge.net > Date: Wed, 26 Oct 2016 18:42:20 -0400 > Cc: 24801@debbugs.gnu.org > > > I see this behavior in Emacs 23 and later, but not in Emacs 22 and > > before, so I'm guessing this change is maybe intentional. But it's not > > clear to me why it would be. > > `(elisp) Regexp Search', under `re-search-backward' says: > > This function is analogous to `re-search-forward', but they are not > simple mirror images. `re-search-forward' finds the match whose > beginning is as close as possible to the starting point. If > `re-search-backward' were a perfect mirror image, it would find the > match whose end is as close as possible. However, in fact it > finds the match whose beginning is as close as possible (and yet > ends before the starting point). The reason for this is that > matching a regular expression at a given spot always works from > beginning to end, and starts at a specified beginning position. > > A true mirror-image of `re-search-forward' would require a special > feature for matching regular expressions from end to beginning. > It's not worth the trouble of implementing that. > > And the texi source says the same at tag emacs-22.1; I've only built > Emacs back to 23.4 though, so I can't test it. I see the same behavior in all versions, including 22.x and 21.4. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 21:18:42 2016 Received: (at control) by debbugs.gnu.org; 29 Oct 2016 01:18:42 +0000 Received: from localhost ([127.0.0.1]:34363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0IIE-0005cQ-H3 for submit@debbugs.gnu.org; Fri, 28 Oct 2016 21:18:42 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:38727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0IID-0005cB-NF for control@debbugs.gnu.org; Fri, 28 Oct 2016 21:18:42 -0400 Received: by mail-it0-f54.google.com with SMTP id q124so7548647itd.1 for ; Fri, 28 Oct 2016 18:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kINRb5hUqdiVE1lGU+PIDif5fQAx8LuN6Mbks1Y0I7M=; b=pifGr6Y6CErn+vdDLJtLQH4Rsw5S1FNsPii1bMLnY9OK4w0beyCAsIp9xgFZpnpq+t zuH9b7V9R+A+C+NAkKNeqG6ACHMTNOtiB1c+P3Ak+q3uAEclc7TY5A9E5tJJZq77Zp5r BPp2jtJKFJvfofrmXolGV4emj/Zr5Q9KAPh9lr3+QXyUWWKVtkfmqJeRuKqjGha1HyW4 EFj7oYwDU3GV6rGYESe/xLqTdDLoXtKE3XOCGG6EL1XXZduVnvz1pncafDQLKObrGb/v DVsgOG3HpEvN2m6sZioWL9JsaEJ+L+eV5zzNMynXcAt2Ia/EZLblh4CzpAmhyEhuVCJO 8Rcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=kINRb5hUqdiVE1lGU+PIDif5fQAx8LuN6Mbks1Y0I7M=; b=iVZDlvJJL+tdnFNbE6Im7bHtlon2HjwqQ825BtcDrq3y+dOckjDF5ff6SI5zAAfmg/ MR8YRyE0ABlP8Z+hdRoU+a/R401uq86F1yNO/SkUGiXsqH0EKJ5l8UWdXYb/Md5O483+ mFr/cIz2ZmSCUkIaM2vBoeChET4HnacGFAeVZNbnQgbfhzxoJq1DgDPBHOSCLSnD5CBm Gf5vs7L2U0Ws5HGEkRgE9+3MaCNSYnJdpODZUWXXCAd9LsXkrra7SVIhYdoYlM5LmM+m N1wq6uhHtG3x4cnaLALLzajSRB3KyTlaUxSKmPln1AGDCCIPCMgs0Q8CG4r4Mxka6C0R rjZw== X-Gm-Message-State: ABUngvfwEHAgZFCTIOh3zwdBt0ehB1jLwVJzg/ytNo8m3iJuoGE0iKv8z5PXRAJvP4db8w== X-Received: by 10.36.14.75 with SMTP id 72mr1010087ite.87.1477703915871; Fri, 28 Oct 2016 18:18:35 -0700 (PDT) Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id k81sm4562286iod.20.2016.10.28.18.18.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Oct 2016 18:18:35 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: bug#24801: 25.1; Reverse regexp search highlighting References: <4efa49bf-c223-4148-a291-12a722db033c@default> <8737jispf7.fsf@users.sourceforge.net> <5537d36d-a365-4a3f-97a3-78c32e86e7ea@default> <87zilqr8d1.fsf@users.sourceforge.net> <152b38c0-5aff-4c96-b976-8df0cbb3199a@default> Date: Fri, 28 Oct 2016 21:19:16 -0400 In-Reply-To: <152b38c0-5aff-4c96-b976-8df0cbb3199a@default> (Drew Adams's message of "Wed, 26 Oct 2016 18:51:53 -0700 (PDT)") Message-ID: <87twbwq7e3.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control 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 (/) # Emacs behaving as documented, therefore notabug tags 24801 notabug forcemerge 9681 24801 close 24801 quit Drew Adams writes: >> Isn't it? The match of aa.* "whose beginning is as close as >> possible" when point is at the of a line of a's, is "aa". So it seems >> expected that searching backwards would match pairs of a's. > > You are right. > >> Can you describe exactly how the behaviour is different in Emacs 22? > > I was mistaken. The same search hits are found in 22 (and before) > as now. Somehow I thought I was seeing something different when > I tried 22 and 20 earlier today. > >> Actually, this report looks similar to 9681, although I see no >> claims there that it worked in version 22. > > Yes, this is the same. I will close this bug. > > Funny that I never noticed this before. I guess that in practice > it doesn't bite that often. It is multiple matches in the same > line that makes this really stand out as weird behavior. From unknown Fri Jun 20 18:24:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Nov 2016 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator