From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mickey Petersen Newsgroups: gmane.emacs.bugs Subject: bug#61038: 30.0.50; `project-query-replace-regexp' also attempts search and replace in auto-save files Date: Thu, 26 Jan 2023 09:13:31 +0000 Organization: Mastering Emacs Message-ID: <877cx9bqd8.fsf@masteringemacs.org> References: <87y1psw747.fsf@masteringemacs.org> <878rhrvzof.fsf@masteringemacs.org> <87bkmmbb05.fsf@masteringemacs.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35130"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e @VERSION@; emacs 30.0.50 Cc: 61038@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 26 10:25:25 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKyVY-0008yl-PT for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 10:25:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKyVF-0002uN-L7; Thu, 26 Jan 2023 04:25:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKyVC-0002u5-MT for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 04:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKyVC-0003Pe-7G for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 04:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKyVB-0008RB-VK for bug-gnu-emacs@gnu.org; Thu, 26 Jan 2023 04:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mickey Petersen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2023 09:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61038 X-GNU-PR-Package: emacs Original-Received: via spool by 61038-submit@debbugs.gnu.org id=B61038.167472508432404 (code B ref 61038); Thu, 26 Jan 2023 09:25:01 +0000 Original-Received: (at 61038) by debbugs.gnu.org; 26 Jan 2023 09:24:44 +0000 Original-Received: from localhost ([127.0.0.1]:60715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKyUt-0008QZ-LN for submit@debbugs.gnu.org; Thu, 26 Jan 2023 04:24:44 -0500 Original-Received: from mail-he1eur01on2092.outbound.protection.outlook.com ([40.107.13.92]:31109 helo=EUR01-HE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKyUo-0008QE-Fz for 61038@debbugs.gnu.org; Thu, 26 Jan 2023 04:24:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NUBHNXC5b8xNNQuGc/DfVyOxu5kTHaCjcOZAcULYGv262toTW67oUgtjfkjEMcZO4YEf0eOOLS2OD6tsxkb6uYt30XGqfB6ENhKVMUSmNgNJqmeSfnbwxWIqQ1uSJjNs7vVNOWCkabcRJmU+4H0myWw4233l7vghbVm6CwykmY/ly58oA3bGVBCrbaxRATI1B4VRieQsqjznOlu0kjgvyVRMbIQQFvqUCncvr8IuEdyzJ8HyLRsd9ZDZZiyduNyePpu4o/EZwgZ0o673nRaly49VE/RXdczL4OLR/haMjUnLOwEZIw0U8QZD6CnIbnkdd0jmRcO7Kl7B8hKiq/fPdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M4RgRX112AzCKBxO8xCQsnj2h1r4ogF8RVrgOu2ENoQ=; b=Pz2C5iN9ROP6LB49eWCxSCMtjKOHVLgGpT0HBXXI4OoCqj5CXIeq316/lXKE59LQYiRLqkJzh9WP/zUNcpEUC3NBfnyboULdAnuJaml+idRSZ8qBIUDCNSFZPg7fJku0ebbDyv7JgrQQ+UfzulOosCOCj5spR4dJ/ZKoNqxL6MFXLMZpaJp3+XTbwZ3ImZFgUybM2HR44wm6HrbUJIiaT25tFsyX9reP5NIEjiheysBJ0sEEoxTdlrDfKkPAeexa0G1sbMI+thGla63NfsM36xQDSQFeeET+XsZT/E+ks2BZJBcRyNopH7kPjhn1WlPRqFpV7NJw4OGdIkECtGzvXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 178.79.136.144) smtp.rcpttodomain=debbugs.gnu.org smtp.mailfrom=masteringemacs.org; dmarc=pass (p=none sp=none pct=100) action=none header.from=masteringemacs.org; dkim=pass (signature was verified) header.d=masteringemacs.org; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semantical.onmicrosoft.com; s=selector1-semantical-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M4RgRX112AzCKBxO8xCQsnj2h1r4ogF8RVrgOu2ENoQ=; b=kAD6CTcGjHizsoF+XvZ9GogWb1sjjd63LDgM2I22yRZXw/bon+hlt5vL8Hq32O1iNOL9wdzM2GTRFM11Wd0eoWlPQ7TmAyQ+w0uzxCUdfbNoHeGax4L2azZuEyS4xllKrK4X/ZJNZfw0bDvGArpuC07eEJJgkkIqL9HMjnYnDnk= Original-Received: from LO2P265CA0298.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::22) by LO0P265MB7238.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:335::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22; Thu, 26 Jan 2023 09:24:22 +0000 Original-Received: from LO2GBR01FT029.eop-gbr01.prod.protection.outlook.com (2603:10a6:600:a5:cafe::39) by LO2P265CA0298.outlook.office365.com (2603:10a6:600:a5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.22 via Frontend Transport; Thu, 26 Jan 2023 09:24:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 178.79.136.144) smtp.mailfrom=masteringemacs.org; dkim=pass (signature was verified) header.d=masteringemacs.org;dmarc=pass action=none header.from=masteringemacs.org; Received-SPF: Pass (protection.outlook.com: domain of masteringemacs.org designates 178.79.136.144 as permitted sender) receiver=protection.outlook.com; client-ip=178.79.136.144; helo=semantical.co.uk; pr=C Original-Received: from semantical.co.uk (178.79.136.144) by LO2GBR01FT029.mail.protection.outlook.com (10.152.42.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.20 via Frontend Transport; Thu, 26 Jan 2023 09:24:21 +0000 Original-Received: by semantical.co.uk (Postfix, from userid 5001) id 76B7C114002; Thu, 26 Jan 2023 09:24:21 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=masteringemacs.org; s=masteringemacs.org; t=1674725061; bh=uG5JYTPf0DKfSBuW+ymrV7WzI4FujWTEZIBVXeSEX8U=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=eBm7cVQEQmHgUzAuSSuQPc+u4Zy1XO02u3iNiqrbcVNImaHnYpZdR6Kt6HQ7v4HQZ VWh/3pAlXxHrk1jf2NCLxFrxTjNouWPap4YGFyh057j1FJJeVM8Rty51jSvS+QLlt+ LgZW17SmZ5Mq5/t37tHCd7UV+HVlijHUPW9lJha8= In-reply-to: X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LO2GBR01FT029:EE_|LO0P265MB7238:EE_ X-MS-Office365-Filtering-Correlation-Id: 40353460-cc56-49e5-622e-08daff7f1bc3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O2FnaqCT7wZ/Cu1CdrInctTgQCDlZl5znv5vSlAYXiTMUqiI07rGQoGucHvsEVpaOmYMMMlc+sWauW21fSp7rZsNx6EXCzfmbytKCT2ycLSpnzXyOQui6VBVJZeks58jB5ge2nu0YT+8ayBPeIXm0ZzB8CyLswjtB48TxemFCPNoetw0ddDSQPU7kE2SwUinezrRV+RcDEOo/rSi3nduzDw6DEhgxCViU1ndCzntBPqo5isCgd+VKLXAlJtcywKw7pgoz+/H3yb5Cxvrxxd+0GjxKY0gVN3deQv7oaShAHIAToeYKzz6oBBWIOqUfbegLrYzRUVYnJ2KpJGGVzEESZpES4TO2DTI4qa76ynvh9VLEqUrX/l+w2sTJ19oQwSzeliWIFmeQPUlr0CCTZH1BGxCsMERGjazeacbLxc0hsRMEv7FkJuHuqT/v+QBOZUfizGufFk3HjHZOAYI0C8C7AxwfrzmcCY1E7zIDQODADS1JwgFyFKhjSBTQ4oztweyeRLhnm8T35Oq+44Q6vQ24R8scoYeGuiUZAjVLmiaoUadnsP0C9eOyDRU+Amsg4p/VTjKz7dDaP0lLxpYA/xrklTzVd1d7P15rb1ImMSjlGZZn1GRGWuBL8VDBW9muBOHRH6jbMyvzsaLa3dY2c8kD90yXymObx5X43v0piu86AwP65emdv7RSjC1GsnTX2SPu7cMpehFBvLmCmVRgy/pfCssrDkk81PwuRbffvVkpvm9NEPO0gmKpXuUDilLo +GU6vEiKy5x1XOvBHlTe6weOj+zaDBNOw3U3fELHkultO/cspZONsLfrHyMJ1PDbt3T X-Forefront-Antispam-Report: CIP:178.79.136.144; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:semantical.co.uk; PTR:semantical.co.uk; CAT:NONE; SFS:(13230025)(376002)(396003)(346002)(39830400003)(136003)(451199018)(46966006)(36840700001)(36756003)(36916002)(8676002)(316002)(478600001)(42186006)(6666004)(53546011)(5660300002)(2906002)(4326008)(70586007)(70206006)(6862004)(8936002)(41300700001)(7636003)(7596003)(36860700001)(356005)(86362001)(40480700001)(336012)(82310400005)(83380400001)(2616005)(186003)(26005)(6266002)(47076005)(38230200001)(81973001)(23180200003)(14776008)(79816003); DIR:OUT; SFP:1102; X-OriginatorOrg: masteringemacs.org X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2023 09:24:21.7752 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 40353460-cc56-49e5-622e-08daff7f1bc3 X-MS-Exchange-CrossTenant-Id: a4e27e3d-bab0-45e8-8942-e64cf9fbd34f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a4e27e3d-bab0-45e8-8942-e64cf9fbd34f; Ip=[178.79.136.144]; Helo=[semantical.co.uk] X-MS-Exchange-CrossTenant-AuthSource: LO2GBR01FT029.eop-gbr01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB7238 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254198 Archived-At: Dmitry Gutov writes: > On 25/01/2023 22:34, Mickey Petersen wrote: > >> (Actually this issue also afflicts auto-save files in my Emacs.) >> And the files in question are not committed to the index, nor are >> they >> part of the git tree. So they're just stray files that happen to be >> important (backup, auto save) to Emacs. >> It seems odd that you'd want to search and replace those by default, >> particularly when Emacs is well aware of the fact that they are indeed >> backups or auto saves of other files used by that instance of Emacs. > > I'm asking why they are not in your .gitignore already. They must get > in the way of operations such as 'git status', or 'git add *', or 'git > commit -a', or just in the way of shell completion for 'git add ...'. > Let's assume I'm simplifying a more complex workflow to aid with the bug report. >> And yes indeed: why not make the project replace mechanism ignore dumb >> things no one wants to edit. > > The "project replace mechanism" uses the same set of files that you > get in completion for project-find-file. Or search through with > 'project-find-regex'. > > So far the semantics of the vc-aware backend has been that all files > that Git doesn't consider ignored (tracked or untracked) are > considered to be part of the project. > >> And committing large, binary files to a tree is common in a wide range >> of situations, though less so in Git, as it's terrible at it. > > That's why people usually put the binary files, backup files, etc, in > .gitignore. > There are many legitimate reasons for having binary files -- large ones too -- in a repository. Though it's uncommon with git, as it does a poor job handling them. There are also legitimate reasons for not having expansive ignore files, particularly with version control systems that lack the granularity of Git and its ilk. Nevertheless, knowing that untracked are also considered part of the project, I can now set `project-vc-include-untracked' to nil to at least resolve this. It would seem I was not the only one who chafed at this edge case. >> So, yes, `grep-find-ignored-files' (or a project.el equivalent) should >> indeed exist. > > grep-find-ignored-files is a real user option already. You can also > use project-vc-ignores, but it's nil by default. > > A couple of reasons not to use grep-find-ignored-files patterns by default: > > - Some users might be actually looking for one of those files, and > would get surprised that while the Git repository lists them fine > (perhaps they even checked in such file; maybe they're using unusual > file naming schemes), but our project backend does not. > > - Every addition to the ignored patterns is a minor but steady > performance hit. grep-find-ignored-files has 61 element by > default. Dropping all of those into project--vc-list-files can > create a performance hit of an order of a magnitude. E.g. in my > testing the time to list the files in gecko-dev went up from 1s to > about 5s. Sure. But `git-grep(1)' will ignore binary files by default, for example.