From unknown Sat Sep 20 13:35:49 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#40940 <40940@debbugs.gnu.org> To: bug#40940 <40940@debbugs.gnu.org> Subject: Status: 27.0.91; project-query-replace-regexp stops too early Reply-To: bug#40940 <40940@debbugs.gnu.org> Date: Sat, 20 Sep 2025 20:35:49 +0000 retitle 40940 27.0.91; project-query-replace-regexp stops too early reassign 40940 emacs submitter 40940 Simen Heggest=C3=B8yl severity 40940 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 28 10:56:33 2020 Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 14:56:33 +0000 Received: from localhost ([127.0.0.1]:41071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTRez-0003Gi-19 for submit@debbugs.gnu.org; Tue, 28 Apr 2020 10:56:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:39487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTRSN-0002wn-E0 for submit@debbugs.gnu.org; Tue, 28 Apr 2020 10:43:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46432) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTROa-0005Q1-Bm for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 10:43:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTRKd-0000Hx-Qo for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 10:39:35 -0400 Received: from aibo.runbox.com ([91.220.196.211]:34790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTRKc-0008LM-G3 for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 10:35:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Date:Subject:To:From; bh=UPuilTJrjFFvxkiAoeaI30iFqJgKNXaNF7qs9hSPnFQ=; b=jFae7Rot77b9aqd7/sUnUyeoyt 81/pR15RG1IJfBS5YUgoaM1ql9RwNpOF9R8uvl3mljrc2bnU14pEkM/Fc74hr/fJNTpTq66YDDv6O rXkiZHLkAEEwf3LE39jIqzWDz1+aGp94aiTXUGG9RasfggP46KC6uj23kuf+hhlmgcAmeW54KP0Q1 BSCOXn4TU84LiAtf+v+v3aXjDbJVIxMfeLXf+6D6ueEFeFn806cYIg0WnA/06NZXSGd3xtPWsfYcp VK3jgtYkHMCH+rkcJQgZj+yEC6+yilMbpZXrq9ZoxGTMG7qwAA4Gr6NhmBIghLkU+hGcYi4xYhZt2 dMfYHZsA==; Received: from [10.9.9.203] (helo=mailfront21.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jTRKX-0005BY-EB for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 16:35:25 +0200 Received: by mailfront21.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jTRKK-00012n-DH for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2020 16:35:12 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: bug-gnu-emacs@gnu.org Subject: 27.0.91; project-query-replace-regexp stops too early Date: Tue, 28 Apr 2020 16:35:11 +0200 Message-ID: <871ro7ptk0.fsf@runbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=91.220.196.211; envelope-from=simenheg@runbox.com; helo=aibo.runbox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/28 10:35:26 X-ACL-Warn: Detected OS = ??? X-Received-From: 91.220.196.211 X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 28 Apr 2020 10:56:32 -0400 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.4 (--) Create a directory with two files in it: test-2.txt and test.txt: test-dir =E2=94=9C=E2=94=80=E2=94=80 test-2.txt =E2=94=94=E2=94=80=E2=94=80 test.txt Enter the text "Foo" into test.txt. Enter the text "foo" into test-2.txt. Visit the directory or any of the files (the result is the same either way). Type 'M-x project-query-replace-regexp', choosing to replace "Foo" with "Bar". Confirm test-dir as the project directory in the next prompt. The replacement process stops with point before "foo" in test-2.txt with a message "Replaced 0 occurrences", without replacing "Foo" in test.txt as it should have. The bug appears both in emacs-27 as of 16fed05ba85c3d92d3c913657dd50a648ad3884a, and on master as of 771a6b68165b986b6bf9249c57ca11d310b0f0e4. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 28 23:54:33 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 03:54:33 +0000 Received: from localhost ([127.0.0.1]:42076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTdnt-0006H8-F8 for submit@debbugs.gnu.org; Tue, 28 Apr 2020 23:54:33 -0400 Received: from mail-wm1-f41.google.com ([209.85.128.41]:38539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTdnr-0006Gt-JK for 40940@debbugs.gnu.org; Tue, 28 Apr 2020 23:54:31 -0400 Received: by mail-wm1-f41.google.com with SMTP id g12so394809wmh.3 for <40940@debbugs.gnu.org>; Tue, 28 Apr 2020 20:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NKb9q/ijeEXKhBfb/FcqeLfNhKvlxtQLsmHVObBv8ws=; b=MvWMTbUKXXz4A33FaNNoaStMm00JImDWZ9kUVX76n4NyfXTjyVseUZuFGFy0sEQ7Xc HlgghomKdH2t5AwsAnP7tRM73sHMHolbCUgqIPdVmq3bX54/41zvOCq7f6sGAaHke5Fk AHw7SiDyVYm0QdVuGOz6UjnVnt1jTQnee1vYBVQ4CYbrqrKjAOdvk6vXMCRoLZtkWE70 Xg4pL6eUCvSSKMBiXj7oJukywx++YF5hmW3pBkxR2kDzdDF/pWvcVxpAlATBawgzXZ9R Pt1zcfaTx8XH0mbjFmABBBTpjxioendbLh6keD7DQbLCVBqss5/GABF3CtEJozO2zFhI PfKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NKb9q/ijeEXKhBfb/FcqeLfNhKvlxtQLsmHVObBv8ws=; b=bpR6JWu5jSp5ItEa9lMySOBVhJHFX/NmpaHQuJh8a/uHPAlydPbOVPY3gp918OGDbM V3Wbhom9SGk6mXDk/G0UeD18FBSl/2thnZqq+dZDvH4/JtvclnBy7niCqElUW20IET0Y rmeaqsqf/l9glBYRePj6kpoteQISoWcdELvFSeTBgBZtqPEpK+lv35IEy1m+kxTL5Cfv 9zl+7+9PyucctOIxmegOZZ3LhsrB4EKazxi0ofOUPgEWQSnNArXFpJB3/wiPkEBPQpeS 5cz8RI0RTn3rw6bRj4MDT0RxKXFXS6SymkWauAgqctFfAhjDOh4bNmlWcFzr1K/fEyfB ggGg== X-Gm-Message-State: AGi0Pub6xxia8Oqqt3cZPADV3fKnC5cW1quNCx4gX8iunHskhQZkQ7S0 ngFWqhc2tWhqESu9pmzRPvM= X-Google-Smtp-Source: APiQypLMAJpDka+OmCiLT9uSGMGmUoMO5z8P3GILm3JeOwQw2LrHLL/E+cix8/xQlox4KVLbvq3Xgg== X-Received: by 2002:a1c:9948:: with SMTP id b69mr728687wme.44.1588132465614; Tue, 28 Apr 2020 20:54:25 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id a205sm6255768wmh.29.2020.04.28.20.54.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Apr 2020 20:54:24 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: =?UTF-8?Q?Simen_Heggest=c3=b8yl?= , 40940@debbugs.gnu.org References: <871ro7ptk0.fsf@runbox.com> From: Dmitry Gutov Message-ID: <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> Date: Wed, 29 Apr 2020 06:54:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <871ro7ptk0.fsf@runbox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: Stefan Monnier 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.5 (/) On 28.04.2020 17:35, Simen Heggestøyl wrote: > > Create a directory with two files in it: test-2.txt and test.txt: > > test-dir > ├── test-2.txt > └── test.txt > > Enter the text "Foo" into test.txt. > Enter the text "foo" into test-2.txt. > > Visit the directory or any of the files (the result is the same either > way). > > Type 'M-x project-query-replace-regexp', choosing to replace "Foo" > with "Bar". > > Confirm test-dir as the project directory in the next prompt. > > The replacement process stops with point before "foo" in test-2.txt > with a message "Replaced 0 occurrences", without replacing "Foo" in > test.txt as it should have. > > The bug appears both in emacs-27 as of > 16fed05ba85c3d92d3c913657dd50a648ad3884a, and on master as of > 771a6b68165b986b6bf9249c57ca11d310b0f0e4. I can confirm this. Tested with the current emacs-27. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 03:36:24 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 07:36:24 +0000 Received: from localhost ([127.0.0.1]:42236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jThGR-0003Lc-M9 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 03:36:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jThGP-0003LO-A2 for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 03:36:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49657) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jThGI-0001iI-U5; Wed, 29 Apr 2020 03:36:06 -0400 Received: from [176.228.60.248] (port=1731 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jThGH-0007kX-M5; Wed, 29 Apr 2020 03:36:06 -0400 Date: Wed, 29 Apr 2020 10:35:48 +0300 Message-Id: <83d07q217v.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> (message from Dmitry Gutov on Wed, 29 Apr 2020 06:54:22 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > From: Dmitry Gutov > Date: Wed, 29 Apr 2020 06:54:22 +0300 > Cc: Stefan Monnier > > > The replacement process stops with point before "foo" in test-2.txt > > with a message "Replaced 0 occurrences", without replacing "Foo" in > > test.txt as it should have. > > > > The bug appears both in emacs-27 as of > > 16fed05ba85c3d92d3c913657dd50a648ad3884a, and on master as of > > 771a6b68165b986b6bf9249c57ca11d310b0f0e4. > > I can confirm this. Tested with the current emacs-27. Do we need to fix this in emacs-27? Is this a regression since Emacs 26? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 04:38:28 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 08:38:28 +0000 Received: from localhost ([127.0.0.1]:42358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTiEd-0004vk-AK for submit@debbugs.gnu.org; Wed, 29 Apr 2020 04:38:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTiEb-0004vY-Vj for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 04:38:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50635) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTiEV-0006hx-Jy; Wed, 29 Apr 2020 04:38:19 -0400 Received: from [176.228.60.248] (port=1700 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTiEM-00032w-Ts; Wed, 29 Apr 2020 04:38:18 -0400 Date: Wed, 29 Apr 2020 11:37:53 +0300 Message-Id: <831ro61yce.fsf@gnu.org> From: Eli Zaretskii To: Simen =?utf-8?Q?Heggest=C3=B8yl?= In-Reply-To: <87ftcmhezl.fsf@runbox.com> (message from Simen =?utf-8?Q?Heg?= =?utf-8?Q?gest=C3=B8yl?= on Wed, 29 Apr 2020 10:29:18 +0200) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, dgutov@yandex.ru 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.3 (---) > From: Simen Heggestøyl > Cc: Dmitry Gutov , 40940@debbugs.gnu.org, > monnier@IRO.UMontreal.CA > Date: Wed, 29 Apr 2020 10:29:18 +0200 > > Eli Zaretskii writes: > > > Is this a regression since Emacs 26? > > project-query-replace-regexp is new in Emacs 27. OK, so we should fix this on the release branch. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 05:03:16 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 09:03:16 +0000 Received: from localhost ([127.0.0.1]:42419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTicd-0005aX-F4 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 05:03:16 -0400 Received: from aibo.runbox.com ([91.220.196.211]:56412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTi6O-0004hw-Sq for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 04:30:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=nW0yulN0S6KSnGmi7kyP1KWZOu7nWeVCcGRZLfSAqZM=; b=HfpKB5MasSUx/wcSCbp7zSiorr UDQ53d9Tyf011Ml7wFDff9QX6BDwEHc/60FJPSBtuktgMb0s+BGSjlpasMD3ryLf6ml0QCdQmkrID 1yvMKK72oxR0xIEMinhNvC8IZ5oSDiCt7Lh/C9EvxfMZVNNt2Pr3Mf3tV4zJmggfs+sN9LdPFf9YS rsUQr5HDudkMiakI9zrvs6nEJlzv8FIWKlV1DIwl+1DJAwRX7KcKxQvVGIm9OeUIdiCvQFknRw3/3 /TW5R8oaLbfqxJuLqxQBMfhTUxOup/48l1UnkGqGEw21eEsUiJFKAE3IGh5Oy/XMeZ47krCS9eobX MRZcaNog==; Received: from [10.9.9.204] (helo=mailfront22.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jTi6L-0007UB-Q1; Wed, 29 Apr 2020 10:29:54 +0200 Received: by mailfront22.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jTi5n-0002gI-62; Wed, 29 Apr 2020 10:29:19 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: Eli Zaretskii Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> Date: Wed, 29 Apr 2020 10:29:18 +0200 In-Reply-To: <83d07q217v.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 10:35:48 +0300") Message-ID: <87ftcmhezl.fsf@runbox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40940 X-Mailman-Approved-At: Wed, 29 Apr 2020 05:03:14 -0400 Cc: monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, Dmitry Gutov 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 (-) Eli Zaretskii writes: > Is this a regression since Emacs 26? project-query-replace-regexp is new in Emacs 27. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 05:25:05 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 09:25:05 +0000 Received: from localhost ([127.0.0.1]:42438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTixk-000674-Pf for submit@debbugs.gnu.org; Wed, 29 Apr 2020 05:25:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTixi-00066U-OV for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 05:25:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51186) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTixc-0002HM-QM; Wed, 29 Apr 2020 05:24:56 -0400 Received: from [176.228.60.248] (port=4537 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTixb-0000ce-VG; Wed, 29 Apr 2020 05:24:56 -0400 Date: Wed, 29 Apr 2020 12:24:36 +0300 Message-Id: <83zhauzlt7.fsf@gnu.org> From: Eli Zaretskii To: dgutov@yandex.ru In-Reply-To: <831ro61yce.fsf@gnu.org> (message from Eli Zaretskii on Wed, 29 Apr 2020 11:37:53 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Date: Wed, 29 Apr 2020 11:37:53 +0300 > From: Eli Zaretskii > Cc: monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, dgutov@yandex.ru > > > From: Simen Heggestøyl > > Cc: Dmitry Gutov , 40940@debbugs.gnu.org, > > monnier@IRO.UMontreal.CA > > Date: Wed, 29 Apr 2020 10:29:18 +0200 > > > > Eli Zaretskii writes: > > > > > Is this a regression since Emacs 26? > > > > project-query-replace-regexp is new in Emacs 27. > > OK, so we should fix this on the release branch. First, this is broken if the shell doesn't expand ~/ or if the Emacs notion of the home directory is different from that of the shell. Here's the proposed patch (ignoring the whitespace changes); OK to push to the emacs-27 branch? diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 1f4cbe9..dbc967b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -185,13 +185,17 @@ project--files-in-directory (require 'find-dired) (require 'xref) (defvar find-name-arg) - (let ((default-directory dir) + (let* ((default-directory dir) + (dirname (file-remote-p dir 'localname)) + (dirname (or dirname + ;; Make sure ~/ etc. in local directory name is + ;; expanded and not left for the shell command + ;; to interpret. + (expand-file-name dir))) (command (format "%s %s %s -type f %s -print0" find-program - (file-local-name dir) - (xref--find-ignores-arguments - ignores - (expand-file-name dir)) + dirname + (xref--find-ignores-arguments ignores dirname) (if files (concat (shell-quote-argument "(") " " find-name-arg " " From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 06:42:30 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 10:42:30 +0000 Received: from localhost ([127.0.0.1]:42509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTkAd-0008GS-4f for submit@debbugs.gnu.org; Wed, 29 Apr 2020 06:42:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTkAV-0008Fw-3R for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 06:42:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52359) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTkAO-0003QQ-Dh; Wed, 29 Apr 2020 06:42:12 -0400 Received: from [176.228.60.248] (port=1279 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTkAN-0004rj-2m; Wed, 29 Apr 2020 06:42:11 -0400 Date: Wed, 29 Apr 2020 13:41:50 +0300 Message-Id: <83mu6uzi8h.fsf@gnu.org> From: Eli Zaretskii To: dgutov@yandex.ru In-Reply-To: <83zhauzlt7.fsf@gnu.org> (message from Eli Zaretskii on Wed, 29 Apr 2020 12:24:36 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Date: Wed, 29 Apr 2020 12:24:36 +0300 > From: Eli Zaretskii > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > > First, this is broken if the shell doesn't expand ~/ or if the Emacs > notion of the home directory is different from that of the shell. The patch below seems to fix the rest. Note that I've decided to make the change in fileloop.el, since I think all the other callers need the same fix. Also, using downcase is not entirely correct, we should use isearch-no-upper-case-p instead. Comments? diff --git a/lisp/fileloop.el b/lisp/fileloop.el index 543963f..f7a199e 100644 --- a/lisp/fileloop.el +++ b/lisp/fileloop.el @@ -204,14 +204,24 @@ fileloop-initialize-replace files (lambda () (let ((case-fold-search - (if (memql case-fold '(nil t)) case-fold case-fold-search))) + (if (memql case-fold '(nil t)) + case-fold + (if (equal from (downcase from)) + case-fold-search + nil)))) (if (re-search-forward from nil t) ;; When we find a match, move back ;; to the beginning of it so perform-replace ;; will see it. (goto-char (match-beginning 0))))) (lambda () - (perform-replace from to t t delimited nil multi-query-replace-map)))) + (let ((case-fold-search + (if (memql case-fold '(nil t)) + case-fold + (if (equal from (downcase from)) + case-fold-search + nil)))) + (perform-replace from to t t delimited nil multi-query-replace-map))))) (provide 'fileloop) ;;; fileloop.el ends here From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 10:51:05 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 14:51:05 +0000 Received: from localhost ([127.0.0.1]:44244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTo3F-0008Mh-In for submit@debbugs.gnu.org; Wed, 29 Apr 2020 10:51:05 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:38295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTo3B-0008Lc-SJ for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 10:51:04 -0400 Received: by mail-wr1-f50.google.com with SMTP id x17so2890952wrt.5 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 07:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tTZZyayXRMNRHhuFhewBFynOaVs3yDWsMMfSP93PaBc=; b=dbEHP1mLQLmA+WuNLlxpfvVcoQy6aj0w3fDCTrSGtNiqmbhfgwdhJ7SdrDGQzTTe4N KorLttFVPofv72EVlSWm8+AA27gsHl9KIBq0dV0EjlVEFtPU4slTqmGgVrj+O7dsEhBK MHb3k62r/fs6W1uKtam9V6bs5yXkU4BEeEkzQgB//lgySCQB1SqWjDnBeRVRsRWHuogm EamnUje9rbLkqMFkPI+OnHp0XHgIFYZI/2IAYIpMxSdeeoqNOmcD7372HHCPFOc/z+S2 yV+siSeXzZAbvoLdZws9vcPt1aqcCetYcyhLeDT3WWovVJmgWUlB2fK3t/s+QTUMqW7C 4zUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tTZZyayXRMNRHhuFhewBFynOaVs3yDWsMMfSP93PaBc=; b=Lji24CV6jWKMLfc4aEy5gZBMQd7kY79pgL6P8uoAzXYSh9cMUO+I5defEr/v4S6QDE EgjFljVCRuukTlqGA2uujdM6UFufc18K1OuXjkVT+QY1AtvWo71FJu7EOI9S7SgPdAAS d3LquN4Y/0kif1qK2rgEnK0zq++IKJnbXS7htkGglO+eNUZU4rIsBSm5SS5kl0wTuo3g S3ZrYg4WvOKmw9ebdCQgR60qm3RpP/RybNHwfOUJL74Fhh37rG95ESYX8/dulXFwQ1EX mNMnjdUD2YkGMkV3evuCTHFYIw/VW5P17NCVRgUYqINlGzzGntnTlE+HyZ4FYJi/cq9p g6xw== X-Gm-Message-State: AGi0Pub+Ysk4okBA73TtgMS3PcC1j9/8sqNO92nPklYwXe7937vF7f2F t3XVgmteECiIbF1mPxkAsKn1Q567o6U= X-Google-Smtp-Source: APiQypJjrD6XsqjLc4HVDqeZe9xwpEGsRIZBKoC1Ttvdg5sPnqHEusVe6YpwXEfu27DFxZvbrVS2Lw== X-Received: by 2002:adf:fc11:: with SMTP id i17mr42530549wrr.152.1588171855971; Wed, 29 Apr 2020 07:50:55 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id 5sm7985890wmg.34.2020.04.29.07.50.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 07:50:55 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Wed, 29 Apr 2020 17:50:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83zhauzlt7.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 12:24, Eli Zaretskii wrote: > First, this is broken if the shell doesn't expand ~/ or if the Emacs > notion of the home directory is different from that of the shell. The patch seems okay, but could you describe a case when the shell fails to expand '~/'? Is that about cmd.exe? Cygwin? AFAICT the patch doesn't fix the same problem for remote hosts, is that a problem? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 10:59:49 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 14:59:49 +0000 Received: from localhost ([127.0.0.1]:44268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jToBU-00009X-8k for submit@debbugs.gnu.org; Wed, 29 Apr 2020 10:59:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jToBS-00009H-Ek for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 10:59:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56761) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jToBL-0007IA-B1; Wed, 29 Apr 2020 10:59:27 -0400 Received: from [176.228.60.248] (port=1601 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jToBJ-0006pD-Of; Wed, 29 Apr 2020 10:59:26 -0400 Date: Wed, 29 Apr 2020 17:59:05 +0300 Message-Id: <83y2qexrra.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov , Michael Albinus In-Reply-To: (message from Dmitry Gutov on Wed, 29 Apr 2020 17:50:53 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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 (-) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Wed, 29 Apr 2020 17:50:53 +0300 > > On 29.04.2020 12:24, Eli Zaretskii wrote: > > First, this is broken if the shell doesn't expand ~/ or if the Emacs > > notion of the home directory is different from that of the shell. > > The patch seems okay, but could you describe a case when the shell fails > to expand '~/'? Is that about cmd.exe? Cygwin? I've bumped into it with cmd.exe on MS-Windows, yes. > AFAICT the patch doesn't fix the same problem for remote hosts, is that > a problem? No, I don't think so. A remote host cannot be a non-Posix system, AFAIK. Michael, can you confirm? (And in any case, this issue should be handled in the file-remote-p handler.) From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 11:42:52 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 15:42:52 +0000 Received: from localhost ([127.0.0.1]:44345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTorM-0001I9-0M for submit@debbugs.gnu.org; Wed, 29 Apr 2020 11:42:52 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:42903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTorK-0001Hu-BY for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 11:42:50 -0400 Received: by mail-wr1-f47.google.com with SMTP id j2so3093284wrs.9 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 08:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZNzftyJe1p2SfA9dpVuV3juOS8YnwDhfM7RcmTpnVac=; b=ZhKI9cR8/FCM2cyciJSXwBYgsd2FkOh14fuuORl81vAmZKEOFgoAg8IvAcTozlWwjY IuuZBf8UtIZckBM8eIj7Mv6987LbegzPouv6AxZIBILBF5drsFcHMy8Q1Y47pVcqMMai DmnWO4ZaTVny9ltFGidDgSpdNWR0i64VaoPf/fwsh9fEcKHzCLbYRn/P7XCAYikMPFIq Gptvq1O3V2gQXD+weY47nsiKX/toh2fOb6FRElldF8cRmTtga4SwsSOg5nru5yxDmS8B KgrnHdo+HUltatT+FzG9+gRO9vkWNxCQlPCzt0n9T8yvUO1cbCX+ipr44EIWjyPr5NcL qf8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZNzftyJe1p2SfA9dpVuV3juOS8YnwDhfM7RcmTpnVac=; b=cD7I5Qu17NA+W/YjcyAgvvV8TC9WPgYq4fw7Nv3ZQLTAe/6tahXid92qw11aPT9ypC YQKPunpSZ3jYia8c+LCOYZNaUEC5c77/Rb6+Wq8l7HWOKjsxbVweUv/4DRWhNb2hpDvT lXJFv8C3/97SH1FTwL9dtU+D2l+8rPIdC0fOakAUkG31cvZVd1PUNe65ucXfh5lYJpKy cngbyGeuD6InU5MPGBQBT2CaKY5Xh4t64Z51Jsmo7/R8kQy1bIGR8xlWJknCNJsm2zvG rADLocCJz6JjUB1Oja+zdNBeafs4GXew6vUVP51VjKINu/fnY++81Nd2BJC6hhqyngvg CvFw== X-Gm-Message-State: AGi0Pua1xwwQBJAfAmPGPRJq5PIM8QIlu5n/gLzxmlqQP/Ne2t6FJRHD ZksFW5KAsKWBAB+HfrKEZHQBM+hBkQk= X-Google-Smtp-Source: APiQypL5ldXX3LrzPewRF3O/N1q7nUU6GSJwQzzeXEeQUCRWcyxbmlsQwijTVApVv7YBbIzu9SFYGg== X-Received: by 2002:adf:fc11:: with SMTP id i17mr42802113wrr.152.1588174964342; Wed, 29 Apr 2020 08:42:44 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id y7sm9042837wmb.43.2020.04.29.08.42.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 08:42:43 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii , Michael Albinus References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> From: Dmitry Gutov Message-ID: <356f1c60-6072-d624-51b3-3e97a6e06253@yandex.ru> Date: Wed, 29 Apr 2020 18:42:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83y2qexrra.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 29.04.2020 17:59, Eli Zaretskii wrote: >> Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Wed, 29 Apr 2020 17:50:53 +0300 >> >> On 29.04.20 [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: runbox.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.47 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 17:59, Eli Zaretskii wrote: >> Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Wed, 29 Apr 2020 17:50:53 +0300 >> >> On 29.04.2020 12:24, Eli Zaretskii wrote: >>> First, this is broken if the shell doesn't expand ~/ or if the Emacs >>> notion of the home directory is different from that of the shell. >> >> The patch seems okay, but could you describe a case when the shell fails >> to expand '~/'? Is that about cmd.exe? Cygwin? > > I've bumped into it with cmd.exe on MS-Windows, yes. I see. Then LGTM, thank you. Could you clarify, though, does that mean that no project commands are currently working on Windows, without this patch? Or does that only affect the "transient" project type? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 11:50:17 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 15:50:17 +0000 Received: from localhost ([127.0.0.1]:44358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jToyW-0001Tn-P6 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 11:50:16 -0400 Received: from mout.gmx.net ([212.227.17.22]:49395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jToyT-0001TV-V4 for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 11:50:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588175389; bh=JCfa+3wpPSryJJwSYinFhM80x97sVoSJv7DynI5hBzg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=TOtHVcCkwz8KWRA2zRnTydAK6ZnIGD2Z5SkQ1DT2A9jiE7JQWewX1XRrPuBMytWYG 1QUe5jxETaA1HHkPF9Tnxc4qyciNKa5x+pCyufhcUOP+QgWNBEN8NAgctTzVMjYv4x ghIjZHn9kblK3olI9KKZ8Rq6xzU0BwktPPOZj/m0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.54.201]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXGvG-1jgX6B1I58-00YhGb; Wed, 29 Apr 2020 17:49:49 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> Date: Wed, 29 Apr 2020 17:49:46 +0200 In-Reply-To: <83y2qexrra.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 17:59:05 +0300") Message-ID: <87blnal2at.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:DKtbpIczHhR9HuefTTcHNP8Rc+ugR0b1a03DSH44hVngxsmn11g POpn+FCa5TCKw/VznYFeiLslNvf8Mvt7kMRgJcKPDWNvtdp0zMR7MVvWF8OyYBKVtzoTEHA 0X8FoNj5bTQReOB89pnCMMhS3n4do5W57RO6BmtwLj05hPiSQCehBjBgJx4+8Y+aWwhr7yO 3GHaVu9sxwZEDlwyLD7DA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lDnkBFGl/sA=:iPrTlcE+WWgmFQQAw/J7HG Y0FyuM+9DiSKBcBQr9GtDgpiF/J+G2ok8wdamrrRvaP33iSVDOLNBZusKDIAYQmyNrAamb7xZ qqPDnroxl7zrFzbtH+qUZbDjCQ6fwZRjLlnsVVHBZLjoETxKIWqNucy/5ZTio43zrtRwE3a9x PkyEhcmHU3MT5iujstMx8PMUahe/V+3xDdtDrS3DVMl4NNM8NnmrwzpauPtJBH5+eR8dOhgoY LRtG9jrh72eVAJKiK5QbaP6DiRaXniwf9VII6do5ybZCRqBOhmDJaorgwO4zyHpQcs/NQyJ2c 9E/+HKHrelwJWuMGsdx7AlgDNJ0GGCYCiOhrxodxh/+9qc5c4Aje+M0l31tFwiu54T9f0K+YQ Xux3y9AE8TfXdHgjA+3+Bz/IkUOy82Kh2jwPtYwsyUEKrebiHrAaZvCkFg7FL0b64xjhlxmpF oTyTAwPpi7zu5AoFzyrOl5WexhQJwQdIbM8/O8K2hdsVHPFUzqsVGBPhNLXYTwcI7+K7r+/GD 0Sq+CicDtF9xO+YjmaW+81vnxMd+ZXj2G87qG32OVcukRjv2AL15xNKE9pwoH+x5ah3wY58U0 Y7/qFcKzgy5A+vP8C0LBMme8AgUs+tfI9N0MZ/FXbEylz7mrSlstrmNmAgJPk5Rz0krxp/CNp PoWC1lc4+AoL5KwNqpvL1QFM8fBGdKSflT+6HQspvXG2BAR+12LOVo5tl8cLniV6RlDZem0MD qhTDHvovRazDNjWpWPovq9YMHHcRRTTPe1mYgb0UsegD5XmbH+LyDMXFj/E+J/DIPRwHnOT4y evvk8KJO2WKHGc8heX2wvdfMdA+7DWQX3yuLu4SP0nI4SP8QtsxazM7Xbx/MhBHNyXb5sTbpp 8m9P2ZZ1sXlfH6VH+Wo0kH+uUFM0vfa94n8T7V73BOwaxDPUVz+KyCzKKUjjjp+rTc9+gJ/z/ HSZf7DkqJhwH+WoN0ZoMseLB+paWXAk/4US8sbb0ULixaDPUujDSzPNRE/y6MebxLPdeXPKsK Wg8HFzRXiZbkb6Hnjwp8593g5aNJVM6D4zJ5oFSy5xAC3W7tVqRgbJYbsw4gl+UxOZBvEutCv hhhMFTmU3V2JiLHVPj79UIQJ/+s7cO4/xsbVpQARAf4dreJK9qKlC1C+Y9Nnwpsrw0cLtC528 uC/QyYhPh82tMibwozoZ+FlSyUF0PZA0rUKD8NzD99WBXMY+Li3ZeYhihSeJb4pYjxshQ/QWr 0wwPEQyrCwlxqt5EW Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, Dmitry Gutov 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 (-) Eli Zaretskii writes: Hi Eli, >> AFAICT the patch doesn't fix the same problem for remote hosts, is that >> a problem? > > No, I don't think so. A remote host cannot be a non-Posix system, > AFAIK. A remote host can be (kind of) non-Posix, for example not expanding "~/". But this is a general problem then accessing such a host, and one shall avoid to use a remote file name containing the tilde. > Michael, can you confirm? (And in any case, this issue should > be handled in the file-remote-p handler.) Tramp checks for all remote hosts whether they can expand "~/" (or "~user/" in general). If possible, it does. Your patch uses `expand-file-name', and that's all what we have to say to Tramp. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 11:58:34 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 15:58:34 +0000 Received: from localhost ([127.0.0.1]:44371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTp6Y-0001ff-1u for submit@debbugs.gnu.org; Wed, 29 Apr 2020 11:58:34 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:50645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTp6W-0001fT-Jj for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 11:58:32 -0400 Received: by mail-wm1-f43.google.com with SMTP id x25so2639184wmc.0 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 08:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yAj5KtbBgFAG+JZWfo1H7vNgKLjvIZAahM3DLrhdK2k=; b=Vjn3xySePm0/VOJ02teAGigiR0WODZSzNkTPoLaPDAQuzCUhrJVYVZujyiKrsegjId V/IfFMMeVKH1Qg4jVMgwCoz3Xpl7eK5EI2Vhx7F0qRkWX3HfgpSqGOfQl5+9XPg/wTYn kfyeXpxaLdJmkmYFSElL5jUJMZ+OII4pxvhpvSS//2elAykTfZdBKfkOL3laswHUFZRB fg6lnPj8TE2yZfj2+dxzYaDwFZoMWrWL0D8V3V4yF0BTJMH3nXOIMU8EiplKjkoRuosE +1q6h0VPa8gDSICPoBtiJrsPnmQvRyJGif5LryOahDNgDmWexZgdycMLfFd7ZdKHrhrC CvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yAj5KtbBgFAG+JZWfo1H7vNgKLjvIZAahM3DLrhdK2k=; b=oDSmUikFlIkXf5Sav/uT0im7gXF+6/alMVJLQGmQj8wQLF+7X87Oo4GF4QZn5dvP+R tcK49DJ7t2i5YZLJRD3jQX95CCQ3KKRDe2obru1guV4QQSaOBAIxaguvsZrsm90hhbkK SLCVvk8PHQs5e5ZqzbJMgoWrHDFKHGuWbdC+iuCrpVvqRXuTMBM+3bDZ2zD6VC5Bsy+D 4SMGFvcdXPEja7EE8MP+RSwF0acJ5/Ko31LqSauQ5/KHZPddq+kKnMPLYsHcQJb7jKS8 bGjzSwLsXsiB19ij4H+2h89XVf6TAQhMVNjJNX/gwUVypq/ehWiq2mOI1S82Qca3gltc +uXg== X-Gm-Message-State: AGi0PubLXgl0oWrq02aikILOEof2ssZeXiPB4nVlWvU1OS2ffpsUwL9V Cl4RSUbFsfAaQfREmO81RDKztkwhkco= X-Google-Smtp-Source: APiQypISef9v6keyXNYsGnKyDtHsf4Pzkl3NizjOQBnU4gClnHcWPKdXvjMX7HeY1ur0N39A2kfl8w== X-Received: by 2002:a1c:1f8e:: with SMTP id f136mr3879709wmf.166.1588175906509; Wed, 29 Apr 2020 08:58:26 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id f63sm8158127wma.47.2020.04.29.08.58.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 08:58:25 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Michael Albinus , Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Wed, 29 Apr 2020 18:58:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87blnal2at.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 18:49, Michael Albinus wrote: > Your patch uses `expand-file-name', and that's all what we have to say > to Tramp. I think it uses it only for non-Tramp dirs, doesn't it? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:04:37 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 16:04:37 +0000 Received: from localhost ([127.0.0.1]:44383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpCP-0003un-0j for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:04:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpCM-0003uY-A6 for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 12:04:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58071) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTpCF-0007nT-LJ; Wed, 29 Apr 2020 12:04:27 -0400 Received: from [176.228.60.248] (port=1758 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTpCD-0002gV-Dz; Wed, 29 Apr 2020 12:04:27 -0400 Date: Wed, 29 Apr 2020 19:04:04 +0300 Message-Id: <83r1w6xoqz.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <356f1c60-6072-d624-51b3-3e97a6e06253@yandex.ru> (message from Dmitry Gutov on Wed, 29 Apr 2020 18:42:41 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <356f1c60-6072-d624-51b3-3e97a6e06253@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, michael.albinus@gmx.de, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Wed, 29 Apr 2020 18:42:41 +0300 > > >> The patch seems okay, but could you describe a case when the shell fails > >> to expand '~/'? Is that about cmd.exe? Cygwin? > > > > I've bumped into it with cmd.exe on MS-Windows, yes. > > I see. Then LGTM, thank you. Thanks, pushed to the emacs-27 branch. > Could you clarify, though, does that mean that no project commands are > currently working on Windows, without this patch? Or does that only > affect the "transient" project type? Only the "transient" projects, AFAICT. At least I tried with a Git repository under ~/, and got absolute file names in the list. I hope Mercurial does the same. You can test it easily by running (project-files (project-current t)) in a suitable set up directory. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:10:42 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 16:10:42 +0000 Received: from localhost ([127.0.0.1]:44396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpIA-000473-Tw for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:10:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpIA-00046n-0t for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 12:10:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58275) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTpI3-0004UH-JA; Wed, 29 Apr 2020 12:10:27 -0400 Received: from [176.228.60.248] (port=2118 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTpHz-0001yu-VV; Wed, 29 Apr 2020 12:10:25 -0400 Date: Wed, 29 Apr 2020 19:10:00 +0300 Message-Id: <83o8raxoh3.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <87blnal2at.fsf@gmx.de> (message from Michael Albinus on Wed, 29 Apr 2020 17:49:46 +0200) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, dgutov@yandex.ru 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.3 (---) > From: Michael Albinus > Cc: Dmitry Gutov , simenheg@runbox.com, > monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > Date: Wed, 29 Apr 2020 17:49:46 +0200 > > > Michael, can you confirm? (And in any case, this issue should > > be handled in the file-remote-p handler.) > > Tramp checks for all remote hosts whether they can expand "~/" (or > "~user/" in general). If possible, it does. > > Your patch uses `expand-file-name', and that's all what we have to say > to Tramp. My patch only calls expand-file-name on local file names. For remote file names, I've left the result of the call to file-remote-p unaltered. Would that be a problem if the file name, after stripping the remote protocol parts, started with "~/" ? And if so, what should be done here about these cases? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:11:14 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 16:11:14 +0000 Received: from localhost ([127.0.0.1]:44400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpIo-00048P-1X for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:11:14 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpIj-00048B-Jl for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 12:11:13 -0400 Received: by mail-wr1-f68.google.com with SMTP id g13so3209695wrb.8 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 09:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7fw/ILaPpKA/Q26zBzO7Xz4MoSwZgWrIikIVTuLchr4=; b=JzDL9UWNhad7NtKmkhvQbooyhT3ACz6VQejbzegpCTiNRdvT3lV87eAU+TNLM917hF p1BalmzSGpZDVbwfsfSmueYcVKn/nIUUjeQEM9Bj3Qg4OXT5mZeLr2Tpm/emUqg60Wvx eavLM0kT3QJ6krl1QKz4AbYpOPQ/UmfsHYNuKmdrZp93AHgrbcVm+oPM3IX4FbA1josm z0ZExYc8Y29JRpZzEUqFNsEZn49UqAiJMaAeGAvElyn83XJ6a4i+cijgJdbsJ71HCZ5y qRPGVHPjJ8V5J4yf5R2xl/+VEEwzbbytk/OEpLldjEZN2bW6OyMqIlMceVnZnlziY8nT UEUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7fw/ILaPpKA/Q26zBzO7Xz4MoSwZgWrIikIVTuLchr4=; b=b7CQtKhmqBslVyQ3cNwPUdtb4yV22DrpR/3g/9fGJPa4rMUJvrDHGQZrm/6pAUfFWt y+QK5GW555FVCxXYP1Hl77b827YcVvxT9ykgJna0tBsToE5lalF91yHanEaGw1o/XYBY Hyu1mn+fJKJwgZSj741W/LcqWlI9xlyv1oTpBm8nLIunxbbTr6wAv1bxwZ4CKzOHmLyD SFVy3Wdpb39USaqR2gL5Dya+DwiAVhRSspauOHsr5OflBL27oAJ3jrgJho9J2laAjgEh D24K58I5qScsOyiTKXgJhq+NolC+YG7rF9v0vLdxDOzk+5gCp25Ac1gby1Z0m0+NozSf AyZQ== X-Gm-Message-State: AGi0PuZ9K322bDgLf6ikMHKYimCtYBIYCidS4ynDB8g9850kgVZ37gJZ 6przy/3YKZRMhIGzeRaBroIoNMQjqx8= X-Google-Smtp-Source: APiQypLiGknUlt+3PUYh4B8t7uxQyMx0z9Fz1QN+Reze+es1jP75W03LBINUTjU9p++73Y5R9rahQA== X-Received: by 2002:adf:bb84:: with SMTP id q4mr38254538wrg.141.1588176663466; Wed, 29 Apr 2020 09:11:03 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id m15sm8309973wmc.35.2020.04.29.09.11.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 09:11:03 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <356f1c60-6072-d624-51b3-3e97a6e06253@yandex.ru> <83r1w6xoqz.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Wed, 29 Apr 2020 19:11:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83r1w6xoqz.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 29.04.2020 19:04, Eli Zaretskii wrote: >> Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Wed, 29 Apr 2020 18:42:41 +0300 >> >>>> The patch [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: yandex.ru] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.68 listed in wl.mailspike.net] 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, michael.albinus@gmx.de, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 19:04, Eli Zaretskii wrote: >> Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Wed, 29 Apr 2020 18:42:41 +0300 >> >>>> The patch seems okay, but could you describe a case when the shell fails >>>> to expand '~/'? Is that about cmd.exe? Cygwin? >>> >>> I've bumped into it with cmd.exe on MS-Windows, yes. >> >> I see. Then LGTM, thank you. > > Thanks, pushed to the emacs-27 branch. Thanks. >> Could you clarify, though, does that mean that no project commands are >> currently working on Windows, without this patch? Or does that only >> affect the "transient" project type? > > Only the "transient" projects, AFAICT. At least I tried with a Git > repository under ~/, and got absolute file names in the list. I hope > Mercurial does the same. You can test it easily by running > > (project-files (project-current t)) > > in a suitable set up directory. It does. Very good. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:22:35 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 16:22:36 +0000 Received: from localhost ([127.0.0.1]:44413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpTn-0004SL-LN for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:22:35 -0400 Received: from mout.gmx.net ([212.227.15.15]:50695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpTi-0004S2-CH for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 12:22:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588177329; bh=SjybG2iWa0YroNqGc3azqD6o9soOEeLq8vTy9hBwtAE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=RjmN6RPozh5sPOqsNXiQlJjURUYU1vl/kjzUeyRq3s2V4IZbI1DCSuABZ9mFAeJbW dnr+7whQkLQsfAD9JHwOcJva033D9u51r30Hl+vS5qfozK5O2zQ6xoPx/+kix0vHIx MrTshUsdZuzaYGH8jN0IJTn1FnD2N/1Yt8OQxKNE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.54.201]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGz1V-1jPgjC1Cvz-00E5Cr; Wed, 29 Apr 2020 18:22:09 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> Date: Wed, 29 Apr 2020 18:22:06 +0200 In-Reply-To: <83o8raxoh3.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 19:10:00 +0300") Message-ID: <874kt2l0sx.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:P3qfKlR09itRIrM2Olu+6/EuBFD1BEZPThY04j1J7SoC6PKdHVE +AeyqDr0nqjHJmPOPLaeunUuzkndP8pSvowRs0hSk6/OK+uXVNaSwgZ8My6kCUEFMAFvM0m nZX05rN94s3HVFHgUp5GAzZaedwN9oLiFOsz/B11E2CIx17CxMC7mIz38PQDIHStAGmIh0L CuSyROKW0364JqQnKfeIg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:UJjn00iuKks=:MllqoFUmHEXZaEyVSTkeh2 oUOpdjpCQArWLbTQrYWHD/ElZYQkh4xxRaS/QT9CvEHUS8/d8vOcaMOMTSfuZDvGpYBBdcBiF HvwUINHAv39CoyNB0jJy+8PaudDduTutzvl6MHZUF00igWsbRrCiQA7o9faVaPUcx66FMsk7h CEWBb3x+havGVno70b4GpnNu1UoSrxmX92Eh+9GzHPapsTx2G+3NCuyRXWEga35G8MXoj48ML VnJpoj+F5sAR7FX69ro9Mz5iFdcP5Zjxfg2feDAapz/h+ukXdhnTG/cMN8g+C6sRCcoGTJXYn vs4o4h/mr5kpehNKxjoBWGJ4kgmKutPMEQ1lXblnqbNwWD346RGUOPbAv9gWiKahigGfC3xhP qfX10pB/BcUSY2iJunXR0oOWatJzbwtAOELUmm9LUNbyYr2qyWbAoHE43dnPIjeqFajsLTKNX uO6RGpV6KWwMotSlJdLa6YaFRd2o2t0qfp9xvKwQ0Y4HB/Xx+sKwZcNeH/th8TlHji9vNjVuS BAmqrSjpZwa8fkBdSimFIf3SEYgSHViOmNEKTLFzJRLz8BvhEm1A0C6zBir1CSIWs3iyARtXo H0qReZ4BwT5sxEhowJZ8aFiPW4M/hcGtrIKNCfFcS7eYFhEKebDlX8iiaYy9p+Lnyuupr5L5X RwuAwF4bSUvYrWD8bqER39A6VXh1GcuHL0Jodwgkc8ZoUcriiPdDbuyOUV5pAAeeo6/6Npcpd abDqt1/7DrhvH/A7qp5F0lINjch20S0hxlB6K5cyp8MCtqU9NE1GtBKj1l4nU64g0m7yM9qhY ZElFN9zapOfpVDBUkjD9a1GgEk/Mb2tmJ4Hcb08cwA+Py8juVg/7/l/gGzr/0dhBuZJvwn/1A lcgVf1HHb7RHt4YrBs82SG3ki3Qn3AOii+ok8brYWgNR1kpRZT+mj+cfE92utSTxW9seGpEHp Birg0uox8G6gtaUTbR3pLtYOa1DwNCkensbnCmV76Y92uU3D47Ni1463NR06io5QEjEzQanRh B+ZWcLPKuHV3F7lrV3XJUr2+4gO8qGDjmTEKCPYvCBaf5rAAmNr4oU6s/2oy4PjRQb3aWgq2F xBsjAjseY+SxSAhWIzrmykYX2QvGP+s/zCIKps4aybY7qjGrN88W6lsclCioKFgAYIy4LsQBw G25D6TL3fvFhNU7idpx3QUikby9xjFj54fSjD10vulxeJOp+pJYYIfHvYwiiPraQa3cOCjHcQ aQq3SVHDDtFl4SkTx Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, dgutov@yandex.ru 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 (-) Eli Zaretskii writes: >> Tramp checks for all remote hosts whether they can expand "~/" (or >> "~user/" in general). If possible, it does. >> >> Your patch uses `expand-file-name', and that's all what we have to say >> to Tramp. > > My patch only calls expand-file-name on local file names. For remote > file names, I've left the result of the call to file-remote-p > unaltered. Would that be a problem if the file name, after stripping > the remote protocol parts, started with "~/" ? And if so, what should > be done here about these cases? Call `expand-file-name' on the remote file name, like '(expand-file-name "/ssh:user@host:~/")'. Tramp expands it to "/ssh:user@host:/home/user/", in case the "/home/user" is the home directory of "user" on "host". Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:45:34 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 16:45:34 +0000 Received: from localhost ([127.0.0.1]:44435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTppy-000542-0s for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:45:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTppv-00053m-5d for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 12:45:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59113) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTppo-000308-1p; Wed, 29 Apr 2020 12:45:20 -0400 Received: from [176.228.60.248] (port=4369 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTppm-0007K1-Av; Wed, 29 Apr 2020 12:45:19 -0400 Date: Wed, 29 Apr 2020 19:44:59 +0300 Message-Id: <83mu6uxmus.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <874kt2l0sx.fsf@gmx.de> (message from Michael Albinus on Wed, 29 Apr 2020 18:22:06 +0200) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, dgutov@yandex.ru 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.3 (---) > From: Michael Albinus > Cc: dgutov@yandex.ru, simenheg@runbox.com, monnier@IRO.UMontreal.CA, > 40940@debbugs.gnu.org > Date: Wed, 29 Apr 2020 18:22:06 +0200 > > > My patch only calls expand-file-name on local file names. For remote > > file names, I've left the result of the call to file-remote-p > > unaltered. Would that be a problem if the file name, after stripping > > the remote protocol parts, started with "~/" ? And if so, what should > > be done here about these cases? > > Call `expand-file-name' on the remote file name, like > '(expand-file-name "/ssh:user@host:~/")'. Tramp expands it to > "/ssh:user@host:/home/user/", in case the "/home/user" is the home > directory of "user" on "host". Thanks. Dmitry, this means my change should be reworked to call expand-file-name before file-local-name, right? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 14:20:16 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 18:20:16 +0000 Received: from localhost ([127.0.0.1]:44514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrJg-00010y-Hc for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:20:16 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:44974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrJe-00010i-Sz for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 14:20:15 -0400 Received: by mail-wr1-f44.google.com with SMTP id d17so3684271wrg.11 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 11:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JH6rT1d7KEoBUGT6dzIvdlm8cadl3VECTJcpk/8r6dE=; b=i6OzgnnRRFBS3yPOQMnJhZU2dn4WTxSUtbDGjSW8NXpM3SJ7YWA4SI3K6VZhZfN2PA sfZfhQrIhiiOjgVwxlIthNEvP4UVM6cHQ8bQMYD/4+1RvzeZ9aano6/ggzzMVdjz05+A 4asR3r+wx6QJ/8GcDrIYV2m59VsxP0JU8OjD6cvdGHUAKRsQYCIRM9tgOPpqjee3PcCd Kt1xlJteqM52WikOUvlWqyWekV+xbaUFY9OPhTdcmnAntZUpjWE3kk0/lA58BkX0DP7l 16SnXITf7Hfpwh7ykl7zp+WB2yxhDXKI1i+mxU6s9yLmImiTMKW/QZDNNAsrs29q3xKj rAQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JH6rT1d7KEoBUGT6dzIvdlm8cadl3VECTJcpk/8r6dE=; b=IZvUye3MECfbGz4OtC4Nl8Jk2k8ARLs3Tp+fpHFiSR/mzkZzL5JeuktSC++vs7vZxW Z/m/mdzVWj4vaI3a35AltLkFoap9T9XjaBMHeS5z+eLeL43s8hGt0hP3Q9jwQaOeoIIB B1uekl+qTMW8PBGGg+6X+JUGv/FFiAv2yKY0pnmlWk3/jWPVVzwyReswVSzijahwxRW+ PkoUmeypv5Rab9e7WUpvrFUHnwU9881QxTu/aMThGQhDoh+TFckLc+8UvRQsGeypOAku GkP9RMCHkF619h6BBABDb/7k4vcAQmaDFsXzYR8qVNOYPqImNvyoDgfMc87lP5fk2puM jZKg== X-Gm-Message-State: AGi0PuauBgfsebvAcW9Hd5ZQA/u6Pon+BXj++IfPztJ8kO9oIfmNe95P TJYi3oqsR8GDvjdPQhEPjfH5n50l8PA= X-Google-Smtp-Source: APiQypJzhIqDY58YBa7IzxXUGILLlTLk7rhMLNEpGUM28F2p8U5hCzePQJZLQ4Muc0/HvSafJi4IHQ== X-Received: by 2002:a5d:6107:: with SMTP id v7mr38572885wrt.270.1588184408749; Wed, 29 Apr 2020 11:20:08 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id r17sm74830wrn.43.2020.04.29.11.20.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 11:20:08 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii , Michael Albinus References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> From: Dmitry Gutov Message-ID: <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> Date: Wed, 29 Apr 2020 21:20:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83mu6uxmus.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 19:44, Eli Zaretskii wrote: > Dmitry, this means my change should be reworked to call > expand-file-name before file-local-name, right? Seems so. Something like this? diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index dbc967b885..f80b4328bc 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -185,17 +185,16 @@ project--files-in-directory (require 'find-dired) (require 'xref) (defvar find-name-arg) - (let* ((default-directory dir) - (dirname (file-remote-p dir 'localname)) - (dirname (or dirname - ;; Make sure ~/ etc. in local directory name is - ;; expanded and not left for the shell command - ;; to interpret. - (expand-file-name dir))) + (let* ((dir + ;; Make sure ~/ etc. in local directory name is + ;; expanded and not left for the shell command + ;; to interpret. + (expand-file-name dir)) + (default-directory dir) (command (format "%s %s %s -type f %s -print0" find-program - dirname - (xref--find-ignores-arguments ignores dirname) + dir + (xref--find-ignores-arguments ignores dir) (if files (concat (shell-quote-argument "(") " " find-name-arg " " From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 14:39:17 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 18:39:17 +0000 Received: from localhost ([127.0.0.1]:44575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrc5-0003c7-89 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:39:17 -0400 Received: from mout.gmx.net ([212.227.15.15]:54715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrc3-0003bs-Ra for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 14:39:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588185535; bh=d7ERvOMvBQ4+/9sxeFGIng31Lin29YgBL6soJOEYGXk=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=cheqcYqL+uPauO12l2eRm8qOyOJVUMuBIIrifMa2I3MF4uJ7QBPV3fsUUtIQdxQBb 2MQg5D70KAa12K3o5VkUmHbYZ57f6AiHg8atJrdTYUsfGbqiQ9+dl+9gkbmPkTob6y rwafIs6SgjcrHvqTKHPqmITuUdiM+z9Pfinh3JF0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.54.201]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Msq6M-1j9qkR0cg4-00tDAs; Wed, 29 Apr 2020 20:38:55 +0200 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> Date: Wed, 29 Apr 2020 20:38:49 +0200 In-Reply-To: <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> (Dmitry Gutov's message of "Wed, 29 Apr 2020 21:20:06 +0300") Message-ID: <87d07q2l3a.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:lkpdQjGaQ2ros0rj6re64JHBHj3j0Ql6sSKSn8QYSn7CR0yjCe4 La1NwpXRvftdP78KxhzjXZXo9lehxf35M3SL4zAgDxEwlag//GuP+uC128dZsxtpGwUVdDt xXs6rdBYFLqt1UXhhLeEd6jfzO9O4ZArPxdLuEq0Gmlm0LZNP1VzkrCvTVahWWinMXd89RV 9Wx8nnNjwumwKawgWGvDA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:aztinDZpeqc=:TuSM1FvEAZ1M1+ZiKcGrha AdrzAQ981YtDVzwMXkd9DZgMl/f1DbCuAgdNGbew86gBYq7qZ5MZfRxm4Kiqnifr3vzF++gK4 2ZjM3T00VvfBAfBr2i4pNOZp4NrlsfHtwybzCTbfztPLKdr+3nsWu/ssFO55tq3dEFNPwDfGA ywomUFuujXrmO90btOWa84D7YFm65HJugsej0SpnX5tbO/wq+BcWH7cgGbPrwP3ocbQ9bzseW ihJPuxjKwaOJO1CuosANNkPHiBEVf+KTCW3tXcmay8FJAJoiAm2lvUFh4UTotE/H+Wxt0e5GR fkZuQ3cfiPnSoazd5Toie3nc7u0euB40tVysNepuYyUwCXY/fTYZQkrPlt7ZfZ2OsWizrL6L3 2dEjmSueZH5d2UHHPh4j7PqDvNPdyiBaa6OVnVmhpqPdEnvjdPS4q8e2jJfBvBtdPieG8axuv t0n6scGB9HTTrw/2KQTYWOTZgQuZfD95ddZPw7KvQ21YvyfuzBSvb/SAhjArYLup+2p+ReRYU lkp9yPZbKUVzqE1mV9QRetUuM44Q40HuEwj+IDWNeHFUm5wHynKXuqNX8UubtaP+aWFDE1O3x StjSQJZfPT+RSqCooJqsy5FBThAjXJ/lNVioZgJ4zPsuX8HsNHNklLCQDIEKB2g45FDOhs44U Kz1EMDnZJZBNpp3UPbkerjLZX84QJ/WQsKweM+MYDKZAXmLxU+z7t4tg3eKotpJETvgyQ2W0q /1AzuYIuY3DAn3TH5f2znePUrfcQrwaxmwgb6oj4yboZM9xHosMekteSAGX1LmYLbDUm5jwL8 oaLcen4jnp7QTnnZzLxHPEpqHlMgy+9qMt9i/IGNJsv59tI8JbditZNrMUb3s0KIGgQn9Gm9Y 8KohD6SWteJvy4wdx/mEqkDhs0Uvwcqql03skfL6hA5qLQku7V0C+lKRq0WhvMsQsyfZ2gaXR YADvkY+AiSmDspwX4eHvV7B9YSj+HVfEqoUi8fzBoTrUNH5UCspgrPrxQjdegPNKMbQX4EPmB pT7pt1ugNGMKDtIvcoUfg9rXWwKMF2WRK1K9+VUUMERFqw2+Dxg5BTxwq6DyogxTc/SfUMwwF u7O4U/UKnfnQhskKjqkxEyLdtKruBIoHThYCF/aFUMjgxcMDVSyqKO3yHZGkAGzwDTESdW4BW MPPikSv9C+bwPtj7lzNF2kwXR57oRlIJxkDo4MQw5uV9u6pvPtBz4v9GYjH9z/c523l7T97WD 1z+5S+Si649Kin3B+ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, Eli Zaretskii , monnier@IRO.UMontreal.CA, 40940@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.7 (-) Dmitry Gutov writes: > On 29.04.2020 19:44, Eli Zaretskii wrote: >> Dmitry, this means my change should be reworked to call >> expand-file-name before file-local-name, right? > > Seems so. > > Something like this? > > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index dbc967b885..f80b4328bc 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -185,17 +185,16 @@ project--files-in-directory > (require 'find-dired) > (require 'xref) > (defvar find-name-arg) > - (let* ((default-directory dir) > - (dirname (file-remote-p dir 'localname)) > - (dirname (or dirname > - ;; Make sure ~/ etc. in local directory name is > - ;; expanded and not left for the shell command > - ;; to interpret. > - (expand-file-name dir))) > + (let* ((dir > + ;; Make sure ~/ etc. in local directory name is > + ;; expanded and not left for the shell command > + ;; to interpret. > + (expand-file-name dir)) > + (default-directory dir) > (command (format "%s %s %s -type f %s -print0" > find-program > - dirname > - (xref--find-ignores-arguments ignores dirname) > + dir > + (xref--find-ignores-arguments ignores dir) > (if files > (concat (shell-quote-argument "(") > " " find-name-arg " " No. dir is a remote file name. So you must still declare dirname as (file-local-name dir). Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 14:44:43 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 18:44:43 +0000 Received: from localhost ([127.0.0.1]:44579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrhK-0003kI-S6 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:44:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrhJ-0003k5-Kz for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 14:44:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:32876) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTrhC-0002Or-Pd; Wed, 29 Apr 2020 14:44:34 -0400 Received: from [176.228.60.248] (port=3710 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTrhC-0007Iu-2V; Wed, 29 Apr 2020 14:44:34 -0400 Date: Wed, 29 Apr 2020 21:44:14 +0300 Message-Id: <83ftcmxhc1.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> (message from Dmitry Gutov on Wed, 29 Apr 2020 21:20:06 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, michael.albinus@gmx.de, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Wed, 29 Apr 2020 21:20:06 +0300 > > On 29.04.2020 19:44, Eli Zaretskii wrote: > > Dmitry, this means my change should be reworked to call > > expand-file-name before file-local-name, right? > > Seems so. > > Something like this? Yes, but the original code called file-local-name, whereas this one doesn't. We had the call to file-local-name for a reason, didn't we? From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 14:56:37 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 18:56:37 +0000 Received: from localhost ([127.0.0.1]:44601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrsr-00042V-3k for submit@debbugs.gnu.org; Wed, 29 Apr 2020 14:56:37 -0400 Received: from mout.gmx.net ([212.227.17.22]:47241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTrsp-00042G-Ht for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 14:56:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588186576; bh=Y7lBmIYZO+dVqELWvbZlseZO3wF+3oA0DsrI13fxs1w=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=AXZ8TYbFv5he6sjb8xj1Nqr7918p6a4MgncLCwf8cMGGNQNBluWPBwguXKPsm/Iul CJaRBty3/9u+u4bhTBMAh4Zkwfy6w/rHpR6CwBAH3uvQWkANrpyjpLVFzhsxX3wdB9 LPMUp4DoVjuLtSzPEGaful1vUVPHPcXb/4TE3htA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.54.201]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3UZG-1jUQ6n36bC-000dkq; Wed, 29 Apr 2020 20:56:15 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> <83ftcmxhc1.fsf@gnu.org> Date: Wed, 29 Apr 2020 20:56:14 +0200 In-Reply-To: <83ftcmxhc1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 29 Apr 2020 21:44:14 +0300") Message-ID: <875zdi2ka9.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:YK336c6t5UlkRoS+4XNu+EoSANdpngBh4L4EeiYOQ7OlX4DErZ0 pgU+Hqkfinc+B61Xz7E3EzQhZqaaDn6yi8fWKWdw/D/KZUxbyY4PZ99gJYL78utJzWwJirG ZJdTfniRWN/mTAG82LfN2Yh22s/sFyHjvo82KURqAELoq+dCTlR7CR7JZRqPOhqUIMC7UiQ VK2uZ3U9EnLEU/os/yp/A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3tTq3AH5SUw=:4xeGUuaCNhZ2eABZR/zzBP 0rVp8KHHSzJWHz3ZbJCI8zZwqUa2r7XGpzfjxlaYlbQJJX9pK0nG65Or+8vGB+km5PGl+ylB9 ZygYZtVptNMuKW+IhzK8hDrvYcicviOrA2X8V4+wJUJmY6hLKmsbJ78GXsplH5vRBTvwDYIYs q1DJJTrH1xFsrxUwilxgfFYKjhnVNAC3H4J3WY50hOkzmxwTvQD77UQbooUWhKABlHtakcAkl HLefTVhD7EyXngx+ieV5Dx8s7BIkztaNNOPyBgbvwXv0qdysuduV4EiqAkW3WgEXux3zLFRQS MJt9tr6kcEt000v0KIMurwcfcowVsHGMaFhoS616xMwpzDbe9z0vpkuDsU1ZRBm+/dWYbli3f R2VSK0pRP/zxseMzdnvgnuXPW416AerTAw+pR43MlkbsfLJLz04BYzOtvxLLk7wsijoqbjIbf amIv+V0/DiExZz/8b8eweotaW+6xa/F8LXHksRE6Q+uAdgN7gc8saRUZaVY0a055ytFDFx3gF 6xKj42t4dlGNqJeEgWxtrc/Ej5hnxQpuS4Tu4WT71IUXXhRKr0EQlRl4hoT+euG2wXxKv8n6q lV4+fvn9i3mrTPfd1ExffRbiPMMccimSr1JKLVWri+BzFSE9kRrk/nwg3rMG1QkQ6zsPrBAmS KA2MR7iaLT/bTD8omym2feeYgxJx2oI99/19MH2ZlRCZCTArpbRuS/oP728GOccxfN1aj0X6W r9eaQRFBkhvqLwyxl5uOLuBcVqsjTU4gaLXp9KVPG3lhhda6OBJjYWHRJVoqrV9495+fNEidt YuA/YX50KkAXkWCYuHvGfiraZYDe8BvRQzPqQNlYeHPP4r4md4Yt2dC2/3TPHHZ9BKsjag+mW TaNF0d3s5kMQXyGct98TpVtR1wdG6ji/7wOOb83+L41rQEqFW/awwJ9m/Av5nEcMeLnMs2flV UtbbZGNCa35Cv1Z/OiG043P+8yZ/ag7Xr8Hmi9QZJs3Maek2OwrEVseppCjvtZPW1DZGYOJl4 6LQvbY0KptkhNlVSwRl20HswmtRGdJKPfvqBpnCFAjEhfVxxEUVfN659AYz+XrxFkvW3E3pcT wfwX4aoj9AjUHlPDlng1sRPZyWXkayrdeHHuwm1NUoswufgg8e/xBxOsm8FteBdj7k2LutGY+ kgnDBCYObV1FTPUBkWkiXXrxt1M2fwW3oJJvNXHzH2Lowr671yhAWTgnez5QhA34W+3EOr4kl b/PXesCUA+HlFQslS X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, Dmitry Gutov 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 (-) Eli Zaretskii writes: > Yes, but the original code called file-local-name, whereas this one > doesn't. We had the call to file-local-name for a reason, didn't we? Yes. The process shall always use the local file name in its arguments. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 15:09:24 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 19:09:24 +0000 Received: from localhost ([127.0.0.1]:44620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTs5D-0004Mk-P7 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 15:09:23 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:38157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTs5B-0004MW-02 for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 15:09:22 -0400 Received: by mail-wm1-f45.google.com with SMTP id g12so3257534wmh.3 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 12:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OqNHGO5nJM4gh/YyvIlThHG1VBtQ0y1HJ7QQxtzgCsM=; b=iruMLuE2Sz01SKOW4kAwbPP+Chh81G9ivEnSdIwDW7EDK5afz1Q5Iyp+U+gAuXOX5t twWnCjMY2L/CMGgbb+ibHsD6u15rP3NLz1ophk7C7HhEF7EnM1ao/+6T8SdeCu505apm +QPjyBDnvfGIGwmszdQANZKqt2bFIm/7EiCdKQWv0WSIYq5hgu2Dt0izeDXt32aY8EjV OR4WEnG09r1avqv9FM1KEtRKgRLff6cDNWuNFpLMwMgJW3pr/RXX8RIXTXazvmKQIer1 B1O8KCyVGpcxfE7aLCz21SxWLzFQB5VSkBVbVo8vL336EgxhZLk4dDpDiK4FaedjDQRY OZDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OqNHGO5nJM4gh/YyvIlThHG1VBtQ0y1HJ7QQxtzgCsM=; b=JRhhNE1Fkqjn/p0c4MwQwgkUltftiepIWnMKDnTxWmfrXAjCabjOmKioY+dL5lf01Y QIJfeyTYXNdIkBw7Rx37lrOCjwkg+K+pppFVDua4J3MOzq7QV72w/8i1Lp6GFf2wS+zy jUs2n//FtBzXaZPxl6gAvDPARvlZRVNvfkIjlFc6SxiD/a1lId/VDgcSCA8unsRgxOyF qwhqjcFmciDTUIcMnUnTzjlXhMmssiRhk8NiB2JtyGzXhmk97YAA7kXl6woflqqFO71E uy7gnfKJU3JJ3F2xK6uUSXCx92YuShRRn6GMjp/5jjI5xSH2EhlZluLENl26udQ8xyI6 rvjw== X-Gm-Message-State: AGi0PubYTOEOu73HEKCgC2c+aL/GNtJp4YVf/kEpC1DbhjTMVtCoGEPW IEdGiJj8sUGmveWB6VM2Dx3WNu2VQ6g= X-Google-Smtp-Source: APiQypK4jtXBbigEnpF/pLW5er7hka9vBpnwgt4HjsRxwtJMGq9Jn4FUNv+fCkYR5Y8kd+V8JKHj6w== X-Received: by 2002:a7b:c759:: with SMTP id w25mr5293035wmk.68.1588187354893; Wed, 29 Apr 2020 12:09:14 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id b12sm330878wro.18.2020.04.29.12.09.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 12:09:14 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Michael Albinus References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> <87d07q2l3a.fsf@gmx.de> From: Dmitry Gutov Message-ID: <0c8d25ad-4da3-e6fd-2db7-cea49c395cd0@yandex.ru> Date: Wed, 29 Apr 2020 22:09:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87d07q2l3a.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 21:38, Michael Albinus wrote: > No. dir is a remote file name. So you must still declare dirname as > (file-local-name dir). Right, thank you. I also see no reason not to pass the local name to xref--find-ignores-arguments (xref-matches-in-directory ends up doing that already). So the patch will be: diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index dbc967b885..f5f4092bab 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -186,16 +186,14 @@ project--files-in-directory (require 'xref) (defvar find-name-arg) (let* ((default-directory dir) - (dirname (file-remote-p dir 'localname)) - (dirname (or dirname - ;; Make sure ~/ etc. in local directory name is - ;; expanded and not left for the shell command - ;; to interpret. - (expand-file-name dir))) + ;; Make sure ~/ etc. in local directory name is + ;; expanded and not left for the shell command + ;; to interpret. + (localdir (file-local-name (expand-file-name dir))) (command (format "%s %s %s -type f %s -print0" find-program - dirname - (xref--find-ignores-arguments ignores dirname) + localdir + (xref--find-ignores-arguments ignores localdir) (if files (concat (shell-quote-argument "(") " " find-name-arg " " From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 15:15:34 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 19:15:34 +0000 Received: from localhost ([127.0.0.1]:44640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTsBB-0004Wt-QT for submit@debbugs.gnu.org; Wed, 29 Apr 2020 15:15:34 -0400 Received: from mout.gmx.net ([212.227.17.20]:59053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTsB9-0004WY-La for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 15:15:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588187710; bh=+nDZw4iKDloVjzvgX1Mue8kbr5DMs7pVge8LDipg9vk=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=MSkKeKD+L6XxQC4YY2WrYm6BGQx0OXI8Btnbeqh3yOVnVAYyDhD3M4zcBxNxQ97d3 wNXThSVjT273b1mKrRtQ66xZluBbHErYrBeLQefag5mDi6YdpJByBuu0IYsidIs/Vu WXPEwz/wk9LGOjsRc4zZc72JN0M1n5qIN5vhwmYI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.54.201]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N95eJ-1j941J0swJ-0166C0; Wed, 29 Apr 2020 21:15:10 +0200 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> <87d07q2l3a.fsf@gmx.de> <0c8d25ad-4da3-e6fd-2db7-cea49c395cd0@yandex.ru> Date: Wed, 29 Apr 2020 21:15:08 +0200 In-Reply-To: <0c8d25ad-4da3-e6fd-2db7-cea49c395cd0@yandex.ru> (Dmitry Gutov's message of "Wed, 29 Apr 2020 22:09:12 +0300") Message-ID: <87tv1214ub.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:xSv5ooioCLeqcab0ShficbO7do/vV/ANb9zEADXnK14dPN+kbtM Sx4OTdafZG58siHZxu+ya4EJJcexPEGH9dx/FhWos95tOdOkzBLS15G0Bm5Hi6Sj1FlOurq sT0HUx7s7GUce33Z1wY/a/YzGdlh0cCSIoH5i5lDzx8ARpVKXbKtgv0FAXn1VRWpnJHCH5a 9uiRn+z7fnFOK29z9xriw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:zjowXMg3ewo=:qFpcux3BfDwnbSF1chXMZd XtAFq3+6G9lwFBxqbxscu6p3h6vLOCBP7gMVLBinhm3Awpk1dG6jKbXECn2zFauC+HpHgVgge QIB1ElBwzC2biTwViZ9XrXhLgxuqniN92ktEEekBrDCrBkkasrlL/9XWMjYNaAaRv3F/dJ3+H fygSPjLhy6AhVMLaAHyBQgx/m6ZuerWiDEBNWGrlG3jOUQZ9IwwdQprrRzPZ/fiwa988htJUw rCQuDTR81htBm6T6l3y034afxgr345C1GV4BhKrkdQTHhj+jJrIRKCqgSJVP4lKKldD4plAow J5i3TREqVT5CJU3X2TKHmEA6cfugST7gFSaOge9uRvSWL2lHwX4eqVvLQlN392yoESBPtZaqA u0ctwvjVpEyZDkxHvQ840ZNcXA0a4psm7rYMn1fa+VzW5yVelmBPyvTnx1icdFoarUzVx7BaR DvlLXW4QoVCex8WYIJuljE+AWYKXRGi1ZRBPhFjm2Mp0xqyCo3SqewensZgFuMtVlXvnUYWjU aNM5Ywaau9a/PSi/d/rNMd+lnSUuqQtpKh4kOADB+ry9DIWcuo5jWpCQAN4XhkYUMxSbzB4nV cy+whNtFRhgsuQ6uZ0vwlpDkacmjq0hpWpfQaxooJCIyK77NXVf17d9HeliwelZiOYbp/Y+fJ 4v3PcXWF2aqQmYmbD5IQrYWm+Nslaz0FSxvtAGlQ6HpjEiGdhSMH15oJMSdfqcoLjNrwX6jLJ 4mbsOR1oKCYeDv6DmbHI5sMD87qPbLEeN7b458DBgt5/BSa4kGlqOprOALCB5Gs4epkC+qqtH 2lyiGXYRF9KRDKjxrHGwczrBnJph4XzjVQI5nMkXCNEi2mXv1zjA0EaMxyIH+YXQq8JBF8STE E7EWz0xVWNcLzx5ideZQN0u4rgQccIP99CWox7paTIMSHk4dQnV6hV1PilMvL8A1Xj6TIHXeT yhJBUOoIKTuhwrV3PWqSWKV9VLpULErrVRCvcJodinPWQNfiCz4B4HkBgSOwbZV6mHP0h/BVq 1h6VxxfCtdWS7T4xtXQiqHM+040YpPABqF+KgeeKiiAzxHVqUoPAXfLe7o5H6YIeJezxwJIQl cca/jV+gnCitymzLvJNtad6r0GoUEQiyv36ralItpvDor/nEcvICrBly/OsgHRblR8a1kdO27 3VEzXIfesku+8WgFwslQ7w2djlyCQZATkRxKtrRftMAbK9aHfi8s9zD4pdZKaNObgXPPqk6i0 zQQDmyo1UAR3XYUea X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.7 (-) Dmitry Gutov writes: > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index dbc967b885..f5f4092bab 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -186,16 +186,14 @@ project--files-in-directory > (require 'xref) > (defvar find-name-arg) > (let* ((default-directory dir) > - (dirname (file-remote-p dir 'localname)) > - (dirname (or dirname > - ;; Make sure ~/ etc. in local directory name is > - ;; expanded and not left for the shell command > - ;; to interpret. > - (expand-file-name dir))) > + ;; Make sure ~/ etc. in local directory name is > + ;; expanded and not left for the shell command > + ;; to interpret. > + (localdir (file-local-name (expand-file-name dir))) > (command (format "%s %s %s -type f %s -print0" > find-program > - dirname > - (xref--find-ignores-arguments ignores dirname) > + localdir > + (xref--find-ignores-arguments ignores localdir) > (if files > (concat (shell-quote-argument "(") > " " find-name-arg " " LGTM (I haven't tested, 'tho). Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 15:27:03 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 19:27:03 +0000 Received: from localhost ([127.0.0.1]:44723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTsMJ-0004qa-EK for submit@debbugs.gnu.org; Wed, 29 Apr 2020 15:27:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTsMI-0004q8-7S for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 15:27:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33711) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTsMB-00016U-Gb; Wed, 29 Apr 2020 15:26:55 -0400 Received: from [176.228.60.248] (port=2297 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTsMA-0006gp-6y; Wed, 29 Apr 2020 15:26:55 -0400 Date: Wed, 29 Apr 2020 22:26:37 +0300 Message-Id: <838siexfde.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <0c8d25ad-4da3-e6fd-2db7-cea49c395cd0@yandex.ru> (message from Dmitry Gutov on Wed, 29 Apr 2020 22:09:12 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83y2qexrra.fsf@gnu.org> <87blnal2at.fsf@gmx.de> <83o8raxoh3.fsf@gnu.org> <874kt2l0sx.fsf@gmx.de> <83mu6uxmus.fsf@gnu.org> <453f2bf9-2312-c8a3-4a70-fdd41ad5a3f7@yandex.ru> <87d07q2l3a.fsf@gmx.de> <0c8d25ad-4da3-e6fd-2db7-cea49c395cd0@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, michael.albinus@gmx.de, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > From: Dmitry Gutov > Date: Wed, 29 Apr 2020 22:09:12 +0300 > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > > On 29.04.2020 21:38, Michael Albinus wrote: > > No. dir is a remote file name. So you must still declare dirname as > > (file-local-name dir). > > Right, thank you. I also see no reason not to pass the local name to > xref--find-ignores-arguments (xref-matches-in-directory ends up doing > that already). > > So the patch will be: Yes, I think so. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 16:54:01 2020 Received: (at 40940) by debbugs.gnu.org; 29 Apr 2020 20:54:01 +0000 Received: from localhost ([127.0.0.1]:44788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTtiT-0006vT-B9 for submit@debbugs.gnu.org; Wed, 29 Apr 2020 16:54:01 -0400 Received: from mail-wm1-f47.google.com ([209.85.128.47]:37186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTtiS-0006vH-J3 for 40940@debbugs.gnu.org; Wed, 29 Apr 2020 16:54:00 -0400 Received: by mail-wm1-f47.google.com with SMTP id z6so3579177wml.2 for <40940@debbugs.gnu.org>; Wed, 29 Apr 2020 13:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KvsUUxx6rXUhjyxc0XNj5xWLhtLe/BTKXECbAB8vJkM=; b=QdZq5gaC/UL8CWG9I5MissHEpnKuC/Zhhg00tzQvjEBjMowYKncTjCfg6qfhqzhbUf 542vFsaTtWp7RnNQ9Saxr+jjgwCxbEX6eOw7/vAgKrtuP73x/RR483JsmqjwhK9N733K 5FZ++LUb4bAXM/0VOd0+/vb8AuAZTZuPhUTnI22xxg8tJwNGuAwN1Ayl51X0fITEFubb RZjNbpcb0d65+4NmI4zuB6/lH6gLdG8/KuaSWDy5Glws6NOXNDYbbLZreEy8kqbCt+kP +201DIaxcZWSaNMKebErQUamwYRoA4Ilmii6rnZDw3A9FUC0KciCGuJRzRrS2ChiiNpS 3KEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KvsUUxx6rXUhjyxc0XNj5xWLhtLe/BTKXECbAB8vJkM=; b=HTE98mXBze9gpCwOuHBwV3uqsB6Gx58y1VHpRurvHkMYu96jReUJDK7PDLmpyGMquz 95/TYNmtrScdT0gwLKA8rjC0IW5aE4+/MpYR2GlVlZ7bM/YSTiMHTfW4MRsmkHGsWyYB V96OeEyuZ7UuTTVx3yuE9JLIsWfL8Gvk/G5XfYRgZ0TcwlO8r2yicaAMQK/9USqL0F9C XbMeC3fQnUPK+Jzbdu4ZwuAItUYlnMbuqooLj1cUybdbn8dzPJX8OFY81Jowi2SDIPLm ywOffBhK3+qE8ndna5VSBu92WtW3RlJAjKtfqL62UJCA9G4NoBytcpcEDwiFHpXdpS/S QyNg== X-Gm-Message-State: AGi0PubMx7laMMYA/QxTDWMQ99fWrDImos0oJfkcrfr+giZjL0WSIC7w CM/IufCBwFWcH8XY0nFJfWCPkM93hzU= X-Google-Smtp-Source: APiQypLG7r7i4ikZbZC/NPhwqvOWC8Uu/jN8aJaViloMhPjJxC/zQ/FN7eJbSWBs/HgtW966X5Cs5w== X-Received: by 2002:a1c:44b:: with SMTP id 72mr5181958wme.58.1588193629194; Wed, 29 Apr 2020 13:53:49 -0700 (PDT) Received: from [192.168.0.2] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id x18sm719801wrv.12.2020.04.29.13.53.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 13:53:48 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> From: Dmitry Gutov Message-ID: <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> Date: Wed, 29 Apr 2020 23:53:46 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83mu6uzi8h.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 29.04.2020 13:41, Eli Zaretskii wrote: > The patch below seems to fix the rest. Note that I've decided to make > the change in fileloop.el, since I think all the other callers need > the same fix. Naturally. > Also, using downcase is not entirely correct, we should > use isearch-no-upper-case-p instead. I usually like isearch-no-upper-case-p behavior, but here it doesn't fit the docstring, does it? There is no value of CASE-FOLD described that would indicate that the function will be too smart about it. So we'd need to update the docstring that the CASE-FOLD value of t will obey the value of `search-upper-case'. Then we'll consult it as well, like isearch-search does. Alternatively, we could for now use the below patch which changes the behavior less: diff --git a/lisp/fileloop.el b/lisp/fileloop.el index 543963feaf..c3c55badf5 100644 --- a/lisp/fileloop.el +++ b/lisp/fileloop.el @@ -175,14 +175,16 @@ fileloop-continue (funcall fileloop--operate-function))) (setq file-finished t)))) +(defun fileloop--case-fold (arg) + (if (memq arg '(t nil)) arg case-fold-search)) + ;;;###autoload (defun fileloop-initialize-search (regexp files case-fold) (let ((last-buffer (current-buffer))) (fileloop-initialize files (lambda () - (let ((case-fold-search - (if (memq case-fold '(t nil)) case-fold case-fold-search))) + (let ((case-fold-search (fileloop--case-fold case-fold))) (re-search-forward regexp nil t))) (lambda () (unless (eq last-buffer (current-buffer)) @@ -203,15 +205,16 @@ fileloop-initialize-replace (fileloop-initialize files (lambda () - (let ((case-fold-search - (if (memql case-fold '(nil t)) case-fold case-fold-search))) + (let ((case-fold-search (fileloop--case-fold case-fold))) (if (re-search-forward from nil t) ;; When we find a match, move back ;; to the beginning of it so perform-replace ;; will see it. (goto-char (match-beginning 0))))) (lambda () - (perform-replace from to t t delimited nil multi-query-replace-map)))) + (let ((case-fold-search (fileloop--case-fold case-fold)) + search-upper-case) + (perform-replace from to t t delimited nil multi-query-replace-map))))) (provide 'fileloop) ;;; fileloop.el ends here From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 30 16:24:48 2020 Received: (at 40940) by debbugs.gnu.org; 30 Apr 2020 20:24:48 +0000 Received: from localhost ([127.0.0.1]:47780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUFjk-0003rR-8R for submit@debbugs.gnu.org; Thu, 30 Apr 2020 16:24:48 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:42169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUFjh-0003r0-NO for 40940@debbugs.gnu.org; Thu, 30 Apr 2020 16:24:46 -0400 X-Originating-IP: 91.129.106.11 Received: from mail.gandi.net (m91-129-106-11.cust.tele2.ee [91.129.106.11]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9E9AD60002; Thu, 30 Apr 2020 20:24:37 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early Organization: LINKOV.NET References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> Date: Thu, 30 Apr 2020 23:16:04 +0300 In-Reply-To: <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> (Dmitry Gutov's message of "Wed, 29 Apr 2020 23:53:46 +0300") Message-ID: <877dxwu3uj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, Eli Zaretskii , monnier@IRO.UMontreal.CA, 40940@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.7 (-) >> Also, using downcase is not entirely correct, we should >> use isearch-no-upper-case-p instead. > > I usually like isearch-no-upper-case-p behavior, but here it doesn't fit > the docstring, does it? There is no value of CASE-FOLD described that > would indicate that the function will be too smart about it. > > So we'd need to update the docstring that the CASE-FOLD value of t will > obey the value of `search-upper-case'. Then we'll consult it as well, > like isearch-search does. Recently we changed hi-lock.el to follow the same logic as isearch-no-upper-case-p, so this will make the behavior consistent across different packages. From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 02:00:36 2020 Received: (at 40940) by debbugs.gnu.org; 1 May 2020 06:00:36 +0000 Received: from localhost ([127.0.0.1]:48114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUOix-0002G7-Ec for submit@debbugs.gnu.org; Fri, 01 May 2020 02:00:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUOiv-0002Fu-QA for 40940@debbugs.gnu.org; Fri, 01 May 2020 02:00:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38036) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUOio-0003Dc-TE; Fri, 01 May 2020 02:00:26 -0400 Received: from [176.228.60.248] (port=4964 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUOil-0002jw-6F; Fri, 01 May 2020 02:00:25 -0400 Date: Fri, 01 May 2020 09:00:10 +0300 Message-Id: <83imhgw5xx.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <877dxwu3uj.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 30 Apr 2020 23:16:04 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <877dxwu3uj.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org, dgutov@yandex.ru 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.3 (---) > From: Juri Linkov > Cc: Eli Zaretskii , simenheg@runbox.com, > monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > Date: Thu, 30 Apr 2020 23:16:04 +0300 > > >> Also, using downcase is not entirely correct, we should > >> use isearch-no-upper-case-p instead. > > > > I usually like isearch-no-upper-case-p behavior, but here it doesn't fit > > the docstring, does it? There is no value of CASE-FOLD described that > > would indicate that the function will be too smart about it. > > > > So we'd need to update the docstring that the CASE-FOLD value of t will > > obey the value of `search-upper-case'. Then we'll consult it as well, > > like isearch-search does. > > Recently we changed hi-lock.el to follow the same logic as > isearch-no-upper-case-p, so this will make the behavior > consistent across different packages. Btw, looking at the other callers of fileloop-initialize-search, don't get their logic backwards? If the string typed by the user does NOT include upper-case character, that means the search SHOULD obey the default value of case-fold-search. Or am I missing something? From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 02:57:49 2020 Received: (at 40940) by debbugs.gnu.org; 1 May 2020 06:57:49 +0000 Received: from localhost ([127.0.0.1]:48137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUPcK-0003ZK-RB for submit@debbugs.gnu.org; Fri, 01 May 2020 02:57:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUPcI-0003Z5-O5 for 40940@debbugs.gnu.org; Fri, 01 May 2020 02:57:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38637) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUPcB-0006fH-D7; Fri, 01 May 2020 02:57:39 -0400 Received: from [176.228.60.248] (port=4455 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUPc8-0000EC-FQ; Fri, 01 May 2020 02:57:38 -0400 Date: Fri, 01 May 2020 09:57:24 +0300 Message-Id: <835zdgw3aj.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> (message from Dmitry Gutov on Wed, 29 Apr 2020 23:53:46 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Wed, 29 Apr 2020 23:53:46 +0300 > > > Also, using downcase is not entirely correct, we should > > use isearch-no-upper-case-p instead. > > I usually like isearch-no-upper-case-p behavior, but here it doesn't fit > the docstring, does it? There is no value of CASE-FOLD described that > would indicate that the function will be too smart about it. > > So we'd need to update the docstring that the CASE-FOLD value of t will > obey the value of `search-upper-case'. Then we'll consult it as well, > like isearch-search does. I don't think I follow. isearch-no-upper-case-p is just supposed to tell you whether a regexp includes upper-case characters that would need the search to become case-sensitive. All the rest of the considerations, like the value of case-fold-search, are to be applied by the caller. I see no reference to either case-fold-search or case-fold in isearch-no-upper-case-p. So why would we need to update its doc string? > Alternatively, we could for now use the below patch which changes the > behavior less: > > diff --git a/lisp/fileloop.el b/lisp/fileloop.el > index 543963feaf..c3c55badf5 100644 > --- a/lisp/fileloop.el > +++ b/lisp/fileloop.el > @@ -175,14 +175,16 @@ fileloop-continue > (funcall fileloop--operate-function))) > (setq file-finished t)))) > > +(defun fileloop--case-fold (arg) > + (if (memq arg '(t nil)) arg case-fold-search)) > + > ;;;###autoload > (defun fileloop-initialize-search (regexp files case-fold) > (let ((last-buffer (current-buffer))) > (fileloop-initialize > files > (lambda () > - (let ((case-fold-search > - (if (memq case-fold '(t nil)) case-fold case-fold-search))) > + (let ((case-fold-search (fileloop--case-fold case-fold))) > (re-search-forward regexp nil t))) > (lambda () > (unless (eq last-buffer (current-buffer)) > @@ -203,15 +205,16 @@ fileloop-initialize-replace > (fileloop-initialize > files > (lambda () > - (let ((case-fold-search > - (if (memql case-fold '(nil t)) case-fold case-fold-search))) > + (let ((case-fold-search (fileloop--case-fold case-fold))) > (if (re-search-forward from nil t) > ;; When we find a match, move back > ;; to the beginning of it so perform-replace > ;; will see it. > (goto-char (match-beginning 0))))) > (lambda () > - (perform-replace from to t t delimited nil multi-query-replace-map)))) > + (let ((case-fold-search (fileloop--case-fold case-fold)) > + search-upper-case) > + (perform-replace from to t t delimited nil multi-query-replace-map))))) Does that really work in the case in point? Unless I'm missing something, if case-fold-search is t by default, this patch would cause the search to be case-insensitive even if the FROM regexp includes upper-case characters. But in that case, perform-replace will internally decide to be case-sensitive, and we have the same failure on our hands. This is why the patch I proposed explicitly examined the FROM regexp for upper-case characters. Whereas yours doesn't. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 11:27:55 2020 Received: (at 40940) by debbugs.gnu.org; 1 May 2020 15:27:55 +0000 Received: from localhost ([127.0.0.1]:50444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUXZz-0002c0-IE for submit@debbugs.gnu.org; Fri, 01 May 2020 11:27:55 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:40666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUXZx-0002bn-Kz for 40940@debbugs.gnu.org; Fri, 01 May 2020 11:27:54 -0400 Received: by mail-wr1-f45.google.com with SMTP id e16so6777176wra.7 for <40940@debbugs.gnu.org>; Fri, 01 May 2020 08:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=FT8bWzHBqbtacR/vf798wXd3Q8AsXMyXMiuiwBMnOIc=; b=HfCXUHu9vhAaxAnogiDc2QAiE6/Peg7xun6tY4m1wwS4XvgXXKBp7iz+7VW55oEdhq 93Ngr0sLIu9ehu6vMDpe3WjMedvwKcf4rREhK241ndIpoL4Rao88L5hKA/cib0DcEZg1 Ucjw/oVeS9RegzwJ7IseoZSZgZawSqvbWUCqxGHMVr9VcjzuEn6iC0LANynP13aZEf4P kH4jzIaUJg9PMHVE2DWKbpKEhzOgoBk0ddYi1v4ZjwM85UKxNNn8rJ4xL7xuJzk0Bnb6 Gfutm5PO2frZBw8bTvTV0cmIox8QOj60gg7TBsCfC45+6A30jiatUhTpm5NLI0hbT1JM ZdhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FT8bWzHBqbtacR/vf798wXd3Q8AsXMyXMiuiwBMnOIc=; b=LZKQPhbn57gbFgiACAzE4qyKFfEi7Rc7jaAKeNmBs8ev6CEmbkw6DTYZwLLloq7DL6 +O0rT0UHyIQqOgXZfab6CnqEIbqA8S+EzPnWYZpHIBCZrnxxY+XzKes/K+AjoG/Ua7NU lubydh2+hU8qt0l99+ujmvGr1RMTfSQVM2LGHUXl2KIRNRnnxG5DQ9BPX8IqQ0ueIKBE 1ZkgM/aCDfvpc/D3Fh4iZmCAVXMAfczAcLqbX4aTy9UwjEYti/W8btSNOWXxuTfTM/1B v353V5nycr3h5+LL03FQYvXdEKOnBAJyyN2cp/CxH4vtthe98QJZLRgHxZ6+N3hkomDh gBhw== X-Gm-Message-State: AGi0PuaHU+85qq2+ohgxG8z7zD//pGZdgR4+6f/01XNfkHPQZM0RK/jA 5FrfrJdefqG6PR2Ad+GuIvHjtliKpPE= X-Google-Smtp-Source: APiQypKL+395Iqog/RrUjPpG5RpTxWk4RsaNSkGhRdiDWVI+5QVC7YhOkYSZQrGhieez4D2HsLvVLw== X-Received: by 2002:adf:a297:: with SMTP id s23mr4849251wra.54.1588346867521; Fri, 01 May 2020 08:27:47 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id p190sm61829wmp.38.2020.05.01.08.27.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2020 08:27:46 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Fri, 1 May 2020 18:27:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <835zdgw3aj.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 01.05.2020 09:57, Eli Zaretskii wrote: > I see no reference to either case-fold-search or > case-fold in isearch-no-upper-case-p. So why would we need to update > its doc string? Sorry if that was unclear: I think we'd need to update the docstring of fileloop-initialize-replace. Which doesn't offer any hints that the logic of isearch-no-upper-case-p will be employed. Also see the part about obeying the value of search-upper-case. > Does that really work in the case in point? Unless I'm missing > something, if case-fold-search is t by default, this patch would cause > the search to be case-insensitive even if the FROM regexp includes > upper-case characters. But in that case, perform-replace will > internally decide to be case-sensitive, and we have the same failure > on our hands. This is why the patch I proposed explicitly examined > the FROM regexp for upper-case characters. Whereas yours doesn't. Since we bind search-upper-case to nil in this patch, perform-replace won't try to alter the value of case-fold-search internally. From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 11:46:28 2020 Received: (at 40940) by debbugs.gnu.org; 1 May 2020 15:46:28 +0000 Received: from localhost ([127.0.0.1]:50466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUXrh-00035O-U9 for submit@debbugs.gnu.org; Fri, 01 May 2020 11:46:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUXrg-00035C-T1 for 40940@debbugs.gnu.org; Fri, 01 May 2020 11:46:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57443) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUXra-0006kz-Tq; Fri, 01 May 2020 11:46:06 -0400 Received: from [176.228.60.248] (port=1679 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUXra-0008TW-16; Fri, 01 May 2020 11:46:06 -0400 Date: Fri, 01 May 2020 18:45:55 +0300 Message-Id: <83sggjveto.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Fri, 1 May 2020 18:27:45 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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 (-) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Fri, 1 May 2020 18:27:45 +0300 > > On 01.05.2020 09:57, Eli Zaretskii wrote: > > I see no reference to either case-fold-search or > > case-fold in isearch-no-upper-case-p. So why would we need to update > > its doc string? > > Sorry if that was unclear: I think we'd need to update the docstring of > fileloop-initialize-replace. Which doesn't offer any hints that the > logic of isearch-no-upper-case-p will be employed. Ah, okay. Agreed. > > Does that really work in the case in point? Unless I'm missing > > something, if case-fold-search is t by default, this patch would cause > > the search to be case-insensitive even if the FROM regexp includes > > upper-case characters. But in that case, perform-replace will > > internally decide to be case-sensitive, and we have the same failure > > on our hands. This is why the patch I proposed explicitly examined > > the FROM regexp for upper-case characters. Whereas yours doesn't. > > Since we bind search-upper-case to nil in this patch, perform-replace > won't try to alter the value of case-fold-search internally. But that's contrary to how query-replace works, isn't it? From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 19:22:14 2020 Received: (at 40940) by debbugs.gnu.org; 1 May 2020 23:22:14 +0000 Received: from localhost ([127.0.0.1]:50903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUeyz-00028m-N0 for submit@debbugs.gnu.org; Fri, 01 May 2020 19:22:13 -0400 Received: from mail-wm1-f52.google.com ([209.85.128.52]:53531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUeys-000288-81 for 40940@debbugs.gnu.org; Fri, 01 May 2020 19:22:13 -0400 Received: by mail-wm1-f52.google.com with SMTP id k12so1567959wmj.3 for <40940@debbugs.gnu.org>; Fri, 01 May 2020 16:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JINMhMDniqEpZB98Ccth+T9ErZU3DIle3NW+ckzkqmc=; b=GXc2r1VTiCFZrt6IRht/VAwCokbobM6FOLAg5kv0ie9SqLuPoQwEXYU0tvLL/vS81a 1cw0ejYHC28tGD+mQVoXQDgTW/54Zs3eCAwxisxm3UAWnl3vnTTKL4q5JTG3oVsZOVU7 je5kca5sJooOL41uQ7r4R1NXwGCddtXVstDtTwm7AX1LoCFRI8uHMJTa0ZkGQrT/LDAA 6lRJHubIhjGTx2I6Q0d2OKLx6t8pHyinRW+z43JvJP0whgLqMzdw34hHGV4HlpnrdEOW XgHRv5SV79cFl3G1njIKfkp95Vc+4V6J5Lgo4gWjU+zcmTi1ml5klVJR3i1SVmckzneK Ek7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JINMhMDniqEpZB98Ccth+T9ErZU3DIle3NW+ckzkqmc=; b=g4sUbOzFx7yVLb1ePfMBrYztWXWBWGexrGqtHy8dRQDxEvx2P9soceK35bjfhZ8KFa KAazOG5IJ020i5lv9P4YdinpW4SHan7NmwaCbkt4nKGzAwEaAqsJ5sbk6NpMwsDveviu N3C00hMoeKfuhN5ksQuZCW6uzmzgjrvvCXOrmzRk1E5E9zLgwbQc7Tgcz58tJQImB7YK DTKlLeG9YDAiCy+oqp9W01g9oUFKgh20StQu4BYP9bduZ03Bre5vS6ym9ighEefJiNYr x89X8dDDHzLVup6sxqMDCpLcXXKMb2n9EzX08K0tKf+tZB46nI0WnUrMt783rLu+vnru OXNA== X-Gm-Message-State: AGi0PuZEnypcq+f2jzgVAFCYHPAeBSxYtIVG/6+ngtPm1mPOJRIssBTL wwA8JOwfHc0vuyh8lhVK9XsEqnpNRNU= X-Google-Smtp-Source: APiQypK1JPfUed7o95TNLHq5jYOx+rLNmtTb2zGi3QKFGILiNhw9Our0vBZyhSiv1QUIYkH+F7mQ2A== X-Received: by 2002:a1c:7416:: with SMTP id p22mr1898776wmc.80.1588375320002; Fri, 01 May 2020 16:22:00 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id m14sm6227952wrs.76.2020.05.01.16.21.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2020 16:21:59 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Sat, 2 May 2020 02:21:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83sggjveto.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01.05.2020 18:45, Eli Zaretskii wrote: >> Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Fri, 1 May 2020 18:27:45 +0300 >> >> On 01.05.202 [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: runbox.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.52 listed in wl.mailspike.net] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 01.05.2020 18:45, Eli Zaretskii wrote: >> Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Fri, 1 May 2020 18:27:45 +0300 >> >> On 01.05.2020 09:57, Eli Zaretskii wrote: >>> I see no reference to either case-fold-search or >>> case-fold in isearch-no-upper-case-p. So why would we need to update >>> its doc string? >> >> Sorry if that was unclear: I think we'd need to update the docstring of >> fileloop-initialize-replace. Which doesn't offer any hints that the >> logic of isearch-no-upper-case-p will be employed. > > Ah, okay. Agreed. Should I leave that to you? At least the "updated docstring" part. >>> Does that really work in the case in point? Unless I'm missing >>> something, if case-fold-search is t by default, this patch would cause >>> the search to be case-insensitive even if the FROM regexp includes >>> upper-case characters. But in that case, perform-replace will >>> internally decide to be case-sensitive, and we have the same failure >>> on our hands. This is why the patch I proposed explicitly examined >>> the FROM regexp for upper-case characters. Whereas yours doesn't. >> >> Since we bind search-upper-case to nil in this patch, perform-replace >> won't try to alter the value of case-fold-search internally. > > But that's contrary to how query-replace works, isn't it? I suppose. But query-replace documents that aspects of its behavior: Matching is independent of case if `case-fold-search' is non-nil and FROM-STRING has no uppercase letters. Though it doesn't mention the search-upper-case variable. From debbugs-submit-bounces@debbugs.gnu.org Sat May 02 02:45:07 2020 Received: (at 40940) by debbugs.gnu.org; 2 May 2020 06:45:07 +0000 Received: from localhost ([127.0.0.1]:51119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUltN-0007Eg-Pr for submit@debbugs.gnu.org; Sat, 02 May 2020 02:45:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUltG-0007EK-P6 for 40940@debbugs.gnu.org; Sat, 02 May 2020 02:44:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51301) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUltB-0002mQ-4D; Sat, 02 May 2020 02:44:41 -0400 Received: from [176.228.60.248] (port=4393 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUltA-0004ls-8G; Sat, 02 May 2020 02:44:40 -0400 Date: Sat, 02 May 2020 09:44:30 +0300 Message-Id: <835zdevnsh.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Sat, 2 May 2020 02:21:57 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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 (-) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Sat, 2 May 2020 02:21:57 +0300 > > >> Sorry if that was unclear: I think we'd need to update the docstring of > >> fileloop-initialize-replace. Which doesn't offer any hints that the > >> logic of isearch-no-upper-case-p will be employed. > > > > Ah, okay. Agreed. > > Should I leave that to you? At least the "updated docstring" part. I can update the doc string, yes. But I don't think it's a good idea to divide the coding part between us, though. So please show the code, and I will suggest the doc change. > >> Since we bind search-upper-case to nil in this patch, perform-replace > >> won't try to alter the value of case-fold-search internally. > > > > But that's contrary to how query-replace works, isn't it? > > I suppose. But query-replace documents that aspects of its behavior: > > Matching is independent of case if `case-fold-search' is non-nil and > FROM-STRING has no uppercase letters. Sure. Wouldn't users of project-query-replace-regexp expect the same? > Though it doesn't mention the search-upper-case variable. Ugh! That should be fixed, of course. From debbugs-submit-bounces@debbugs.gnu.org Sat May 02 03:56:57 2020 Received: (at 40940) by debbugs.gnu.org; 2 May 2020 07:56:57 +0000 Received: from localhost ([127.0.0.1]:51147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUn17-0000eG-56 for submit@debbugs.gnu.org; Sat, 02 May 2020 03:56:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUn15-0000e2-Dw for 40940@debbugs.gnu.org; Sat, 02 May 2020 03:56:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52616) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUn0z-0005Y1-P3; Sat, 02 May 2020 03:56:49 -0400 Received: from [176.228.60.248] (port=4848 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUn0y-0000dr-EH; Sat, 02 May 2020 03:56:49 -0400 Date: Sat, 02 May 2020 10:56:38 +0300 Message-Id: <83v9leu5vt.fsf@gnu.org> From: Eli Zaretskii To: dgutov@yandex.ru In-Reply-To: <835zdevnsh.fsf@gnu.org> (message from Eli Zaretskii on Sat, 02 May 2020 09:44:30 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> <835zdevnsh.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Date: Sat, 02 May 2020 09:44:30 +0300 > From: Eli Zaretskii > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > > > Though it doesn't mention the search-upper-case variable. > > Ugh! That should be fixed, of course. Now done on the emacs-27 branch. From debbugs-submit-bounces@debbugs.gnu.org Sat May 02 21:43:36 2020 Received: (at 40940) by debbugs.gnu.org; 3 May 2020 01:43:36 +0000 Received: from localhost ([127.0.0.1]:54379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jV3fM-0003VY-D3 for submit@debbugs.gnu.org; Sat, 02 May 2020 21:43:36 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:36484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jV3fK-0003VJ-8a for 40940@debbugs.gnu.org; Sat, 02 May 2020 21:43:35 -0400 Received: by mail-wr1-f45.google.com with SMTP id d15so16659200wrx.3 for <40940@debbugs.gnu.org>; Sat, 02 May 2020 18:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NTC7r2Jy9RWM+Y81pVPJVhRAxDMDnB/RQwMbJVVUwFE=; b=vWzFoKgLF/nVs4/fFmZHLRGEn+2TIw0hEXc60g6CASw2UKvtA3DNrIZbeIdSfnu8El IpPyjO/t/jh+e09/SOvYlqwWuwuCj3y8EFVLUiwCIeuIh0UO2h1tMpehhz3w5SDw1pz2 LVQWd51JigEtfNPSd6fTMsYi8mGgKGdBNQJpcMikn1AHgz7mQw4bhNWZ8iGkHAVUsiBa SfX4GjimI0aXAM73CPF+58POjCGUdJCimIzPaCRtN02WNUjFF31+zPkIbY8GD066d+d1 t8ihqe0iWW05TKHGlAkhK3E8P9ubPRW8ag2RDgn3n4ZxqiLjHs4n6BBJlGCJMlQfsyqc 9xcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NTC7r2Jy9RWM+Y81pVPJVhRAxDMDnB/RQwMbJVVUwFE=; b=VTVtPe1Z+u2E5UbtXyhyI+jDu/PRQ4vTPSSKA518gnKH9BRLuBnGFUsuliKRJWogZf e8AzY20BN8lBej/0At4hAeW86eMOkQcQH0JwBjtRSakfs1R10s/jkdlFEIPq3XPTdk12 P0GbSCVUy7VKJVfjflkHgKoBwybhg2qpCrO2UuJ/tZR2TOiJ2mvU5EKg6w0styaBBJSl sFxcdj6hIjRiZmnL8p2h7Kp8Y0dpGLpkteIhzN+qMidfsZgDkX/M3s1CFT1Sem8e9Zg6 x+IKO2M+dUVFvUxZ9vn8pqPhBf9Fe4wx9FSB6of5Q36u/FmU5h4zOiGD94aV1HlpAAvB oqGA== X-Gm-Message-State: AGi0PuaCfpz//jKjTufJ5s8Om60pq1qzUUWGMGUVMvENlH3CT//l34jO I5XeRjihhYo5u4qyKEnau/Cs/fGhTVo= X-Google-Smtp-Source: APiQypJpeCE+3xZ560DRQNZRmgyO/kkzGQ2aBQI3Bg3pjOx583ZFi+sa3T0nDxy4kdVCepTJRD0Z7w== X-Received: by 2002:a5d:42cf:: with SMTP id t15mr11506220wrr.354.1588470208143; Sat, 02 May 2020 18:43:28 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id d13sm6530047wmb.39.2020.05.02.18.43.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 May 2020 18:43:27 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> <835zdevnsh.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Sun, 3 May 2020 04:43:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <835zdevnsh.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 02.05.2020 09:44, Eli Zaretskii wrote: > I can update the doc string, yes. But I don't think it's a good idea > to divide the coding part between us, though. So please show the > code, and I will suggest the doc change. Here's the comprehensive fix I'd like to see: diff --git a/lisp/fileloop.el b/lisp/fileloop.el index 543963feaf..69825fdcae 100644 --- a/lisp/fileloop.el +++ b/lisp/fileloop.el @@ -181,8 +181,7 @@ fileloop-initialize-search (fileloop-initialize files (lambda () - (let ((case-fold-search - (if (memq case-fold '(t nil)) case-fold case-fold-search))) + (let ((case-fold-search (fileloop--case-fold regexp case-fold))) (re-search-forward regexp nil t))) (lambda () (unless (eq last-buffer (current-buffer)) @@ -190,6 +189,15 @@ fileloop-initialize-search (message "Scanning file %s...found" buffer-file-name)) nil)))) +(defun fileloop--case-fold (regexp case-fold) + (let ((value + (if (memql case-fold '(nil t)) + case-fold + case-fold-search))) + (if (and value search-upper-case) + (isearch-no-upper-case-p regexp t) + value))) + ;;;###autoload (defun fileloop-initialize-replace (from to files case-fold &optional delimited) "Initialize a new round of query&replace on several files. @@ -203,15 +211,15 @@ fileloop-initialize-replace (fileloop-initialize files (lambda () - (let ((case-fold-search - (if (memql case-fold '(nil t)) case-fold case-fold-search))) + (let ((case-fold-search (fileloop--case-fold from case-fold))) (if (re-search-forward from nil t) ;; When we find a match, move back ;; to the beginning of it so perform-replace ;; will see it. (goto-char (match-beginning 0))))) (lambda () - (perform-replace from to t t delimited nil multi-query-replace-map)))) + (let ((case-fold-search (fileloop--case-fold from case-fold))) + (perform-replace from to t t delimited nil multi-query-replace-map))))) (provide 'fileloop) ;;; fileloop.el ends here From debbugs-submit-bounces@debbugs.gnu.org Sun May 03 04:18:20 2020 Received: (at 40940) by debbugs.gnu.org; 3 May 2020 08:18:20 +0000 Received: from localhost ([127.0.0.1]:54606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jV9pL-0004o1-H5 for submit@debbugs.gnu.org; Sun, 03 May 2020 04:18:20 -0400 Received: from aibo.runbox.com ([91.220.196.211]:47662) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jV8Wg-0002kG-SL for 40940@debbugs.gnu.org; Sun, 03 May 2020 02:55:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=BSa2l8WVl/CZ02kai7hetCeAlBpoNSKSvMod1LP0euI=; b=CRl9cRJUGHB9RsAd5I5gy2cFaO MAHhWrWXy9Jpm3CLQdObzyaJW4Ozl2qcNUo0nOHMqUP08k1gZxojoQmbTvpAG4MUIjvYgLez0N667 MF5+WQlY/7p3LL0nvdRCwPht/kM6G3IIdrMUvY4wYrs/v2U8adTDdRPLDXHPuKd1QIIsnGOJLbCVp oEDTU7rz/gUZotQt6wfTPkhieroD6QjrGk8XSuhhgwvGmPZiIXNwC+I6xGJVvGTArCN8vqxMRwF5+ 4V18P2i5RVgcO2jDHHXDQdFvtKszsYbmmizLZiHejNxc2E7i24Y6DToZoUad4cc+15lgfYbuIcnQG CW02iyXA==; Received: from [10.9.9.202] (helo=mailfront20.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1jV8Wc-0007v7-Up; Sun, 03 May 2020 08:54:55 +0200 Received: by mailfront20.runbox with esmtpsa [Authenticated alias (963757)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1jV8WT-0004pj-5o; Sun, 03 May 2020 08:54:45 +0200 From: =?utf-8?Q?Simen_Heggest=C3=B8yl?= To: Dmitry Gutov Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> <835zdevnsh.fsf@gnu.org> Date: Sun, 03 May 2020 08:54:44 +0200 In-Reply-To: (Dmitry Gutov's message of "Sun, 3 May 2020 04:43:26 +0300") Message-ID: <87sggho6dn.fsf@simenheg@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 40940 X-Mailman-Approved-At: Sun, 03 May 2020 04:18:18 -0400 Cc: Eli Zaretskii , monnier@IRO.UMontreal.CA, 40940@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 (/) Dmitry Gutov writes: > Here's the comprehensive fix I'd like to see: This works as expected in my testing. > + (if (memql case-fold '(nil t)) AKA (booleanp case-fold) if you'd like. From debbugs-submit-bounces@debbugs.gnu.org Sun May 03 13:11:02 2020 Received: (at 40940) by debbugs.gnu.org; 3 May 2020 17:11:02 +0000 Received: from localhost ([127.0.0.1]:57810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVI8r-0002IY-P9 for submit@debbugs.gnu.org; Sun, 03 May 2020 13:11:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVI8q-0002ID-G8 for 40940@debbugs.gnu.org; Sun, 03 May 2020 13:11:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56414) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVI8j-0001mb-94; Sun, 03 May 2020 13:10:54 -0400 Received: from [176.228.60.248] (port=2888 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jVI8b-0007Qf-DU; Sun, 03 May 2020 13:10:51 -0400 Date: Sun, 03 May 2020 20:10:38 +0300 Message-Id: <83bln5osfl.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: (message from Dmitry Gutov on Sun, 3 May 2020 04:43:26 +0300) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> <835zdevnsh.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.3 (---) > Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 3 May 2020 04:43:26 +0300 > > +(defun fileloop--case-fold (regexp case-fold) > + (let ((value > + (if (memql case-fold '(nil t)) > + case-fold > + case-fold-search))) > + (if (and value search-upper-case) > + (isearch-no-upper-case-p regexp t) > + value))) LGTM, thanks. But don't you need to require isearch to get isearch-no-upper-case-p? or to autoload it? Here's the doc string I promised: (defun fileloop-initialize-replace (from to files case-fold &optional delimited) "Initialize a new round of query&replace on several files. FROM is a regexp and TO is the replacement to use. FILES describes the files, as in `fileloop-initialize'. CASE-FOLD can be t, nil, or `default': if it is nil, matching of FROM is case-sensitive. if it is t, matching of FROM is case-insensitive, except when `search-upper-case' is non-nil and FROM includes upper-case letters. if it is `default', the function uses the value of `case-fold-search' instead. DELIMITED if non-nil means replace only word-delimited matches." From debbugs-submit-bounces@debbugs.gnu.org Sun May 03 13:28:43 2020 Received: (at 40940) by debbugs.gnu.org; 3 May 2020 17:28:43 +0000 Received: from localhost ([127.0.0.1]:57962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVIPo-0002oZ-8j for submit@debbugs.gnu.org; Sun, 03 May 2020 13:28:43 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:37458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVIPn-0002oL-Gu for 40940@debbugs.gnu.org; Sun, 03 May 2020 13:28:31 -0400 Received: by mail-wr1-f52.google.com with SMTP id k1so18129781wrx.4 for <40940@debbugs.gnu.org>; Sun, 03 May 2020 10:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+w9tDBSSXMTRMhnHxA63RTtGMEy5XiwMwIBHfOMGEgQ=; b=VmPIkBWXFzKBMJnIcEfCXJFRmCKO0PMI2Ihyxz3a4DmwsMLA+OTOijTdJ7XN2xpewH PtnGB38WC040LBMJHu3CGPH60wNLPlZX46cDOPuUz/Rb8iUMLmZAOfVZOVrBb/jztvTw XDTzm0z5s4flFSJvxdjYaiz7n4NZHKce96EdtUIoP6GhYlvLInJsgqFcVte8x6kjvSzO Klq1Y1Pl9QGqSbFzYxIeyH847do2fOiPh8ZK3qnUXXaLZlFjbG4RqVL9rg2MzjK4OyU6 ZdVUi87zsLTKqzDNRln50ggFx+tyoSnqs/J6MW5P86gqs3pO32ySaQI+2EYHsAs+VrWJ iSmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+w9tDBSSXMTRMhnHxA63RTtGMEy5XiwMwIBHfOMGEgQ=; b=PDqwvNcxPH9aNaCefmqxzB+ae7LQGG9PZdw8nmuBpoB+xp5WgstMcHlA2PGFnoHRot jqEw0eg9H72CJkQplWfKlQlJD0ZuuGDQt+Hh/1V45gxvbF/MhixZ/yCDd/8OogrOstTt khwn7In8CexeBMet1olo8ZmEmUdemO9Xe2wIul89PB1N5Dt8fVSNuImoAq3zXAxBkMPj Tn0zu8fXgW1iark6YaWUeWpB9WZaenDnJxxpqzP+my5Hn32lnzazuZgRjuoUR/JcCKEs O0aWSqRvjim/gJuKNKiDpIj6tv4IiJKjFSZdWPby1VElDC/gX7qyQ6NfNqpWm2+gaZvI RvXA== X-Gm-Message-State: AGi0PuYqYAKo+7nMEaYrm26bMPVA0D6+LyCAQv6I3j2nwwyfK9BiTT2u 8KBLdW7XJLGX/Ce3C0Xy+d1znj31 X-Google-Smtp-Source: APiQypKeg/201fUFeXObjSBoo5St3r6LasSB3BdzFidp3A/wJhr9C3OxmbU31sBqEqE+F8rTnf1L2Q== X-Received: by 2002:adf:e986:: with SMTP id h6mr14656133wrm.256.1588526905369; Sun, 03 May 2020 10:28:25 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id y31sm7463178wrd.83.2020.05.03.10.28.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 May 2020 10:28:24 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> <835zdevnsh.fsf@gnu.org> <83bln5osfl.fsf@gnu.org> From: Dmitry Gutov Message-ID: Date: Sun, 3 May 2020 20:28:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <83bln5osfl.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940 Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940@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.5 (/) On 03.05.2020 20:10, Eli Zaretskii wrote: > LGTM, thanks. But don't you need to require isearch to get > isearch-no-upper-case-p? or to autoload it? isearch is in loadup.el, isn't it? > Here's the doc string I promised: Looks good, thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun May 03 19:58:23 2020 Received: (at 40940-done) by debbugs.gnu.org; 3 May 2020 23:58:23 +0000 Received: from localhost ([127.0.0.1]:58496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVOV5-0001wZ-3d for submit@debbugs.gnu.org; Sun, 03 May 2020 19:58:23 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:39007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVOV3-0001wK-AO for 40940-done@debbugs.gnu.org; Sun, 03 May 2020 19:58:21 -0400 Received: by mail-wr1-f44.google.com with SMTP id l18so8098208wrn.6 for <40940-done@debbugs.gnu.org>; Sun, 03 May 2020 16:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=85OmrxaqLjig+4mqY7BVH9cG7GoNzJnHuw7AWF2hxhw=; b=ApQehFU5PU/CHr/TJ6wAeewAV4tf0xqfGLlIQDyqVfABifSegZ328ca5Ks65BSiGsW v3bZb4GvWH/gcyiFpTLaSSJcK6k07Z5EZ1Ifz4arIyb7JWLUiDSbZp1N4Tm8o05V0OoG iROMx3kWdvtZg8fXBF9+Gm0sUV06Mcc2k8ZstNGPcGmxVBQbRQ+ynTbZ9tRngHtqMcPz cw4r0j8wJqpPLUzrkVVFScaEVxjM1DnIREStVyyRR6Cw2nDs/vmB0sTum+rSIBC2GpFV S5VuLgHSnbOwL9osdpVxNuzMZB4n+5jIk/cj4KBkaL2HfLkmR21pCWaNu5U2A6zfv6xK WimA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=85OmrxaqLjig+4mqY7BVH9cG7GoNzJnHuw7AWF2hxhw=; b=e9HQjgsn3zZW1ybjg6zOAKkrt0eOtCKMP4Bnb+iF/uhKbd/piI5Fr2/09EXC1QI3BS GW4jK4fsyoiY3sYyOWEpRGlQtYMddBJs2Pd0Yg08WkMzAHRDkm98T8Y1QYMprHaiXYtN 7USpRRz/t8Mo4Km7pypOvamEAzuIs/XdDenykAE1VaQ+mABHn2NBlpSq+VWYtZtFsXVg tsFeIppnd85+H6/ccaJ3UOKnQ88PjUvaVX1uvlUXlPHZS8W6c+y2WnlbzquZi5BhimA7 xQnIdXXXtSNbdrVFG5e5A6oC2JQ9Tpda7oAdCB0TH/64y3oft/TjLWrm4lHuHw10CTqs +5aQ== X-Gm-Message-State: AGi0PuaAXkcLGZdCE3OOgWLTDxeskwSYGSPobHoCFGrGCmMWp6P1INMr 6O7hKtP84uOZypylMubLiU9uAWAo X-Google-Smtp-Source: APiQypLxG/RuwSQmnz4pXAPtls80TrTluyCUTlRPFbwD5VWADvDTl9v1u9ZUSsfa/obISUgsYzLtag== X-Received: by 2002:adf:f441:: with SMTP id f1mr17233351wrp.247.1588550295238; Sun, 03 May 2020 16:58:15 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id r3sm17331533wrx.72.2020.05.03.16.58.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 May 2020 16:58:14 -0700 (PDT) Subject: Re: bug#40940: 27.0.91; project-query-replace-regexp stops too early From: Dmitry Gutov To: Eli Zaretskii References: <871ro7ptk0.fsf@runbox.com> <9ba1394f-5a29-8e8d-93cf-9b794b8ebb98@yandex.ru> <83d07q217v.fsf@gnu.org> <87ftcmhezl.fsf@runbox.com> <831ro61yce.fsf@gnu.org> <83zhauzlt7.fsf@gnu.org> <83mu6uzi8h.fsf@gnu.org> <32c0b31e-9165-faff-c9a0-9103d937898b@yandex.ru> <835zdgw3aj.fsf@gnu.org> <83sggjveto.fsf@gnu.org> <835zdevnsh.fsf@gnu.org> <83bln5osfl.fsf@gnu.org> Message-ID: Date: Mon, 4 May 2020 02:58:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 40940-done Cc: simenheg@runbox.com, monnier@IRO.UMontreal.CA, 40940-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: -0.5 (/) On 03.05.2020 20:28, Dmitry Gutov wrote: > > Here's the doc string I promised: > > Looks good, thanks. Patch installed, thanks to all. From unknown Sat Sep 20 13:35:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 01 Jun 2020 11:24:06 +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