From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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 01:43:20 +0200 Message-ID: References: <87y1psw747.fsf@masteringemacs.org> <878rhrvzof.fsf@masteringemacs.org> <87bkmmbb05.fsf@masteringemacs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34838"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 61038@debbugs.gnu.org To: Mickey Petersen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 26 00:44:20 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 1pKpRE-0008ub-0P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Jan 2023 00:44:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKpQy-0005Sw-Cn; Wed, 25 Jan 2023 18:44:04 -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 1pKpQw-0005ME-RV for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 18:44: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 1pKpQw-0005z9-Av for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 18:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKpQv-0001Mm-QP for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2023 18:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2023 23:44: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.16746902175214 (code B ref 61038); Wed, 25 Jan 2023 23:44:01 +0000 Original-Received: (at 61038) by debbugs.gnu.org; 25 Jan 2023 23:43:37 +0000 Original-Received: from localhost ([127.0.0.1]:60211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKpQW-0001M1-PP for submit@debbugs.gnu.org; Wed, 25 Jan 2023 18:43:37 -0500 Original-Received: from mail-ed1-f47.google.com ([209.85.208.47]:37410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKpQQ-0001Lk-KI for 61038@debbugs.gnu.org; Wed, 25 Jan 2023 18:43:35 -0500 Original-Received: by mail-ed1-f47.google.com with SMTP id s3so437833edd.4 for <61038@debbugs.gnu.org>; Wed, 25 Jan 2023 15:43:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=xJtMM//LGj5RtNADsSlZOFK4eu4vo1HHujO2bu7fNMs=; b=nOeRApgYwMld6X5uQ5Fe01C4tWAmtsl6YHyB+0rbZm2vlJqt81t86xLEDB+mCYjLrM OifMZ5RiXyPiY+0MN/JGqoyzKHosVeo+IyaDPvhzJppyngouFmOhPbFpcrSgF1azuckF YqRQw31RgyRXs5kTDBCT1aqd8cZ0MFCpMQz1MF9U4UytTY7nnBE3PeZKm0SX6zdGyQRU g7wFJNoMcKHvfTLX7szFJC1U2TSLwgX0aNMQYuzYrLcyxGOVPO6metkW1LcB6ij8xc49 ME00sHm+zifD2gTiEuAi2KlgWXgwC7ArReZaqrLzW9NmE33gnX95dhapzpJoZOuw83xe GbXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xJtMM//LGj5RtNADsSlZOFK4eu4vo1HHujO2bu7fNMs=; b=Rh//9DW2vjySkck9SvgGctFxtJmFtpIeVxNTWMtsazMX0kULZOzo+ldZBGbvl3s5xW 8azFOV/BM2qYWeHElEjyNoMLrECjb2DVwc5CgYKzUuznXAKLhNdZLLXlwqcicyP5MAD9 caBWh0DS5xmEDDoAiWTxdKCGQebhPDF6qxsVNY22BUEGO9uTsNUNyes//MRxa21OSedS ixEsokIkUkHZhT0ZtFBitl4oBm7OoULd5+7p675AKaHWM6umgKWHM6+zFRNdJCJTaIzG UWd4+IS14xcAKUdXZAN0UcefJfj/kgB9sG5DaxfxXIMu8WH2qS7gFFUYWk95aCtyJ9BJ qakg== X-Gm-Message-State: AFqh2kpCzpKXdvGmB+xybZe4pi6YITed1annoGmohbo95+suQPv/zVRo ptzx+SE47H+xXmpalBsRGCo= X-Google-Smtp-Source: AMrXdXsvMELlBxzBUyT/y0VB2DRIqJ5J0fgtWb67YVmp88BMxj7Hv9AlrHhkk42iMccKz6bvPTs7MQ== X-Received: by 2002:a05:6402:4507:b0:499:9d31:8490 with SMTP id ez7-20020a056402450700b004999d318490mr37881424edb.24.1674690203664; Wed, 25 Jan 2023 15:43:23 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m6-20020aa7d346000000b0049c6c7670easm2956643edr.70.2023.01.25.15.43.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 15:43:23 -0800 (PST) Content-Language: en-US In-Reply-To: <87bkmmbb05.fsf@masteringemacs.org> 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:254161 Archived-At: 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 ...'. > 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. > 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.