Received: (at 77566) by debbugs.gnu.org; 27 Jun 2025 06:50:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 27 02:50:24 2025 Received: from localhost ([127.0.0.1]:59661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uV2ul-0001eH-Gm for submit <at> debbugs.gnu.org; Fri, 27 Jun 2025 02:50:24 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:34061) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uV2ui-0001Xw-Io for 77566 <at> debbugs.gnu.org; Fri, 27 Jun 2025 02:50:21 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 34F6D4445A; Fri, 27 Jun 2025 06:50:11 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87y0tem3gg.fsf@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> <87jz4z5a0v.fsf@HIDDEN> <8f145386-fc0a-411c-9a52-d910e8c42aef@HIDDEN> <87y0tem3gg.fsf@HIDDEN> Date: Fri, 27 Jun 2025 09:45:16 +0300 Message-ID: <871pr53ejn.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddvfeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutddtrdejjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeluddruddvledruddttddrjeejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohepgedprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepughmihhtrhihsehguhhtohhvrdguvghvpdhrtghpthhtohepvghgieegvdeiudeisehgmhgrihhlrdgtohhm X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >>> I noticed this gotcha while reviewing the patch. Maybe a cleaner way >>> would be to use a special value e.g. 'none' instead of nil. And also add >>> an argument 'interactive' to 'project-forget-zombie-projects'. So could >>> check explicitly that in case if 'interactive' is non-nil and the value >>> is 'none' then still use 'file-exists-p'. >> >> 'none' and nil seem equivalent in the description. Unless one really >> wants to disable the remoteness check, but only in one of the >> scenarios? >> >> But if I were to decide which of the code paths would skip the >> file-remote-p check, it would probably be the interactive >> 'project-forget-zombie-projects' invocation, rather than the general >> scenario. Or maybe that would only happen with the prefix argument, >> something like that. > > I don't quite understand this conversation, the idea is add a prefix > argument to `project-forget-zombie-projects` for do not delete remote > projects or modify `project-prune-zombie-projects` behavior? To understand what customization we should provide, let's consider the most likely use cases: 1. pruning the project on the first reading of the list. For example, recentf-auto-cleanup does this on enabling its mode with ignoring remote non-connected files. 2. before every prompting. For users who don't delete project directories very often, it would be still too costly to call file-exists-p on a large list of projects before every switching between projects. To avoid adding another option to distinguish between these two cases, we could supply a new argument to the predicate with possible values: a. 'list-read' b. 'list-write' c. 'prompt' Then to e.g. apply the predicate only in case of reading/writing the list: (defun project-prune-zombies-default (project when) (and (memq when '(list-read list-write)) (not (file-remote-p project)))) 3. explicit execution of 'M-x project-forget-zombie-projects RET'. We don't know to what custom function the users might prefer to customize 'project-prune-zombie-projects'. Maybe they want to use such a predicate to keep even some non-existent projects. Then 'project-forget-zombie-projects' should support two ways: one that ignores the predicate in 'project-prune-zombie-projects', and another e.g. with a prefix argument (via the new argument 'interactive') that respects it. Instead of the prefix argument, the predicate could be called with the argument 'when' set to the value 'interactive'. Then the predicate can decide what to do in this case.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 27 Jun 2025 00:34:08 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 26 20:34:08 2025 Received: from localhost ([127.0.0.1]:55217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uUx2d-0002DC-Eh for submit <at> debbugs.gnu.org; Thu, 26 Jun 2025 20:34:08 -0400 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:60676) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1uUx2Y-0002Bl-Si for 77566 <at> debbugs.gnu.org; Thu, 26 Jun 2025 20:34:04 -0400 Received: by mail-ot1-x344.google.com with SMTP id 46e09a7af769-73afbe149afso225289a34.1 for <77566 <at> debbugs.gnu.org>; Thu, 26 Jun 2025 17:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750984436; x=1751589236; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=vJWGUxHKFB438MUpzCgih2CQIb9FqdEZrerotrrsDRU=; b=Ou5ZSyQfAC1PZ5xwAqOsCJeb1r9nuOO6FdLa+/zBtKXF72a63IW8RzAgZDj8zAmJNb nr1iwjgsQD6QFhDGE1KZo3zo3GnwaLjV6fIr/5atqvLbj6QbkDQ+Gnyi1zBOP8Itacwn 4vhjGL0H2FjWtBGYfrFwekr+A/D4lWnyWd46iobIfj79x2XpM21K41eXxtAO09KCBjQx q75ICVrQ+yU4SDvySF469PUb9zEkDcnjPl8mV7X5veEISJXDw32uuAq6yI7poY7F0vv6 mqY66ccoJV59ebcuaC3v5g/w2Wykh8FuuOBAuWiTPzS+lbt0LTGt9uOOqRo1Xc8qXwsD kuiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750984436; x=1751589236; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vJWGUxHKFB438MUpzCgih2CQIb9FqdEZrerotrrsDRU=; b=TIOGi46h7NyHJIhTqf+eBTR4J6Rbm4ObV5f2FrNhHEicr95JqVE/TBEJLzFPJTGx6U EnMOsHjBdU16phVQ8HT/LEWKXF9YFRweN4DNbq56bOIExWBi74Ld0EHm27UjsOaHQrLq ibMAUe8V0mi08J3pV9fxt8X48YXqGLoD9Y9Za+UDOwe+uVmVzaBBukimfl6FSJg2oI+f Cen3tBlwq/oimsfbSrdvw5LkrnIqC6incJhDimVJQaTZtvkTQs30bnRRjjcudjZD55W1 Zm3hTyMvCQeWXsJj+VGTMY0tF/mrietypyN7ohRC7wbGStYIjr86MhT6YXT5BCUXaQsZ oztw== X-Forwarded-Encrypted: i=1; AJvYcCXHDSFChhm3yHHehxRro+MwrY+PUBG13ea3ikJwJVNtqsNkU1HyLeJReIpC5BmllrWKz1l4nA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yw6Lq2yNbCCl8uYHqY4uhcFrJIsL7k/a7seichAqt6FmYBp3jHm cl1q0LgRr68S8q2u9hUqGpBX/YL2w0vMWctD2PSpJzZCQjbnHhar2f4G X-Gm-Gg: ASbGncs9yiD4IpZ5o8Vvc6+pAst9votxciPpbo6nOa6yGw2SXWSgSZH9zcHn34+GOVn tBCI/9QqLAxmps9FKGXSuBeth1XB8TU/5Sm7A7RMYJbIn9NYShd2uzGa0wO7Yk8Vrub8/zy+bIX emZCj17IHOdEDtURYGIWdusa05GiBztkTd7wM0u/X5CXHuyNeSuPKD843JEPLGrJ1OkW+Khf5tz kOUe+U1Vy9UWRzp+yCFg7F50mBYHFxjhtykxarhcACVHBWvlhZVbC3rGyAwNVKJ00PGE3P+D/y9 rqftGt+iwKvktxcxn57AS+Y088pnIQ== X-Google-Smtp-Source: AGHT+IEKlLzC8kha/ZuLONvyzeHqvJHAFY6k7ud0jJM+axw+0fl0uhhG+OUITyFWW6o6XRnpX5+a5g== X-Received: by 2002:a05:6808:2122:b0:3fc:7e1:a455 with SMTP id 5614622812f47-40b33c32167mr1149830b6e.2.1750984436545; Thu, 26 Jun 2025 17:33:56 -0700 (PDT) Received: from fedora ([2806:10ae:e:b56a::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-73afb122a27sm176188a34.62.2025.06.26.17.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jun 2025 17:33:56 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> Date: Thu, 26 Jun 2025 18:33:55 -0600 Message-ID: <87wm8ym39o.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: Sean Whitton <spwhitton@HIDDEN>, 77566 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) Dmitry Gutov <dmitry@HIDDEN> writes: > Maybe we should update project-forget-zombie-projects's docstring at > least: it says "all" without any additional elaborations. Then it would be better to remove that all, or document the behavior well, I do not know what is proposed. -- - E.G via GNU Emacs and Org.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 27 Jun 2025 00:30:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 26 20:30:21 2025 Received: from localhost ([127.0.0.1]:55178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uUwyy-0001fe-7Y for submit <at> debbugs.gnu.org; Thu, 26 Jun 2025 20:30:21 -0400 Received: from mail-oo1-xc42.google.com ([2607:f8b0:4864:20::c42]:42394) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1uUwyc-0001ax-Vr for 77566 <at> debbugs.gnu.org; Thu, 26 Jun 2025 20:30:15 -0400 Received: by mail-oo1-xc42.google.com with SMTP id 006d021491bc7-6119b103132so1081258eaf.1 for <77566 <at> debbugs.gnu.org>; Thu, 26 Jun 2025 17:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750984193; x=1751588993; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NOBp0zxFxJPPUZzvIrOkAK2ZoZCE/TRAOhXBND2JH8s=; b=B8hP3gkUUXZll4lWtKs4g6N46fMOa30LJC0UaqbI8bWCKjVEW+v0H73y1X++VnZaav wd/dPC4geqjKrUiC7cI9iF8RMWMJj7FJDKN3GNlPGUTXzztkxgtsY6NXt/rOLSCPlfBr JIu4qPUff5Nu1bM719h+r0CtuKAKOPu9Jd+teocJmivZdF/guRGrxAv+BlcpEHAkG6q1 2NtyAIkBFMsE/amR+qRwB9yIdCTuu+sgyFxeQOKH2YNRJ1KUpj3JVZnK8yw1bu0kkthB SUC0eLKFURQrF0LIIwDTcWEwa3SHaYeffe+RUk04IDLB24A/NSo609ML0M7bVtKANXM4 1R6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750984193; x=1751588993; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NOBp0zxFxJPPUZzvIrOkAK2ZoZCE/TRAOhXBND2JH8s=; b=gSOU9YBW3ciGhuRgeuNyZAuUpr8O9ivr4DHo6ZMMymqe4ZJQHDB3btm5XzXHvq9TlP 3U5tCHV2YsZNb83ltoUhJcgRjWfhbjSBdrQolFjt3Gpdb+ucEod9/2mOQTPAjZPiJMdI 3ZtGQtfJz6la4iDoCyzpqk3e5tsAmZnom8WF6CLdVEQi7J/lO7RIdK2xgpTFw1EALy0L fm4A3+P+tucyKGFT8uYRZFqovD9EvDni98uJyPUUFg4W/RdDVzWUsLnTc2KhLaJAQyeO jEI0LhepjhN2Bglg15UQaQjUgUfXyRPfcF8uSPWaQSVOF691WP353BOLYqxEN34XRBr+ 5g8Q== X-Forwarded-Encrypted: i=1; AJvYcCVMn3ZbKxJJmdXVF06qWHLjNtGfpDsHwHcAxeupOi0nlvyWNJL6TjC/Rwr94obZNaFBNXrirQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzXOgabacwo6e9w+DbXkvi1T8DPtAEErfCOkIeAAjlJpv1f+EMP M0XpjpeogTDyb7n/vu+baygzS93NCLm9569gw5bwSVQZLyUSUqi7ldhQ7cYlRfBW X-Gm-Gg: ASbGncthENWfd3hxEvGuhr+8KE2cs9Bi6ATZhEGJFpzKAqd6D7TdRh0XeTzlc92Y5Sv AKwt/TTF+7wpETN8uNFvNZ1OfL8ynJIQh06qgpJyol1ubtRRlplZvDnGHHWzjufLS2c0yDYsU6j fjsNGxtrm7OGA+McQNxWqv9T3twl+dfNNL8MEBCa0fDLTrk/wH7yNwy4BgqdRQuhqTi5MD3OdRk UOszo1on/BABQnySXkhl8um4GheoxaOtUESk38Lec0HQvy5gLb1tzXfFfII3ep03hY7s5Zl4CXw IC7iz+XkQ0vshHUktrYfm6tlTzXAAw== X-Google-Smtp-Source: AGHT+IEYtCiZuwrnq8mzZ/elJo99UcTP8dEv0fHOVcXglJ8puAKHixDZ4P4OT0+fSikQ79XsS2RTWQ== X-Received: by 2002:a05:6820:4086:b0:611:758f:1fa4 with SMTP id 006d021491bc7-611aad51cd3mr3210843eaf.0.1750984192822; Thu, 26 Jun 2025 17:29:52 -0700 (PDT) Received: from fedora ([2806:10ae:e:b56a::1]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-611b857b915sm120565eaf.25.2025.06.26.17.29.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jun 2025 17:29:52 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <8f145386-fc0a-411c-9a52-d910e8c42aef@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> <87jz4z5a0v.fsf@HIDDEN> <8f145386-fc0a-411c-9a52-d910e8c42aef@HIDDEN> Date: Thu, 26 Jun 2025 18:29:51 -0600 Message-ID: <87y0tem3gg.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: Sean Whitton <spwhitton@HIDDEN>, 77566 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) Dmitry Gutov <dmitry@HIDDEN> writes: > On 26/06/2025 09:07, Juri Linkov wrote: >> I noticed this gotcha while reviewing the patch. Maybe a cleaner way >> would be to use a special value e.g. 'none' instead of nil. And also add >> an argument 'interactive' to 'project-forget-zombie-projects'. So could >> check explicitly that in case if 'interactive' is non-nil and the value >> is 'none' then still use 'file-exists-p'. > > 'none' and nil seem equivalent in the description. Unless one really > wants to disable the remoteness check, but only in one of the > scenarios? > > But if I were to decide which of the code paths would skip the > file-remote-p check, it would probably be the interactive > 'project-forget-zombie-projects' invocation, rather than the general > scenario. Or maybe that would only happen with the prefix argument, > something like that. I don't quite understand this conversation, the idea is add a prefix argument to `project-forget-zombie-projects` for do not delete remote projects or modify `project-prune-zombie-projects` behavior? -- - E.G via GNU Emacs and Org.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 26 Jun 2025 23:02:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 26 19:02:24 2025 Received: from localhost ([127.0.0.1]:54849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uUvbp-000536-TA for submit <at> debbugs.gnu.org; Thu, 26 Jun 2025 19:02:23 -0400 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]:47611) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1uUvbm-00051e-22 for 77566 <at> debbugs.gnu.org; Thu, 26 Jun 2025 19:02:19 -0400 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id CBB987A0142; Thu, 26 Jun 2025 19:02:11 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Thu, 26 Jun 2025 19:02:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1750978931; x=1751065331; bh=Lkh3VBFNwrMZtxar84Sbp8Smc1K6ZZ3ciKZOHv1e9NE=; b= qntLhAP0MEQBiRHfnnaTjpM57StGgmOAuzR061gA0qQ3Fku2w/LEjhgBOxEXepTZ be/Ag9yJRQsUlIGlYBu1oG81QeVeCwxHROL7qX0X6l4vgQI6HKNgDVV6F/gzmplC d7YWEZTOgAMbdSFDqIlD7TA12AoTkQeNQ3GUpLSEMnO+TOzwtGR4EgPYuEhC/ymg lFxAutyqg1aF5i9Gyv1XQHA/ZHWwEQT6uOJjRHfhUINA7jfY3KHeULvSULZLZRxs pk9vv+PipnN2l4y0CQlRE4m7pPkcP7B8x8JcsDfLatCkqT00k7Hd5P9/QFFXFSRa v6l3y6hRGHdT0LDDFOEYFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1750978931; x= 1751065331; bh=Lkh3VBFNwrMZtxar84Sbp8Smc1K6ZZ3ciKZOHv1e9NE=; b=a GtmDQEvjMimDJQByXE6k9hj8yC1LeBlhiZl3TEBXybd6TzFXdj7V9vMM7SRaP8+7 el6nmaLV+GjxezKMEWRfEXKgoqZfgTRWekSj+5MkkmvitcKe6dUD+gepp/RZg/zH J/DXA8VaaeowZBxqfGUF3y8iQeb2lvKR//izpWTemBSQoDjAsTqRAai3P1a3nFAo hrXnljNofEJ98ZHTkdtKLBp9vKk9mWSN14HzfqsGz5Qji8wXUVZ1U3DQ+bJPWZ+9 waiApmY3zAxlDEog9kGesC57OdCVdGcJjgT5kt7NleecPw+Sm1JEvlR0T49RW2Gg H5YjsQEwaaQM57os+BsqQ== X-ME-Sender: <xms:c9FdaNX0c-e_LjgPLWgk_dS19jJDyqCANSNpVpUXqx_Bnlf5Db063g> <xme:c9FdaNm4qGybAoHTdgl8j1jM1s1owqnhdv98gCGU08HVptnauxMMcFDbCVMc7d66i suYR2YrEfLgEzBrZmw> X-ME-Received: <xmr:c9FdaJYCVmeBiBr3CXdsZp11tHD0y4lRFTtMm8LkwWjn75PvqGiPbIfB2AQc64wfobPr> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhithhrhicu ifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnh epteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedujeehnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrh ihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehjuhhriheslhhinhhkohhvrdhnvghtpdhrtghpthhtohepvghgie egvdeiudeisehgmhgrihhlrdgtohhmpdhrtghpthhtohepjeejheeiieesuggvsggsuhhg shdrghhnuhdrohhrghdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtoh hnrdhnrghmvg X-ME-Proxy: <xmx:c9FdaAVKHQHElU5NoVWeiFF7dE7IHl1OALLm5Y2z2fidVdEywCnXVg> <xmx:c9FdaHnG2JjWKgWOnaOuhbiP8ZHQgc4S7ZqCnssF4wXtvf6CO6PgMQ> <xmx:c9FdaNfTDz0LKiVspGZ-BqV_Gs7xT0uGKqGojpGSp6ACKxcTv4TC7Q> <xmx:c9FdaBHu4WZRCP_RQWpeW_Jvv8D0Ic3Gs3qHJK3d22Vqz-euHtFgeQ> <xmx:c9FdaN8oaCPNsSNNiEX1KFcymtGkPc16UJCWHyEO6mSamDbL2tmHq-9L> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Jun 2025 19:02:09 -0400 (EDT) Message-ID: <8f145386-fc0a-411c-9a52-d910e8c42aef@HIDDEN> Date: Fri, 27 Jun 2025 02:02:06 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Juri Linkov <juri@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> <87jz4z5a0v.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87jz4z5a0v.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 26/06/2025 09:07, Juri Linkov wrote: > I noticed this gotcha while reviewing the patch. Maybe a cleaner way > would be to use a special value e.g. 'none' instead of nil. And also add > an argument 'interactive' to 'project-forget-zombie-projects'. So could > check explicitly that in case if 'interactive' is non-nil and the value > is 'none' then still use 'file-exists-p'. 'none' and nil seem equivalent in the description. Unless one really wants to disable the remoteness check, but only in one of the scenarios? But if I were to decide which of the code paths would skip the file-remote-p check, it would probably be the interactive 'project-forget-zombie-projects' invocation, rather than the general scenario. Or maybe that would only happen with the prefix argument, something like that.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 26 Jun 2025 06:15:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 26 02:15:55 2025 Received: from localhost ([127.0.0.1]:47012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uUftq-0001J5-Ii for submit <at> debbugs.gnu.org; Thu, 26 Jun 2025 02:15:55 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:40367) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uUftm-0001IC-WE for 77566 <at> debbugs.gnu.org; Thu, 26 Jun 2025 02:15:51 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id AE3744444E; Thu, 26 Jun 2025 06:15:41 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> Date: Thu, 26 Jun 2025 09:07:44 +0300 Message-ID: <87jz4z5a0v.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgddvgeeltdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepffegteefveelhfeljeefueehieduiedtfffhuddtkeeffffghfevheetgeeukeehnecukfhppeeluddruddvledruddttddrjeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutddtrdejjedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepjeejheeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomhdprhgtphhtthhopegumhhithhrhiesghhuthhovhdruggvvh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> + (when (and (if project-prune-zombie-projects >> + (funcall project-prune-zombie-projects proj) >> + t) >> + (not (file-exists-p proj))) > > Interesting decision - so if the predicate is nil, we don't check the > project for remote-ness (or anything) but still prune it. > > In general this seems to work since all the added callers of this functions > check the option to be non-nil, but the logic does seem non-intuitive. I noticed this gotcha while reviewing the patch. Maybe a cleaner way would be to use a special value e.g. 'none' instead of nil. And also add an argument 'interactive' to 'project-forget-zombie-projects'. So could check explicitly that in case if 'interactive' is non-nil and the value is 'none' then still use 'file-exists-p'.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 26 Jun 2025 01:49:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 25 21:49:27 2025 Received: from localhost ([127.0.0.1]:42884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uUbjy-0006Xy-9o for submit <at> debbugs.gnu.org; Wed, 25 Jun 2025 21:49:27 -0400 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]:35115) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1uUbjo-0006XM-VS for 77566 <at> debbugs.gnu.org; Wed, 25 Jun 2025 21:49:21 -0400 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1ECDC14000DE; Wed, 25 Jun 2025 21:49:11 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 25 Jun 2025 21:49:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1750902551; x=1750988951; bh=+8MPOSimTqoNT3El1VoNlM7tBJ4JIvP64T4osuI0CSQ=; b= ix8gxRjOwWHlwK+Cr30IwrNV9Ulr8YUzYy1HyPrmaPzJHmp6VFXz8+LJMR6y049W dcVX2ZyIi7q9yIV7cRExbLtMFngU5ovzA0/YP4wkd72K+qyvpDi4cTEpv4vBbJGS aG4uJ3Aj07nYbBBU0vP2UBNbhVf2iFGa0Erlj2HFr1vgu+MjrHZx+fBUqO/GylAY fIh8mn4+qDRhXREoRHVfGbdiUKoXPFPHvL8JTMaWgRMOB2MTmnfjP6w2sYEgZnwF r8Ft0XjQVvNNnKDz0LbhICL40p03GAizINQ5H+6wrSRS/LGCQfy61zMNnMPsb4E+ /MW0/DdJo83fuh1xWFaT+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1750902551; x= 1750988951; bh=+8MPOSimTqoNT3El1VoNlM7tBJ4JIvP64T4osuI0CSQ=; b=L JGLhLjUSmiHgmUDPuCxgmyKi5mZJHKX3sdFSEimmrE2DobDhgLayW4AkJ9NM2SsN GcaIRu8uFe2fs0RFDsxuJZ+/1+OiRYkyyAGy84dX0dgF8Rww6ba1NpUGNjDSsXcl VfgiwINsKagOJFe1qE7GY1RD5ZPiNexNCyO6h2masnlqH0lAUr3qldPC4h82uwTn J6BCHBFsyUpQLu96EwVFoaRk9IDD6FqAIwhpPSwWTJvSfa+kRUujtDG5nl0FqDwK 8FfswU4Hv1nDk63TcNv4E9oLYZiJFeLGFaawAa8Xet/g+6s+cbbznNG7EPBctLtp 54tnxQvARv76iDVGQY3Ng== X-ME-Sender: <xms:FqdcaPjZP_9ZBd4TfGT507nuO43ypVD8dskbuWNEn6gJR-gG7Z5Eag> <xme:FqdcaMC6mlTkNepf8-pxzUyZgd5NetPCJ0FywRlUOuLkMzexSLKCUeG-6aIXQNpd2 qK-lA3XsINS94PCD1M> X-ME-Received: <xmr:FqdcaPFbCqoC4ZD4PzkQajjF2u8SDTX3Bj0Z-qFi1AOzbDXTuCsc9jyB22LIqVPfRy8Z> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgddvgeefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihhtrhih ucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtthgvrh hnpeegleefteekgffhvdfhtdegveevveetteegteevgeettdehhfdukeetheffueekkeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhith hrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepvghgieegvdeiudeisehgmhgrihhlrdgtohhmpdhrtghpthhtoh epjhhurhhisehlihhnkhhovhdrnhgvthdprhgtphhtthhopeejjeehieeiseguvggssghu ghhsrdhgnhhurdhorhhgpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtth honhdrnhgrmhgv X-ME-Proxy: <xmx:FqdcaMQXE7o00MirM0JUHzaWcPSfKqmpubS3Eu_bAu9GnL94ASnSqA> <xmx:FqdcaMz6bn6yUqODvOjLud6XAqLWByPt8sNoUpLhSVBI6YBROFbaBQ> <xmx:FqdcaC6tiie--bHh08v-DjjrOx6DLM_an-K5156qd8MCYNtAAoYzdg> <xmx:FqdcaByiqGqKnbU_1hNZbRzPT2uVI-q1Uylbsxfjh0x6uCr65SMRpQ> <xmx:F6dcaFqK-hJqSBbOQKHP-fXjD_2hA5OEJ3t0karyH7SSDr86aR7sXImn> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jun 2025 21:49:08 -0400 (EDT) Message-ID: <2080b702-aa09-426f-b144-e2122cadb790@HIDDEN> Date: Thu, 26 Jun 2025 04:49:07 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN>, Juri Linkov <juri@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87v7oldppt.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 24/06/2025 20:17, Elijah Gabe Pérez wrote: > + (when (and (if project-prune-zombie-projects > + (funcall project-prune-zombie-projects proj) > + t) > + (not (file-exists-p proj))) Interesting decision - so if the predicate is nil, we don't check the project for remote-ness (or anything) but still prune it. In general this seems to work since all the added callers of this functions check the option to be non-nil, but the logic does seem non-intuitive. Maybe we should update project-forget-zombie-projects's docstring at least: it says "all" without any additional elaborations.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Juri Linkov <juri@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 25 Jun 2025 06:57:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 25 02:57:41 2025 Received: from localhost ([127.0.0.1]:57819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uUK4i-0004OM-VI for submit <at> debbugs.gnu.org; Wed, 25 Jun 2025 02:57:41 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:59977) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uUK4f-0004MY-KX; Wed, 25 Jun 2025 02:57:38 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 3BBE44445E; Wed, 25 Jun 2025 06:57:26 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87v7oldppt.fsf@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> <87v7oldppt.fsf@HIDDEN> Date: Wed, 25 Jun 2025 09:55:41 +0300 Message-ID: <87ikkkfgya.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgddvvddutdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepffegteefveelhfeljeefueehieduiedtfffhuddtkeeffffghfevheetgeeukeehnecukfhppeeluddruddvledruddttddrjeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutddtrdejjedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeehpdhrtghpthhtoheptghonhhtrhholhesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepughmihhtrhihsehguhhtohhvrdguvghvpdhrtghpthhtohepvghgieegvdeiudeisehgmhgrihhlrdgtohhm X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 77566 31.0.50 thanks >> I looked into installing your patch, but then noticed that >> the order of calling file-remote-p and file-exists-p is still >> backwards. The main purpose of the predicate file-remote-p >> is to avoid costly calls of file-exists-p on remote files. > > Makes sense, I think I forgot about that part. > > It should be fixed: No more comments, so now your patch is pushed. Thanks for this option.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 24 Jun 2025 17:17:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 24 13:17:14 2025 Received: from localhost ([127.0.0.1]:47290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uU7Gj-00081w-Lb for submit <at> debbugs.gnu.org; Tue, 24 Jun 2025 13:17:14 -0400 Received: from mail-oo1-xc44.google.com ([2607:f8b0:4864:20::c44]:55542) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1uU7Gh-00081Z-CH for 77566 <at> debbugs.gnu.org; Tue, 24 Jun 2025 13:17:12 -0400 Received: by mail-oo1-xc44.google.com with SMTP id 006d021491bc7-604ad0347f5so1357589eaf.2 for <77566 <at> debbugs.gnu.org>; Tue, 24 Jun 2025 10:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750785425; x=1751390225; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=6rfB1uIFqSRGxp2FFwS2I047vxJ3n4umhDhyutAnHCU=; b=h+jmeyJx1vm+3tU/jz/+UMgDQ1utlYA/xvGMFRWDTj/oYvNRTp8hsvS9m2EL5z4vQA jgc935cwnbdQQK8ND1abfBcRAcwHwn6pajNotcYw5eeCOZrxHYro3pr0tUi0p2FJcnhi eF6Uq4IgsXy6v5g7GboQRxyP2Kr3Or3ibwHEF8SO/EFDaRc8dJH1Mz5cJPzalawfk9e5 Ozil6QdiXLod8U5sAL06RwjD/+DfYROXpXy/S8oAShGJWy+k5FSbdJfvGK3ndFKqwL05 Ydpcl1M0GYnRke083Zk+MNZmBPm6b/I2f/xMvJTcypHdd7mSCug5Aqg0tI3bE5x71CmE SUgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750785425; x=1751390225; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6rfB1uIFqSRGxp2FFwS2I047vxJ3n4umhDhyutAnHCU=; b=Soqms/THXzJl7Geil6qW4pjGCNH19KC5YiEwXToUeHGYSW01OGN1xioL3Ty6PvR4G2 3TL9e4Nxw6ep8crnWsE5iVE+onL+zQNFz1IpRH912zFN6XJCYFWaRgRioByS0QkHT1wM 1sKj8uoU4PbkuZAud2p8MIL3DJgN2aSaFWxGcmfgCD1OGqggslWbZAgzZdSCt1oep/DI b/Fa99nI/khQOOB0JaLjks1DKWpL6aVLVa1giZflMRQAeqIM769vTgk41e00g7SWMt56 Gqm4m4BjH5CJrPXzhbSaHzZtEDZSr7km/3deHJOv1ORPalHJT0yeVdfGvBCrCZ2Iebys sOSQ== X-Forwarded-Encrypted: i=1; AJvYcCV1AsRlroxhlAtRLPYqlC8DUbR3ZM9N3AoNcQcSQJ2RPHmoyI4vTZjeS6l4zoYCvGrqNcFnhw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzYYHFM9Fd0XDA9tDwBCtWBgRh4rNzm5esR8Ly3MvXmPrwAGrhb 0k2IAnGAyfxhSymtqt6r+wpRja2/RJYyIMUCVRQVaHlP3rXt4NDEQYSI X-Gm-Gg: ASbGncs5HFOucVRgH42aLFf+3Iad66a1rbcY6qZyQoMyvuE6GRaY4gTULqsAEJqvYz+ cUB6MhpciV+AitUj/VAzueozXQbBDt88+wVJkPo+9DDWDPRwQ0ZDOHHxoFOV4HyroapCp4ySE1L QGkuSN/kxGFM+e760QhaDx//8frH12htqmhuv/nKV3gtxi8WkoXCR2SVXLNH4f/zm/uTfZNh7Zp M+sl83JuxIhxUI0ny0cVbVzAMFLH6KxWC5BWOBVKWI7pSVZnhTRjEirnVKpzK9A256+gmrttZyg 6gqVuSPCpZhwsdcpZwENthn+f4LlGQ== X-Google-Smtp-Source: AGHT+IFLk6CfLkqIvaYKdzNViwcf4K46iEzanMN5+5TM660h1fcMuEun5rTJFoWHbV7/5M47pgBXug== X-Received: by 2002:a05:6871:285:b0:2eb:8c50:9c05 with SMTP id 586e51a60fabf-2efb26d1c8bmr70214fac.11.1750785424931; Tue, 24 Jun 2025 10:17:04 -0700 (PDT) Received: from fedora ([2806:10ae:e:b56a::1]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2eead8e1753sm2110910fac.46.2025.06.24.10.17.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jun 2025 10:17:04 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87frfpab9o.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> <87frfpab9o.fsf@HIDDEN> Date: Tue, 24 Jun 2025 11:17:02 -0600 Message-ID: <87v7oldppt.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Juri Linkov <juri@HIDDEN> writes: > I looked into installing your patch, but then noticed that > the order of calling file-remote-p and file-exists-p is still > backwards. The main purpose of the predicate file-remote-p > is to avoid costly calls of file-exists-p on remote files. > >> +(defun project-prune-zombies-default (project) >> + (not (file-remote-p project))) > >> @@ -2153,7 +2181,10 @@ project-forget-zombie-projects >> - (unless (file-exists-p proj) >> + (when (and (not (file-exists-p proj)) >> + (if project-prune-zombie-projects >> + (funcall project-prune-zombie-projects proj) Makes sense, I think I forgot about that part. It should be fixed: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-automatically-delete-non-existent-projects.-Bu.patch From 202888e2907400802d925162758ce525ea172a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Tue, 8 Apr 2025 22:30:28 -0600 Subject: [PATCH] Allow automatically delete non-existent projects. (Bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects): New user option. (project-prune-zombies-default): New function. (project-forget-zombie-projects): Rework. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call 'project-forget-zombie-projects' but inhibit its message. --- etc/NEWS | 13 +++++++++++++ lisp/progmodes/project.el | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 836b16620cc..ee352b448ec 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -432,6 +432,19 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option controls the automatic deletion of projects from +'project-list-file' that cannot be accessed when prompting for a +project. + +The value can be a predicate which take one argument and should return +non-nil if the project should be removed. If set to nil, all the +inaccessible projects will not be removed automatically. + +By default this is set to 'project-prune-zombies-default' function +which removes all non-remote projects. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5cf9a68a294..fab00bd730b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1562,6 +1562,24 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects #'project-prune-zombies-default + "Remove automatically from project list all the projects that were removed. +The value can be a predicate function which take one argument, and +should return non-nil if the project should be removed. +If set to nil, all the inaccessible projects will not be removed automatically." + :type '(choice (const :tag "Default (remove non-remote projects)" + project-prune-zombies-default) + (const :tag "Remove any project" identity) + (function :tag "Custom function") + (const :tag "Disable auto-deletion" nil)) + :version "31.1" + :group 'project) + +(defun project-prune-zombies-default (project) + "Default function used in `project-prune-zombie-projects'. +Return non-nil if PROJECT is not a remote project." + (not (file-remote-p project))) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1914,7 +1932,11 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if-let* (project-prune-zombie-projects + ((consp project--list)) + (inhibit-message t)) + (project-forget-zombie-projects)))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1995,6 +2017,9 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -2024,6 +2049,9 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2153,7 +2181,10 @@ project-forget-zombie-projects "Forget all known projects that don't exist any more." (interactive) (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) + (when (and (if project-prune-zombie-projects + (funcall project-prune-zombie-projects proj) + t) + (not (file-exists-p proj))) (project-forget-project proj)))) (defun project-forget-projects-under (dir &optional recursive) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 24 Jun 2025 06:50:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 24 02:50:26 2025 Received: from localhost ([127.0.0.1]:38186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uTxUA-0008F8-9h for submit <at> debbugs.gnu.org; Tue, 24 Jun 2025 02:50:26 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:42749) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uTxU5-0008BA-HB for 77566 <at> debbugs.gnu.org; Tue, 24 Jun 2025 02:50:23 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2613B443DE; Tue, 24 Jun 2025 06:50:12 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87wm93s93p.fsf@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> <87wm93s93p.fsf@HIDDEN> Date: Tue, 24 Jun 2025 09:45:07 +0300 Message-ID: <87frfpab9o.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduledvudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepffegteefveelhfeljeefueehieduiedtfffhuddtkeeffffghfevheetgeeukeehnecukfhppeeluddruddvledruddttddrjeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutddtrdejjedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepjeejheeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegumhhithhrhiesghhuthhovhdruggvvhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) I looked into installing your patch, but then noticed that the order of calling file-remote-p and file-exists-p is still backwards. The main purpose of the predicate file-remote-p is to avoid costly calls of file-exists-p on remote files. > +(defun project-prune-zombies-default (project) > + (not (file-remote-p project))) > @@ -2153,7 +2181,10 @@ project-forget-zombie-projects > - (unless (file-exists-p proj) > + (when (and (not (file-exists-p proj)) > + (if project-prune-zombie-projects > + (funcall project-prune-zombie-projects proj)
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 22 Jun 2025 22:30:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 22 18:30:19 2025 Received: from localhost ([127.0.0.1]:49976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uTTCZ-0000VC-IS for submit <at> debbugs.gnu.org; Sun, 22 Jun 2025 18:30:18 -0400 Received: from mail-oo1-xc43.google.com ([2607:f8b0:4864:20::c43]:60829) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1uTTCV-0000T8-Sy for 77566 <at> debbugs.gnu.org; Sun, 22 Jun 2025 18:30:13 -0400 Received: by mail-oo1-xc43.google.com with SMTP id 006d021491bc7-6065251725bso2709171eaf.1 for <77566 <at> debbugs.gnu.org>; Sun, 22 Jun 2025 15:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750631404; x=1751236204; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=spuQXSVwszN49MaF3OFS/n4mGP6j4dMJbfZUWcSQBxI=; b=HNh3xEj1YttXwMmx5nhpNmR8cdQ17NHL+DIa9RqaUZqQqRZarKDlH4yFHMxvAQEVeq 8hKBwP+WoS7I+jfJ11wPdraXNWfBlzGOOo/TYFxBobtlaAAR79X1d5VFFjtlrykT3Sk6 DqVYgh5F0MdR1pXcWXucACJxidrx4T4QxHnFRxdfKxYC5rcmdExm3KDNVrC5/yPqxax8 9zABJOZk3+6EcMGRwO4WYQNlp9Tx6FJTkCevc9Yx540g0r2aWKaOQxj1wNZcYmBVKT4z PrWdziSSgLQ2o8PYwBU4Jy+gWfNZy4LWNcOO0L3zG6E3gmM/ynPiyf9sOji8tvJwKxQM o+3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750631404; x=1751236204; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=spuQXSVwszN49MaF3OFS/n4mGP6j4dMJbfZUWcSQBxI=; b=BFePeUqZP1yH6F/xLEGcjKBMG7N7K+Y9hOitgfjenp0X1qsVU8ku0cLtgyB92rrlQk 9s5PGtHOV4jgtMqUbDRNhjF9FuDxG1mNx1OZEwF4QL/8yA6e7RI8lknr6YzaEv9fyxw8 ZKNXPWvV+Au2oaPyORK4tc+h0xdEaP99bSouLmlPqHUlWUUeRAI7/fxfjNfySFJnY+pu mZtsTfmRbYsL2zveQSjnYIC5aqN/8fLKoLeQ8srz/rq0Sa2dL3dcUtx9DPtdD1FiZuKx eFdfa4w/nGPd8AToDTjTjYzm9cWEOtknFV+lRI4xy2+Cx8faXg5Q23qPeDxw3fXCmd0D 8hbQ== X-Forwarded-Encrypted: i=1; AJvYcCVpuKkRX0bjuNorLvj9Gw7LQUHy74Wkkesl9dQFa8yeQ231eiZM5efTS9EygcEJkTLXyDcl4w==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yw1YYY/qKcxMsvWMHXebaXwb99fzl7tSOxadFW4Tn12kNC5Ylfe UBcqY9htpLGnh7zwYSnU1Wv0uJ8wE67edmpaAWsG3v2lX2l6Ig8Dcy3b X-Gm-Gg: ASbGncup8nsa5BNB4zfq+wrQErpRlALw0v8Lbb4A7spa4dKaeK7BJeuGzYEklUNaeSR Ws+V/Z7MSFGJx2P6v1x1fkGqMmQAoDsMKSIrsDzHRxa7U6w5gZSo/AvhJeScHvNYBY+lfW2FN2a ORvGK9zWum9Kt70Iz7a3X0MJjdh1O5QSmni7bKTLxa4MkZ3x+MzhcrftsB2gVc1kgjqvr9pcho5 G4aD3dm4J033x0MFT8vRKxaG/GqyqXD695GiSZoUlRx88vZT2mbFdsw+vCUWuNlGIO2hC1A8sz6 leXhxiUlJXD39cutwptl9iK3jD3BPg== X-Google-Smtp-Source: AGHT+IEovOo+9rqdw4nX23LSUBUrmrphYR0ryqiqvPFwctN8yOseHYksLQz6p0Mm/Nk2DrVNmvMV8g== X-Received: by 2002:a05:6820:2009:b0:611:4bfe:610a with SMTP id 006d021491bc7-6115ba90303mr6830745eaf.8.1750631404548; Sun, 22 Jun 2025 15:30:04 -0700 (PDT) Received: from fedora ([2806:10ae:e:b56a::1]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6115b7a28e4sm852708eaf.19.2025.06.22.15.30.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Jun 2025 15:30:03 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87qzzcz39b.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> <87qzzcz39b.fsf@HIDDEN> Date: Sun, 22 Jun 2025 16:30:02 -0600 Message-ID: <87wm93s93p.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Juri Linkov <juri@HIDDEN> writes: >> I've moved this to another defcustom (see patch below), for let >> 'project-prune-zombie-projects' only as an option for enable/disable the >> automatic project deletion. > > Would it be possible to combine two defcustoms into one? > Then this feature could be disabled by customizing the method to nil > that will simplify customization. Sure, I decided not to combine them because I wasn't sure how, but I found the solution. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-automatically-delete-non-existent-projects.-Bu.patch From 041d28818dc5339f74af7aa074184b1bf84c9bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Tue, 8 Apr 2025 22:30:28 -0600 Subject: [PATCH] Allow automatically delete non-existent projects. (Bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects): New user option. (project-prune-zombies-default): New function. (project-forget-zombie-projects): Rework. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call 'project-forget-zombie-projects' but inhibit its message. --- etc/NEWS | 13 +++++++++++++ lisp/progmodes/project.el | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0c66ac38105..43402605ef6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -425,6 +425,19 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option controls the automatic deletion of projects from +'project-list-file' that cannot be accessed when prompting for a +project. + +The value can be a predicate which take one argument and should return +non-nil if the project should be removed. If set to nil, all the +inaccessible projects will not be removed automatically. + +By default this is set to 'project-prune-zombies-default' function +which removes all non-remote projects. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5cf9a68a294..eeab4b71ce8 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1562,6 +1562,24 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects #'project-prune-zombies-default + "Remove automatically from project list all the projects that were removed. +The value can be a predicate function which take one argument, and +should return non-nil if the project should be removed. +If set to nil, all the inaccessible projects will not be removed automatically." + :type '(choice (const :tag "Default (remove non-remote projects)" + project-prune-zombies-default) + (const :tag "Remove any project" identity) + (function :tag "Custom function") + (const :tag "Disable auto-deletion" nil)) + :version "31.1" + :group 'project) + +(defun project-prune-zombies-default (project) + "Default function used in `project-prune-zombie-projects'. +Return non-nil if PROJECT is not a remote project." + (not (file-remote-p project))) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1914,7 +1932,11 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if-let* (project-prune-zombie-projects + ((consp project--list)) + (inhibit-message t)) + (project-forget-zombie-projects)))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1995,6 +2017,9 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -2024,6 +2049,9 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2153,7 +2181,10 @@ project-forget-zombie-projects "Forget all known projects that don't exist any more." (interactive) (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) + (when (and (not (file-exists-p proj)) + (if project-prune-zombie-projects + (funcall project-prune-zombie-projects proj) + t)) (project-forget-project proj)))) (defun project-forget-projects-under (dir &optional recursive) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 22 Jun 2025 06:59:44 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 22 02:59:44 2025 Received: from localhost ([127.0.0.1]:46300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uTEg3-0005xd-ID for submit <at> debbugs.gnu.org; Sun, 22 Jun 2025 02:59:44 -0400 Received: from relay16.mail.gandi.net ([2001:4b98:dc4:8::236]:37345) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uTEg1-0005xJ-My for 77566 <at> debbugs.gnu.org; Sun, 22 Jun 2025 02:59:42 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2921843981; Sun, 22 Jun 2025 06:59:32 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <871prck04x.fsf@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> <871prck04x.fsf@HIDDEN> Date: Sun, 22 Jun 2025 09:42:08 +0300 Message-ID: <87qzzcz39b.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgddufeehtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepffegteefveelhfeljeefueehieduiedtfffhuddtkeeffffghfevheetgeeukeehnecukfhppeeluddruddvledruddttddrjeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutddtrdejjedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepjeejheeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegumhhithhrhiesghhuthhovhdruggvvhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomh X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >> desktop-files-not-to-save supports a regexp to exclude remote. >> recentf-keep supports a predicate to exclude remote. >> project-list-exclude supports both: a regexp and a predicate. >> project-prune-zombie-projects could do the same. > > Thanks, i think that using a predicate is better, I'm not sure about the > regexp one. Agreed. A regexp is just a subset of a predicate that can use a function to match a regexp. Moreover, it's too unreliable to use a regexp to detect remote files. > I've moved this to another defcustom (see patch below), for let > 'project-prune-zombie-projects' only as an option for enable/disable the > automatic project deletion. Would it be possible to combine two defcustoms into one? Then this feature could be disabled by customizing the method to nil that will simplify customization.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 22 Jun 2025 01:58:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 21 21:58:52 2025 Received: from localhost ([127.0.0.1]:45202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uT9ys-0007vM-Pu for submit <at> debbugs.gnu.org; Sat, 21 Jun 2025 21:58:51 -0400 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:60844) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1uT9yp-0007uP-Ld for 77566 <at> debbugs.gnu.org; Sat, 21 Jun 2025 21:58:48 -0400 Received: by mail-oi1-x244.google.com with SMTP id 5614622812f47-40a6692b75cso2406288b6e.1 for <77566 <at> debbugs.gnu.org>; Sat, 21 Jun 2025 18:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750557522; x=1751162322; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=XcbtTdXujFYNEflbmY8JmRw4A2Y9KPJphiI43AfXaWI=; b=U9N//b8V/rkM9GxE6BAin4qYDCtY1G1u1TXp4T9R0AzP16/Fhp7CHoJzhV5SYSFpxh b/E+W2aAY2RqBq32XQgLTPm2e3pxA3ttYT2SE/lRJojipTBDq5GDw4FEBI8gQqBM3kw7 aS3LRwO3MsbiI20AMnpIACWL7NtwafMtdjSWlUXlCDJanq0U3AZ7QhZ6v0GbslDM2VqK YIVvRtcEtY4+7aczXayhqXJPaB8JbhZ7tJOdpMfPBQX1Gobu/TrKbg+zyLSn37cCBmKh jXS7jupep4/UNP4hJoUf/RRaerTi6JBU070QefU58GviQVXelSn43YjIHDenA1Z1V+9h ywtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750557522; x=1751162322; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XcbtTdXujFYNEflbmY8JmRw4A2Y9KPJphiI43AfXaWI=; b=uHcfwLNqtqVDkJ2N7I612wnwJr29tpDCa/OSKxkqXqaJ20nVzqXMWLKUQzSWhsRM2H XFG+4HTqHZMjutuNGGSC/4p+8/unl8d+2wAF0qL5aAfPiMmFQHDzV36EUgfFdrJfQ68R NjZO6BIEokVousS0DzIEB3tgflEam/SMn7BbAXwaTUO/ssOcdqg8O1NDZ4zQ2JqzWU3I ucp1n4nkKUcblcvsBuurXr6UU2bhhmF7B+oG9kqUjSQ3xuVUSno5U0BkuiZOgxRXwz3x WP+CyCWXior6Sr6ebl+t9BQS9w62hM9M0hRmFj02Oveg75otVF+mXO4XPxB9M/UevqFa VpbA== X-Forwarded-Encrypted: i=1; AJvYcCURgTcU1hwNOOhjghatDI27/To92oDU4Z1ZgCOEgtXlvLQ41YsyKXNHREG11hHVeT6aDzlg7g==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxvTouy+cCmT0xifUIIamtINi8GAaLCIu+aXBoQPQ16F0Y4dyps grOiNImUMF0Qd0fpfHVF1oNlUGG66lFtpTrnNsndv0gMlBhjHOpAR2Xi X-Gm-Gg: ASbGncvEIbQHQkiArUrGrIzxqU33mJLDFChx8sLcX79q4Wqc3ODiQnkVFHGEScwNeI5 OKr/SphvQry9AwNZfsjIe9w8o3e1l8dmwmdiOR+mYeQ+u3+6OmlXbHXn4VbAPYj6CvR30SeH4uf tt8Y12gu4kToNCBZuzHpULBQteA8G3LQNDiAdkGkOjRaW9yKYC0vsIMadIJDcDqLTAd6ufwmANf GYBA5TN2/VuLwyG1EJMwQVeZt6RQQxmt8G2eb8+y2WFe0mITZ7VdwahHLxSQIkH3ww7ZNxdb3uc l9Ag/SwH1T9m6DkT8eQlb2S4bzM/Fg== X-Google-Smtp-Source: AGHT+IH+owPNyQgovcLvMVbQNQOhfQd8FRQCSkbFOmJ0RIParutLC688nXFceP4KKCAZ+JHln2OiWA== X-Received: by 2002:a05:6808:179f:b0:403:3c95:3683 with SMTP id 5614622812f47-40ac70a1e2dmr6641238b6e.19.1750557521545; Sat, 21 Jun 2025 18:58:41 -0700 (PDT) Received: from fedora ([2806:10ae:e:b56a::1]) by smtp.gmail.com with ESMTPSA id 5614622812f47-40ac6c13703sm890754b6e.5.2025.06.21.18.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jun 2025 18:58:40 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87ikku27uo.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> <87ikku27uo.fsf@HIDDEN> Date: Sat, 21 Jun 2025 19:58:38 -0600 Message-ID: <871prck04x.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Juri Linkov <juri@HIDDEN> writes: >> +(defcustom project-prune-zombie-projects 'exclude-remote >> + "Automatically remove from project list projects that were deleted. >> +If set to `exclude-remote' (default), remove deleted projects except >> +those that are remote. >> +If set to `all', include remote and no remote projects from being >> +removed." >> + :type '(choice (const :tag "Exclude remote projects" exclude-remote) >> + (const :tag "All projects" all)) > > desktop-files-not-to-save supports a regexp to exclude remote. > recentf-keep supports a predicate to exclude remote. > project-list-exclude supports both: a regexp and a predicate. > project-prune-zombie-projects could do the same. Thanks, i think that using a predicate is better, I'm not sure about the regexp one. I've moved this to another defcustom (see patch below), for let 'project-prune-zombie-projects' only as an option for enable/disable the automatic project deletion. >> +(defcustom project-inhibit-message nil >> + "Non-nil means any project command will not display messages in echo area. >> +The messages are displayed in the messages buffer but it won't >> +be shown in the echo area." > > Instead of creating numerous options for every command that emits messages, > the new way is to customize a list of messages: > > (add-to-list 'set-message-functions 'inhibit-message) > (add-to-list 'inhibit-message-regexps "project was found") > (add-to-list 'inhibit-message-regexps "project was forgotten") Cool, i didn't know about this. Any suggestion about the patch? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-automatically-delete-non-existent-projects.-Bu.patch From b0a6084b3551b6772aaa15d69d7f30f70854ff08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Tue, 8 Apr 2025 22:30:28 -0600 Subject: [PATCH] Allow automatically delete non-existent projects. (Bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects) (project-forget-zombies-method): New user options. (project-forget-zombie-projects): Rework. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call 'project-forget-zombie-projects' but inhibit its message. --- etc/NEWS | 13 +++++++++++++ lisp/progmodes/project.el | 41 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0c66ac38105..a720fbd9366 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -425,6 +425,19 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +If non-nil (the default), remove automatically all the projects that +were removed. + +--- +*** New user option 'project-forget-zombies-method'. +This user option controls the behavior of 'project-forget-zombie-projects'. +The value should be a predicate which take one argument and should +return non-nil if the project should be removed. By default this is set +to 'project-prune-prune-zombie-default' which removes all non-remote +projects. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5cf9a68a294..06022362b6c 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1562,6 +1562,29 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects t + "If non-nil, remove automatically all the projects that were removed. +See `project-forget-zombies-method' for only remove some projects." + :type 'boolean + :version "31.1" + :group 'project) + +(defcustom project-forget-zombies-method #'project-forget-zombies-default + "The behavior used in `project-forget-zombie-projects'. +The value must be a predicate function which take one argument, and +should return non-nil if the project should be removed." + :type '(choice (const :tag "Default (remove non-remote projects)" + project-prune-prune-zombie-default) + (const :tag "Remove any project" identity) + (function :tag "Custom function")) + :version "31.1" + :group 'project) + +(defun project-forget-zombies-default (project) + "Default function used in `project-forget-zombies-method'. +Return non-nil if PROJECT is not a remote project." + (not (file-remote-p project))) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1914,7 +1937,11 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if-let* (project-prune-zombie-projects + ((consp project--list)) + (inhibit-message t)) + (project-forget-zombie-projects)))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1995,6 +2022,9 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -2024,6 +2054,9 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2150,10 +2183,12 @@ project-remember-projects-under count)) (defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." + "Forget all known projects that don't exist any more. +The behavior depends on `project-forget-zombies-method'." (interactive) (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) + (when (and (not (file-exists-p proj)) + (funcall project-forget-zombies-method proj)) (project-forget-project proj)))) (defun project-forget-projects-under (dir &optional recursive) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 17 Jun 2025 06:39:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 17 02:39:46 2025 Received: from localhost ([127.0.0.1]:52101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uRPz0-00027S-1g for submit <at> debbugs.gnu.org; Tue, 17 Jun 2025 02:39:46 -0400 Received: from relay15.mail.gandi.net ([2001:4b98:dc4:8::235]:44553) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1uRPyK-00022Q-RW for 77566 <at> debbugs.gnu.org; Tue, 17 Jun 2025 02:39:05 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id C2DD2442CF; Tue, 17 Jun 2025 06:38:56 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <8734bz16xp.fsf@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> <8734bz16xp.fsf@HIDDEN> Date: Tue, 17 Jun 2025 09:35:43 +0300 Message-ID: <87ikku27uo.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvkeejiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecuggftrfgrthhtvghrnhepffegteefveelhfeljeefueehieduiedtfffhuddtkeeffffghfevheetgeeukeehnecukfhppeeluddruddvledruddttddrjeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutddtrdejjedphhgvlhhopehmrghilhdrghgrnhguihdrnhgvthdpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvpdhrtghpthhtohepjeejheeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopegumhhithhrhiesghhuthhovhdruggvvhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomh X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 77566 Cc: Dmitry Gutov <dmitry@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > +(defcustom project-prune-zombie-projects 'exclude-remote > + "Automatically remove from project list projects that were deleted. > +If set to `exclude-remote' (default), remove deleted projects except > +those that are remote. > +If set to `all', include remote and no remote projects from being > +removed." > + :type '(choice (const :tag "Exclude remote projects" exclude-remote) > + (const :tag "All projects" all)) desktop-files-not-to-save supports a regexp to exclude remote. recentf-keep supports a predicate to exclude remote. project-list-exclude supports both: a regexp and a predicate. project-prune-zombie-projects could do the same. > +(defcustom project-inhibit-message nil > + "Non-nil means any project command will not display messages in echo area. > +The messages are displayed in the messages buffer but it won't > +be shown in the echo area." Instead of creating numerous options for every command that emits messages, the new way is to customize a list of messages: (add-to-list 'set-message-functions 'inhibit-message) (add-to-list 'inhibit-message-regexps "project was found") (add-to-list 'inhibit-message-regexps "project was forgotten") ...
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 17 Jun 2025 01:41:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 16 21:41:04 2025 Received: from localhost ([127.0.0.1]:49968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1uRLJv-00031u-Aw for submit <at> debbugs.gnu.org; Mon, 16 Jun 2025 21:41:04 -0400 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:43399) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1uRLJr-00030d-Oe for 77566 <at> debbugs.gnu.org; Mon, 16 Jun 2025 21:41:01 -0400 Received: by mail-ot1-x344.google.com with SMTP id 46e09a7af769-73a45bb28f1so1079415a34.1 for <77566 <at> debbugs.gnu.org>; Mon, 16 Jun 2025 18:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750124453; x=1750729253; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=5g2tjeRZTCW4PFfGC9Bm90pRFVTEzT9MebDURy8E3D8=; b=mM1uNNpEqvEWzHfT+VDb/sg4J5xQtSa+nN24jEGpcvBFMRkWpOYGnn7QK4B9poYSz/ VNVVK8NwYkbwSpnjZ46nHy/pc6LYjQ/SrRZ9gEXXqg3G8UUivwb6xVFFDGdonZ+aTNqS DDefDhhFL5Y0KZc+Bbn+lfXiu+tevqEqeselLp3WRrzh5QO4aAJdwE4Lefgm2iKqGJnQ EhAF5HQpLLcvsvjwtAxHL3b1Wg9hn5Yn21EI/sH5jD8/eEmpZnIfqfnLAjSt8ynh35rB vpTBdpqwMrRijHgO65dGGhVEfTHlyGS0TSCmQfT1U4FVw0DsZwE+ElSQDNxtwLE++Ypd 2MHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750124453; x=1750729253; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5g2tjeRZTCW4PFfGC9Bm90pRFVTEzT9MebDURy8E3D8=; b=jjqGcCVpxYywVrmthh1lBrT5Oddx/8V6spTWi+SF7Rkc02AV/MsOt91GEt8TnH11Zm S2lxTQdRHkA2d3gApkbzwTrE5axyJ/Bsxa9dEdCKJoufaJO00AsmbxKj04Pvojnben2P bjyM7CM6Qk7nO6HPiHrLqNUeVnZWgPoj8kiOb0ZW0c79pyJ+xkvgU15KQrGSypAXOiIr z0ZOnGmwp96FFceQ+OSCj0nxmqVS2WYo/C06jaudKteUtzqSD4T+82IEh1IZ3H78sW4E WLvcfJF+SO7F7AhE5H9HcPM+BYqPP3sXJiBcY+EfHl9CrSdcKxom7Y5D2CNd9zKvizAt WIQg== X-Gm-Message-State: AOJu0Yx+gugTv9ckFuidZHRmm9vxyc6+YTUjiNWrE/cSx91XV8cG4VyJ ueCDI1SOYOu4sxQSSu/sy22IBlPthAgZiLLSKk3IYLHpfSIrqIE86mvUgNybb3vw X-Gm-Gg: ASbGncsYSlfpIZpRZE7fAaz+gBCZr0kntwZIrwrZvk5gbzJruiJ2V4qXrzrWwKC6wYR elEUzaitRqj8BXZEou2GpFmzvEiKGoeWB38kJw6JslKhsSYOvuQZilckIOg99kAQlM/tiCdJu3s UfKegLxMSNEhNsd5/QzzCbE0OAD++qaExY4CR9wePvOHX/92Ycc5yFo//0BOG9w0CP+hZP6ItH2 iO7IkLLWuDZbrETBKZI5fUupxPjinH261drJ5zgG4UozzrVK+0K26WsM2agXsUG+oL6yZJ8XyDY 18DLuhOHPK3akilG8VDKCkiCGjkVyQ== X-Google-Smtp-Source: AGHT+IFHlqw44IFAZP6xwFQbcLneEoAJcuTYV/e0xcjAIVX3B69iXmsBk9u7rdGeQAEffTb6Woxnaw== X-Received: by 2002:a05:6808:6412:b0:407:39f1:ac80 with SMTP id 5614622812f47-40a9aa8ea16mr491997b6e.5.1750124453194; Mon, 16 Jun 2025 18:40:53 -0700 (PDT) Received: from fedora ([2806:10ae:e:998c::1]) by smtp.gmail.com with ESMTPSA id 5614622812f47-40a7418b932sm1665464b6e.40.2025.06.16.18.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jun 2025 18:40:52 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87h62wfylq.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> <87h62wfylq.fsf@HIDDEN> Date: Mon, 16 Jun 2025 19:40:50 -0600 Message-ID: <8734bz16xp.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain I don't know if there is still interest in this, but I am sending here the patch rebased to the current master branch --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-automatically-delete-non-existent-projects.-Bu.patch From 37165b2045b58a71d8240092a4d2eb9daf4de605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Tue, 8 Apr 2025 22:30:28 -0600 Subject: [PATCH] Allow automatically delete non-existent projects. (Bug#77566) And allow inhibit 'project.el' messages. * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects) (project-inhibit-message): New user options. (project-forget-zombie-projects): Add new function argument for include projects that are remotes, by default it exclude them. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call `project-forget-zombie-projects' but inhibit its message. (project-kill-buffers, project-remember-projects-under) (project-forget-projects-under): Inhibit message if `project-inhibit-message' is non-nil. --- etc/NEWS | 18 ++++++++++++ lisp/progmodes/project.el | 59 ++++++++++++++++++++++++++++++++------- 2 files changed, 67 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 0c66ac38105..506978783e0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -425,6 +425,24 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option automatically removes projects from 'project-list-file' +that cannot be accessed when prompting for a project. +By default it is set to 'exclude-remote', which exclude remote projects +from being removed. If set to 'all', include remote and no remote +projects from being removed. + +--- +*** New user option 'project-inhibit-message'. +This option, if non-nil, project commands will not display messages +in echo area. + +--- +*** New optional argument INCLUDE-REMOTES for 'project-forget-zombie-projects'. +This argument tells 'project-forget-zombie-projects' to include remote +projects from being forgotten. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5cf9a68a294..2e16b269775 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1562,6 +1562,25 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects 'exclude-remote + "Automatically remove from project list projects that were deleted. +If set to `exclude-remote' (default), remove deleted projects except +those that are remote. +If set to `all', include remote and no remote projects from being +removed." + :type '(choice (const :tag "Exclude remote projects" exclude-remote) + (const :tag "All projects" all)) + :version "31.1" + :group 'project) + +(defcustom project-inhibit-message nil + "Non-nil means any project command will not display messages in echo area. +The messages are displayed in the messages buffer but it won't +be shown in the echo area." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1829,7 +1848,8 @@ project-kill-buffers (yes-or-no-p (format "Kill %d buffers in %s? " (length bufs) - (project-name pr)))))) + (project-name pr))))) + (inhibit-message project-inhibit-message)) (cond (no-confirm (mapc #'kill-buffer bufs)) ((null bufs) @@ -1914,7 +1934,12 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if-let* (project-prune-zombie-projects + ((consp project--list)) + (inhibit-message t)) + (project-forget-zombie-projects + (eq project-prune-zombie-projects 'all))))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1995,6 +2020,10 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects + (eq project-prune-zombie-projects 'all))) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -2024,6 +2053,10 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects + (eq project-prune-zombie-projects 'all))) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2129,7 +2162,8 @@ project-remember-projects-under (directory-files dir t))) (known (make-hash-table :size (* 2 (length project--list)) :test #'equal)) - (count 0)) + (count 0) + (inhibit-message project-inhibit-message)) (dolist (project (mapcar #'car project--list)) (puthash project t known)) (dolist (subdir dirs) @@ -2149,12 +2183,16 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." - (interactive) - (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) - (project-forget-project proj)))) +(defun project-forget-zombie-projects (&optional include-remotes) + "Forget all known projects that don't exist any more. +This don't include remote projects, set INCLUDE-REMOTES to non-nil for +include remote projects from being forgotten." + (interactive "P") + (let ((inhibit-message project-inhibit-message)) + (dolist (proj (project-known-project-roots)) + (when (or (and include-remotes (not (file-exists-p proj))) + (not (and (file-remote-p proj) (file-exists-p proj)))) + (project-forget-project proj))))) (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. @@ -2165,7 +2203,8 @@ project-forget-projects-under Display a message at the end summarizing what was forgotten. Return the number of forgotten projects." (interactive "DDirectory: \nP") - (let ((count 0)) + (let ((count 0) + (inhibit-message project-inhibit-message)) (if recursive (dolist (proj (project-known-project-roots)) (when (file-in-directory-p proj dir) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 10 Apr 2025 04:07:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 10 00:07:57 2025 Received: from localhost ([127.0.0.1]:43150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2jCm-0000Ow-Tn for submit <at> debbugs.gnu.org; Thu, 10 Apr 2025 00:07:57 -0400 Received: from mail-oa1-x42.google.com ([2001:4860:4864:20::42]:45338) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u2jCk-0000OX-1k for 77566 <at> debbugs.gnu.org; Thu, 10 Apr 2025 00:07:55 -0400 Received: by mail-oa1-x42.google.com with SMTP id 586e51a60fabf-2c1caacc1f7so184162fac.3 for <77566 <at> debbugs.gnu.org>; Wed, 09 Apr 2025 21:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744258068; x=1744862868; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=L2QF5Dp97IqSTgRCS2XShRh8AHJUzHEdr0z/Etazwdg=; b=WFtAo1PWRzm2Geg518K9K/zJtrfF+UH1D7nwZ1mUy6NjQotGhZwj5GxFr7Gex3dn40 jQdL2B9h4uId0vhMCBjv5gJAHNd/Adc+bnWuJNBT5Bj8BGfoFK/sc/MjWW6COVMKvwhe 4+feCRGaAbZXh3ZHPrQ/TBtOR7HJSQCogWeembC0HdIEjcZoeB5n3HT1qb7uoxXQ53gq AAnWbt4mK6e3ZNM5EJ5iD8ry1amZbwQhpeBpHQ9Mm6xOGpXxxX6V5y2eoEwC4G3Yt1Jp H2uCEnsuXJY7veOZOS0wYQ4VQ9abJofQL0dSR/D+SD36jmdUCBNH74Qkb6ugJQEESzRH NAhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744258068; x=1744862868; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L2QF5Dp97IqSTgRCS2XShRh8AHJUzHEdr0z/Etazwdg=; b=Mu5znGUrr+KAVA48j4h+w66IJSoTtCxB6UScvrikwG5sFO7gFBAPE0FIlCds26UUPa eaehMo2Xg7UBm+wiF95LqaQ9hW5JBZgDWJNFvOtfeWS9vA3TivH0P2fGMslMuMLWRF2x I1dHX7BcdzsUk2UoeCFWOhWD2ADHYnTs7BnP2U+wWiqTaTsl9Tx9XnrQxNfgdO0GOMwe wjOBNEsaRS3Qw2alw903gCuv5lQcn0E4iLeLNweX4qq8f6ai0fMSyoojDqCPsbKoUmCO AKFRcqQ7bCU6551luluvOpV2bwYWfDMSs14oy8Kxsl0n+H4/Nr15ZHfqv0zBPMJAuPJb 6MPA== X-Gm-Message-State: AOJu0YytLcTOPou9fwluNLUlM0sTgBJTq5x2ACiK1ZK1fLC8hZlTUKJr +Jy94jHNXllign+kE103J+Iupq2QAMc+RF18meQDd8pBopwojubq X-Gm-Gg: ASbGncsR3H1R9yLs7QXeA3kaK17olRyBwxuvXQ43Acpzhl5Vu3LeIW5m0G2k+EtsSDo Jc+xjM41obW8tSBorgKIT9ThkQR/U6kgdso2YCRqquys26AF3uv/wdxoS1xGaDD0EJQ/WmSvixe iTdyyaiyUVKMStN/RasBG15LmhnJFpHrVgf7niSopkaal7vKmqNl3/iRmkRS/mcNLN0gDNCX2JB fssPdkqKSa6arfqNAxlL4DqwvnLKoPlGWVW2J80HQU+iH2av1SCPjNVTBI3QV6mxZh4KiMfLyu8 ECbXjjiK X-Google-Smtp-Source: AGHT+IFipmrPdSe6pVxOpsaTxStFg1RL8fRhi+uOqsidnVjvTjQ6IPoUBHx9ytOUTcRlnb6nAu6kIQ== X-Received: by 2002:a05:6870:ef0c:b0:2c2:dfbb:2dbd with SMTP id 586e51a60fabf-2d0b359ebd5mr730047fac.8.1744258067773; Wed, 09 Apr 2025 21:07:47 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72e73e6735esm427283a34.59.2025.04.09.21.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Apr 2025 21:07:47 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> Date: Wed, 09 Apr 2025 22:07:45 -0600 Message-ID: <87h62wfylq.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dmitry Gutov <dmitry@HIDDEN> writes: > On 09/04/2025 22:28, Elijah Gabe P=C3=A9rez wrote: >> Dmitry Gutov <dmitry@HIDDEN> writes: >>=20 >>> On 09/04/2025 07:23, Elijah Gabe P=C3=A9rez wrote: >>>> Instead what about purge it once after emacs startup? >>> >>> I think a concern was voiced that during a long-running session directo= ries can get removed at any time. >>> >>> + (project-forget-zombie-projects nil t)))) >>> >>> Are we sure that we want to suppress the messages about the removals in= this case? Personally, I'd just print it in any case (if some were removed= anyway). >> It would display the message after `startup-echo-area-message'. >> I think it would be intrusive. > > Do we read the project list at startup? Apparently no, I didn't notice it's just my configuration that does it. >> I've changed it to `inhibit-message' instead, which will include >> the message into *Messages* buffer but will not be displayed. > > That's fine too, although we probably do want to show it when called inte= ractively. Sure. I've added it as an user option. >>> +(defun project-forget-zombie-projects (&optional no-remote no-message) >>>> + "Forget all known projects that don't exist any more. >>>> +If NO-REMOTE is non-nil, don't forget remote projects. >>> >>> Maybe NO-REMOTE should be called INCLUDE-REMOTE instead? >>> >>> Right now it sounds like the opposite of its actual meaning. >> I think EXCLUDE-REMOTES would be a better name, >> the INCLUDE-REMOTE name would give the impression that it does not >> delete remote projects by default. `project-forget-zombie-projects' by >> default includes remote and no remote projects. > > Don't we want to avoid remote projects by default? It might take a long t= ime. Does it here in my testing anyway. > > Having the "fast" path to be the default and the "thorough" as the prefix= command alternative seems to be a common approach. You are right, I've change it for exclude remote projects by default. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-for-automatically-delete-non-existent-pro.patch From f5e9ac3a37eb74a979c6bf803316c3f3a25fe4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Tue, 8 Apr 2025 22:30:28 -0600 Subject: [PATCH] Add option for automatically delete non-existent projects. (bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects) (project-inhibit-message): New user options. (project-forget-zombie-projects): Add new function argument for include projects that are remotes, by default it exclude them. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call `project-forget-zombie-projects' but inhibit its message. (project-kill-buffers, project-remember-projects-under) (project-forget-projects-under): Inhibit message if `project-inhibit-message' is non-nil. --- etc/NEWS | 17 +++++++++++ lisp/progmodes/project.el | 59 ++++++++++++++++++++++++++++++++------- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc63d03eafe..0e021a06ec2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,23 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option automatically removes projects from 'project-list-file' +that cannot be accessed when prompting for a project. +By default it is set to 'exclude-remote', which exclude remote projects +from being removed. If set to 'all', include remote and no remote +projects from being removed. + ++++ +*** New user option 'project-inhibit-message'. +This option, if non-nil, project commands will not display messages +in echo area. + +*** New optional argument INCLUDE-REMOTES for 'project-forget-zombie-projects'. +This argument tells 'project-forget-zombie-projects' to include remote +projects from being forgotten. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e2cd5bfa231..78266c6682d 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1551,6 +1551,25 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects 'exclude-remote + "Automatically remove from project list projects that were deleted. +If set to `exclude-remote' (default), remove deleted projects except +those that are remote. +If set to `all', include remote and no remote projects from being +removed." + :type '(choice (const :tag "Exclude remote projects" exclude-remote) + (const :tag "All projects" all)) + :version "31.1" + :group 'project) + +(defcustom project-inhibit-message nil + "Non-nil means any project command will not display messages in echo area. +The messages are displayed in the messages buffer but it won't +be shown in the echo area." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1803,7 +1822,8 @@ project-kill-buffers (yes-or-no-p (format "Kill %d buffers in %s? " (length bufs) - (project-name pr)))))) + (project-name pr))))) + (inhibit-message project-inhibit-message)) (cond (no-confirm (mapc #'kill-buffer bufs)) ((null bufs) @@ -1888,7 +1908,12 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if-let* (project-prune-zombie-projects + ((consp project--list)) + (inhibit-message t)) + (project-forget-zombie-projects + (eq project-prune-zombie-projects 'all))))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1963,6 +1988,10 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects + (eq project-prune-zombie-projects 'all))) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -1992,6 +2021,10 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects + (eq project-prune-zombie-projects 'all))) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2097,7 +2130,8 @@ project-remember-projects-under (directory-files dir t))) (known (make-hash-table :size (* 2 (length project--list)) :test #'equal)) - (count 0)) + (count 0) + (inhibit-message project-inhibit-message)) (dolist (project (mapcar #'car project--list)) (puthash project t known)) (dolist (subdir dirs) @@ -2117,12 +2151,16 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." - (interactive) - (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) - (project-forget-project proj)))) +(defun project-forget-zombie-projects (&optional include-remotes) + "Forget all known projects that don't exist any more. +This don't include remote projects, set INCLUDE-REMOTES to non-nil for +include remote projects from being forgotten." + (interactive "P") + (let ((inhibit-message project-inhibit-message)) + (dolist (proj (project-known-project-roots)) + (when (or (and include-remotes (not (file-exists-p proj))) + (not (and (file-remote-p proj) (file-exists-p proj)))) + (project-forget-project proj))))) (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. @@ -2133,7 +2171,8 @@ project-forget-projects-under Display a message at the end summarizing what was forgotten. Return the number of forgotten projects." (interactive "DDirectory: \nP") - (let ((count 0)) + (let ((count 0) + (inhibit-message project-inhibit-message)) (if recursive (dolist (proj (project-known-project-roots)) (when (file-in-directory-p proj dir) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 9 Apr 2025 23:54:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 09 19:54:40 2025 Received: from localhost ([127.0.0.1]:42730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2fFg-0000pn-8H for submit <at> debbugs.gnu.org; Wed, 09 Apr 2025 19:54:40 -0400 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]:39473) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u2fFd-0000pV-VO for 77566 <at> debbugs.gnu.org; Wed, 09 Apr 2025 19:54:38 -0400 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 16A1A114010B; Wed, 9 Apr 2025 19:54:32 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 09 Apr 2025 19:54:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744242871; x=1744329271; bh=vvcK/rAhMdtXd22PeG6jv+EKAQflgdFm5UCNAaydmwE=; b= DwJudWzXkXbeREqhLMP86mfYfadRLOkeZcIqS5q9zTCG0Y2QSKRInEQWvlQOL/Hm 7PI0UXJMQRrKmPinOZkwL+7Fexin95O5sDAIn2dXSqMT0BZ0yqxLmdN4Cogyf78N QbtswXmTG3M9IChHfdviwx9mLUF3aL3o+VfpU9mFt8HsYDhpS9aYb7zlCUIaD2bX dkhb4UIgzoWMB2eLxBWVPzEep8Y8qpd9X0Ic+ITnbVe4rRK7CllcCCvQM0w6qs7i PK9lkxH/AJLA8Gn/lE2ZabA/wsA1itdRetcxGwmfqFxwTb3aDIejo8bMDZsyXIxH ynJJSrIZ0hC0lELmCMjGCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744242871; x= 1744329271; bh=vvcK/rAhMdtXd22PeG6jv+EKAQflgdFm5UCNAaydmwE=; b=m 4Ak8tEHdaU8JI0sAO8Z1NKMpGNp++NfSE1VsGJpdxjLgO9u2/YFBMx+WJKEnGwAd AGC++8tiyE1bOZv3T/w3Ko3hUl/Tz02luADYeDy8kilDVW4VriUpJHK331QBcEXY iXXBI6+Yja1yS2FIzLVpNRjgAt6FpD3tqnXycBkRJ2WQFc/uD3sLGF9VTvaIr4Lx 5WSWG6uSi1VbBx6yMXWlAH8lxG+X4rcds/vDeictJWz5nY8SpY5iYQ4OOJ3F3RWR GBDU1e1c1CADyZDXlYeBKm/QnTjV9SQKkU9X8yHseeeLibQYqkKJXmW3fzvUQ+lv aIP0fX4Wop/BuyR4MUymA== X-ME-Sender: <xms:twj3Z6auWMhHDmqSx2AJaaP7Sa_0_jzovbCYKhDcuDAco6oYnXExUA> <xme:twj3Z9acqTdgKzkNL-V45BEYFuyaWTev6ip45SvtJiV73V-JNg1ZqRIBels4-wmjQ WhyaCpkn6-1GNaRmQs> X-ME-Received: <xmr:twj3Z09jyDZGc2RMzhAqlepUQTRz9H73geEOyfuVhx7tK_RmOgHAAUDxwLBt-F-2XYzR> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdejfeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddt vdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovh druggvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeet veegtedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht thhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvgheigedvieduieesgh hmrghilhdrtghomhdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdho rhhgpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: <xmx:twj3Z8quQrDpP86phCFJcvytTh94FRal9WK3qLBqNqY5Lya_kaj8hg> <xmx:twj3Z1qs6X9VLbZMQ5stPH6rDSeOUNtUCEgyp6UWR_HtBUCKC4_DDw> <xmx:twj3Z6TaNdfe_qAogvkRVsZpH1XYo6TV-pJob0STVDTTQuuf1MSH7A> <xmx:twj3Z1oBKz6_jzzA7ba-LyvVx4mLk2rUUPFjVoxy_cPkEADzXAdYrA> <xmx:twj3Z6cSCo4QI0lHUaQtibz9ASd-PN0KoBiulbBEOJ5KtiINUU7HjY0I> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Apr 2025 19:54:30 -0400 (EDT) Message-ID: <9eac3b54-62fb-45fc-8e7d-628baf532ec5@HIDDEN> Date: Thu, 10 Apr 2025 02:54:27 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> <87h62x3zju.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87h62x3zju.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 09/04/2025 22:28, Elijah Gabe Pérez wrote: > Dmitry Gutov <dmitry@HIDDEN> writes: > >> On 09/04/2025 07:23, Elijah Gabe Pérez wrote: >>> Instead what about purge it once after emacs startup? >> >> I think a concern was voiced that during a long-running session directories can get removed at any time. >> >> + (project-forget-zombie-projects nil t)))) >> >> Are we sure that we want to suppress the messages about the removals in this case? Personally, I'd just print it in any case (if some were removed anyway). > > It would display the message after `startup-echo-area-message'. > I think it would be intrusive. Do we read the project list at startup? Even so, the message might only be there if there are projects to clean up. So it won't show up every time. > I've changed it to `inhibit-message' instead, which will include > the message into *Messages* buffer but will not be displayed. That's fine too, although we probably do want to show it when called interactively. >> +(defun project-forget-zombie-projects (&optional no-remote no-message) >>> + "Forget all known projects that don't exist any more. >>> +If NO-REMOTE is non-nil, don't forget remote projects. >> >> Maybe NO-REMOTE should be called INCLUDE-REMOTE instead? >> >> Right now it sounds like the opposite of its actual meaning. > > I think EXCLUDE-REMOTES would be a better name, > the INCLUDE-REMOTE name would give the impression that it does not > delete remote projects by default. `project-forget-zombie-projects' by > default includes remote and no remote projects. Don't we want to avoid remote projects by default? It might take a long time. Does it here in my testing anyway. Having the "fast" path to be the default and the "thorough" as the prefix command alternative seems to be a common approach.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 9 Apr 2025 19:28:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 09 15:28:17 2025 Received: from localhost ([127.0.0.1]:42178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2b5s-0002qC-CI for submit <at> debbugs.gnu.org; Wed, 09 Apr 2025 15:28:16 -0400 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:54509) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u2b5p-0002ps-GA for 77566 <at> debbugs.gnu.org; Wed, 09 Apr 2025 15:28:14 -0400 Received: by mail-ot1-x342.google.com with SMTP id 46e09a7af769-72c7336ed99so21530a34.0 for <77566 <at> debbugs.gnu.org>; Wed, 09 Apr 2025 12:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744226887; x=1744831687; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=gSSfEnkgWi3xIwFLpjfM/+TP4xnkjlj4Y6y3/VnM6cQ=; b=Bujw2u7hJAr5zvKOkOxk3RNq0hqhxTttzrALl0tMG+FjLSGGHUo+GH80iskIGfQcem zbja6ugz7/a+/a6abMsfI1qITpLL82APWmAADsdhdABAXt6CFU77mvnQa6nbWX1UG2NN taDIJYjY6bl1LAYqy0JEVLPaK30VKFDb7bzWrzO4UYSXUsrhavg1jCGk2B2XlFQVaSA9 zziA9mGHR2c0JOeeF2fsZUAqydI6+B2v1KerZUIpFokbCGO+brgp1FnsRYsZbhEEJQXK lmpGOcmAJGhYeDpLy5UBfeb9RNLThn8zzTIV9kZUEzgzOSVJchE78DQWWcTfiCEfJiOG OGTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744226887; x=1744831687; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gSSfEnkgWi3xIwFLpjfM/+TP4xnkjlj4Y6y3/VnM6cQ=; b=kBwx9J5jjTF2LTlfHv+C//qJsmlwkpR8d4UxT8oF9G435yuWC8LzrMzeV2GbXebvy+ oYFS9kYmQPO/rX/Vws0sIoLHC7fwnWmvRL6hZNbDlDgcNaLdFBqN2yJ37gzs4DaAjjVa kPT+KhhTFyVxqkY0K+cEZK9nJVQRWdF+n3XeXFqTjKaiN/U4MvLHpp47O2L/vljZwMa1 a+7WIvreMlcu88S68rzS7/QwDUzluZDyQHxSeO7wtMO6W8SDlp/7xozNPGzQ85QNshxo boC+tPVf2oHYrMZgHOoLPtWBI12FDSls2h3YIUjtpmCxl9RPncTFVUrUHA1fwQflnnRL qLUQ== X-Gm-Message-State: AOJu0YxX7GFyBLk8LmVYj8fbZtkbAiQ4jp4RprI6UCL/wVWGnJPh6tYR 0SjoxWNQMe0YhPzTLjr0dWxr/DO3UVX+XgYOyQ8xEdNivGdRYuRz X-Gm-Gg: ASbGncurMfW73M2yb43LLNyoRcLSfnyfZE+xFWk4Gyl/lJRib+EuSvtbjluJAgSIqzP mpKVoSXJjQ0B40NE8KFIn+aVbS9ks7RXX2fsuoFB2lafelkEaU+XJCEzZBSxL+p9PMF+IERAj9J ZsesJYWxGU9LcOKADKY9yKHLbF8EUwaxE7f2xOjRa4ImbxcWvqduCqOD9VGvZOCYML2DY0KWGtW Qnmez//ZmMlOO4jPjoYZkLk4izU9fkwbzVtXh2XRxiYth8QROffroN/j5s+3H4P8PBH6s6ryzq3 oJQ3PHlNMT6Xm9pe8jw= X-Google-Smtp-Source: AGHT+IGlFb8FONfgddHssqI6IoxOvlZZXjSQl/GhY6+R28t1tdrl7G4tt/LpoaIzHhGO9UEah+5JEQ== X-Received: by 2002:a05:6830:620d:b0:72b:9724:6a82 with SMTP id 46e09a7af769-72e7bb2b3demr101524a34.17.1744226887413; Wed, 09 Apr 2025 12:28:07 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72e73d51b15sm284711a34.1.2025.04.09.12.28.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Apr 2025 12:28:06 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> Date: Wed, 09 Apr 2025 13:28:05 -0600 Message-ID: <87h62x3zju.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dmitry Gutov <dmitry@HIDDEN> writes: > On 09/04/2025 07:23, Elijah Gabe P=C3=A9rez wrote: >> Instead what about purge it once after emacs startup? > > I think a concern was voiced that during a long-running session directori= es can get removed at any time. > > + (project-forget-zombie-projects nil t)))) > > Are we sure that we want to suppress the messages about the removals in t= his case? Personally, I'd just print it in any case (if some were removed a= nyway). It would display the message after `startup-echo-area-message'. I think it would be intrusive. I've changed it to `inhibit-message' instead, which will include the message into *Messages* buffer but will not be displayed. > +(defun project-forget-zombie-projects (&optional no-remote no-message) >> + "Forget all known projects that don't exist any more. >> +If NO-REMOTE is non-nil, don't forget remote projects. > > Maybe NO-REMOTE should be called INCLUDE-REMOTE instead? > > Right now it sounds like the opposite of its actual meaning. I think EXCLUDE-REMOTES would be a better name, the INCLUDE-REMOTE name would give the impression that it does not delete remote projects by default. `project-forget-zombie-projects' by default includes remote and no remote projects. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-for-automatically-delete-non-existent-pro.patch From 0feaabcf32428c97afc7967e4a51adaab88c290a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Tue, 8 Apr 2025 22:30:28 -0600 Subject: [PATCH] Add option for automatically delete non-existent projects. (bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects): New user option. (project-forget-zombie-projects): Add new function argument for exclude projects that are remotes. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call `project-forget-zombie-projects' but inhibit its message. --- etc/NEWS | 9 +++++++++ lisp/progmodes/project.el | 30 +++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc63d03eafe..bb71ac0b80b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,15 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option automatically removes projects from 'project-list-file' +that cannot be accessed when switching projects. + +*** New argument EXCLUDE-REMOTES for 'project-forget-zombie-projects'. +This function argument tells 'project-forget-zombie-projects' to +exclude remote projects from being forgotten. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e2cd5bfa231..34788a34954 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1551,6 +1551,13 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects nil + "Automatically remove from project list projects that were deleted. +If non-nil, remove deleted projects only when switching projects." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1888,7 +1895,11 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if-let* (project-prune-zombie-projects + ((consp project--list)) + (inhibit-message t)) + (project-forget-zombie-projects)))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1963,6 +1974,9 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -1992,6 +2006,9 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if-let* (project-prune-zombie-projects + (inhibit-message t)) + (project-forget-zombie-projects)) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2117,11 +2134,14 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." - (interactive) +(defun project-forget-zombie-projects (&optional exclude-remotes) + "Forget all known projects that don't exist any more. +If EXCLUDE-REMOTES is non-nil, exclude remote projects from being +forgotten." + (interactive "P") (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) + (when (or (and exclude-remotes (not (file-remote-p proj)) (not (file-exists-p proj))) + (not (file-exists-p proj))) (project-forget-project proj)))) (defun project-forget-projects-under (dir &optional recursive) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 9 Apr 2025 12:51:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 09 08:51:30 2025 Received: from localhost ([127.0.0.1]:38251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2Utt-00044m-N0 for submit <at> debbugs.gnu.org; Wed, 09 Apr 2025 08:51:29 -0400 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]:60591) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u2Uto-00044J-CE for 77566 <at> debbugs.gnu.org; Wed, 09 Apr 2025 08:51:27 -0400 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 44D422540104; Wed, 9 Apr 2025 08:51:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 09 Apr 2025 08:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744203078; x=1744289478; bh=3ixqrpe2/MwFfLmuERWav1NZMFEH3xc/lM805GUP9hM=; b= Us53bdMWsZIT12jGWvN3FCIO2q3MOvM8aGwXIr26Pm/StPB94UE4pjyGQZDk2KLx QtQz93UwgnR2NbeS5jYtdDnHAyBxN7aH99dPHy+S4vPKQU1sElVGAbRez0cDXsJL mTZBHgyzYvV6agB+6j5bQINbQ7PLfRuVxtdoUBS/w0NnwCTdHYhtsU8l5O6MqJ31 XYuFXYpFyIvxjvwuXICib+O3431pS4qBn/dKOIn+NMn/aaGd8H1LN/d9nj62rhNz flAAkWZByiNyhnxd1ihYjUpxAWLYr8F3ONL/MX9I9zeYl7/8JaBUMyjBlhl713KG 91lcau3oLQmm1DOS0/OHjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744203078; x= 1744289478; bh=3ixqrpe2/MwFfLmuERWav1NZMFEH3xc/lM805GUP9hM=; b=a VtwHQ+ZTF8gnBVgFw8onuKtHEhN4puCvLT97G/4FZSAgfODvDdyypweIxN2hwz97 qB/iJYvSWPU4XDAmjBYaOzRgC+u8fHNzHIDdEn5O/Eo8CyEQXvFIqZ24wLybGKn9 C0zVrztNpOtSnYZr/nqilAlFZohTGuCL5E2ixrBUHVE7jQ1jiFDhZbccu4NIzXHH s6frmYlZ+1zOxr9Xn+UD9vgtcoEHn1TrovKt9sc9wMAFCbCEzZx9h2eTstoH/7qR w/dDuIu77rlmushgsgkv93dvU2nNvuCxLVHbmG9Q6nDROOW++++EKKJB1kQ5OMuR ti3dHme8Of1kT3YoE/UIg== X-ME-Sender: <xms:RW32Z0LOgJno8zXL1xYQ4AgjHjrqbSO3jSzboBtXq8qhf4zZsXFQ9Q> <xme:RW32Z0I69b1wEpZhrXtpX8kH8BtMdAF-8kFpYXuM1ytHZaVvuXG_twuVNk1QqLpoi T_P9DaoT-CmykMruFk> X-ME-Received: <xmr:RW32Z0ty-RvQQUViDDk_nPbFgaxiBKOOlFIRJ2gJzN4FCPRJEtTBlL9fqqUqiB3Bbg> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtdeitdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddt vdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovh druggvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeet veegtedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht thhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvgheigedvieduieesgh hmrghilhdrtghomhdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdho rhhgpdhrtghpthhtohepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: <xmx:RW32ZxZ47LF_3gNGLCGPuy7glwbg_oMW2BxtKVSv6Y_pUEBlsiHgkg> <xmx:RW32Z7apHjqH2QB0udeTW58yB-UA_jUBij_sZmjAMA0dLULrMZ4dUg> <xmx:RW32Z9BiNhQMvsuwqErVvXXT9Xe9-sK0BCFMhiw2MoNJKV7LQGdujQ> <xmx:RW32ZxaETGL0WBQr2gma_nuBDzo3f2mO00Q-1x0INfQcKKDz2cmdIg> <xmx:Rm32Z5M9QiF_NnGma8r8H-tNhamLMlx-7T2DejvxTtb95lgAtN2uHmXC> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Apr 2025 08:51:16 -0400 (EDT) Message-ID: <dc5cc14c-e3ef-42b5-9273-35bdab8c4309@HIDDEN> Date: Wed, 9 Apr 2025 15:51:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> <87o6x6dku6.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87o6x6dku6.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 09/04/2025 07:23, Elijah Gabe Pérez wrote: > Instead what about purge it once after emacs startup? I think a concern was voiced that during a long-running session directories can get removed at any time. + (project-forget-zombie-projects nil t)))) Are we sure that we want to suppress the messages about the removals in this case? Personally, I'd just print it in any case (if some were removed anyway). +(defun project-forget-zombie-projects (&optional no-remote no-message) > + "Forget all known projects that don't exist any more. > +If NO-REMOTE is non-nil, don't forget remote projects. Maybe NO-REMOTE should be called INCLUDE-REMOTE instead? Right now it sounds like the opposite of its actual meaning.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 9 Apr 2025 04:23:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 09 00:23:42 2025 Received: from localhost ([127.0.0.1]:36653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u2MyT-0007zI-QG for submit <at> debbugs.gnu.org; Wed, 09 Apr 2025 00:23:42 -0400 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:43176) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u2MyQ-0007yz-Jh for 77566 <at> debbugs.gnu.org; Wed, 09 Apr 2025 00:23:40 -0400 Received: by mail-ot1-x344.google.com with SMTP id 46e09a7af769-72bceb93f2fso214849a34.0 for <77566 <at> debbugs.gnu.org>; Tue, 08 Apr 2025 21:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744172612; x=1744777412; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ddry1D3mbTnW5p72txPjuduF/QJRskPNV58onSGVX44=; b=SLXVeJFZokx6MF7gWwzRDahG0AoHy5ROkD6VtsNZbZokInMedVpktX5QMcZpy653FV HSXeY0Xcw34PfR8Sb2rb791AeN4KeWtdl3KQOyXrmC0S/oSehHYlhzspEFfv1CCFMk01 sFKhmFpecoy3wKLc+4n8ZEi50NQnwpkPlk51VCuw9TAwWvgvqTyV88qJnXlP/Kdm8gzK 0SJLjSQJrE4CZF4z/8uU4QjamKsE6F6Kx6uVxFyJINGwJMiK0/AsG9FauzZZf7RzxcPT PmThQEZwHGd0oZ+m4mj6U4tgWqwBg1R2iQ2dNwTA99Q9NW32JqwbwSVl8a4w1Kyml9D+ ygNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744172612; x=1744777412; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ddry1D3mbTnW5p72txPjuduF/QJRskPNV58onSGVX44=; b=U4732OQnBwuINv8lW7Vn3vBQ7q18i7egfnY7isOE4dBW5j8xlVUgXrufobnpaXfDxB CJLGw5G/oPOZomk66tv6UF+udnwzxhSPN/Z6EiRXoIbIsfmyLtjFEi/tG6lN/1U4EN2Q lPEawsorlbNeh9el2C8CozbmJlXzaGn19mHXZ/nulu8eJZfcOiLgkfTN0Qw4pXBrLwFG fqR5LVjEmCznVBmujmhKi9bJZZYyXA0lza/W2G+pjsLHKdNFtFfLnBYAUMDFPVo9V57c u91b2WIGP19EZcpkYULQmeqIuRZPNfCAkbS9reUf1fnnwpPcw7CU+Lm9cEG+ZZm8j/6g TPmA== X-Gm-Message-State: AOJu0YxFsNqlW3VUiX5lW40qgy9f0NhEVgN31/n5q8OgE5ngN5XXiTMU JSRO3YAARmYQknpyi5i1nlSm1CiFjYJMpfKLrnbGQBYewlL8sB4C X-Gm-Gg: ASbGnctwJAPu0gNnC0xdZgtGLTlnEbJFTTzQcCU3TuVgasdnNQAlIncVWpPzJRVkqm6 SXBj7hP3j/DDbuCcfO3x5pfsQ6GbPoFv1BFGMfDgh6+/OtthAFcFUcs7jSKe5PCArOZmtYfmtwm +89v3YHARGCBsFELfCEF2Zww/9+nZl98ogxm5RU8EMmZxHYZP41yEjYZRee+1iVD5DvtYMX8AfT JYqdehXtfhtve3djBzVlfrF7e6pdQlrtYDdnJN/j0Vkyw7QNZf4FTb3ckBqd6RVTIgMBYutSKRs T9UtzwVGYEv2 X-Google-Smtp-Source: AGHT+IFf11jamYHveMTopU9AShdAKlf8w7/NUHR0BG+O/oaqQD+bEPTW3WFLTyO9YhpYxM3/lFhH1w== X-Received: by 2002:a05:6830:6e8d:b0:72a:b78:1c5a with SMTP id 46e09a7af769-72e70c4f56fmr1013561a34.10.1744172612049; Tue, 08 Apr 2025 21:23:32 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72e73d8d90bsm48995a34.34.2025.04.08.21.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Apr 2025 21:23:31 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> Date: Tue, 08 Apr 2025 22:23:29 -0600 Message-ID: <87o6x6dku6.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Elijah Gabe P=C3=A9rez <eg642616@HIDDEN> writes: > Dmitry Gutov <dmitry@HIDDEN> writes: > > On 06/04/2025 03:29, Sean Whitton wrote: > > Thanks, though why do this only when switching projects? > > Why not do it proactively whenever fetching the list of projects? > > Performance concerns? > > I'm concerned about performance, yes. With my SSD, it takes about 4ms to= =20 > "clean up" ~70 projects. The number could be higher, and the hard drive= =20 > could be spinning media. > > Yeah, that is why i originally added it only when switching projects, pro= jectile does the same. > > So could someone point out what will we get by proactively cleaning up=20 > the list, rather than doing that only when a project is being prompted f= or? > > Maybe for ensure that the zombies were removed? > > For example, packages that use project--list for read the projects. > > Instead what about purge it once after emacs startup? Something like this patch(?), it now clean up when project-prompt-project-name or project-prompt-project-dir are being called and after project--list was initialized: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-for-automatically-delete-non-existent-pro.patch From 5fc38a5205d0c44f695453751352353212b3bd80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Sat, 5 Apr 2025 16:18:27 -0600 Subject: [PATCH] Add option for automatically delete non-existent projects. (bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects): New user option. (project--remove-from-project-list, project-forget-project): Allow not to show forgotten projects. (project-forget-zombie-projects): Add new function arguments. (project--ensure-read-project-list, project-prompt-project-dir) (project-prompt-project-name): Call `project-forget-zombie-projects'. --- etc/NEWS | 9 ++++++++ lisp/progmodes/project.el | 43 ++++++++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc63d03eafe..057f08776f1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,15 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option automatically removes projects from 'project-list-file' +that cannot be accessed when switching projects. + +*** New argument NO-REMOTE for 'project-forget-zombie-projects'. +This function argument tells 'project-forget-zombie-projects' not to +forget projects that are remote. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e2cd5bfa231..5c2e0b358a2 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1551,6 +1551,13 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects nil + "Automatically remove from project list projects that were deleted. +If non-nil, remove deleted projects only when switching projects." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1888,7 +1895,9 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list) + (if (and project-prune-zombie-projects (consp project--list)) + (project-forget-zombie-projects nil t)))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1933,26 +1942,27 @@ project-remember-project project-list-exclude) (project--remember-dir root no-write)))) -(defun project--remove-from-project-list (project-root report-message) +(defun project--remove-from-project-list (project-root report-message &optional no-message) "Remove directory PROJECT-ROOT of a missing project from the project list. If the directory was in the list before the removal, save the -result in `project-list-file'. Announce the project's removal -from the list using REPORT-MESSAGE, which is a format string -passed to `message' as its first argument." +result in `project-list-file'. If NO-MESSAGE is non-nil, +Announce the project's removal from the list using REPORT-MESSAGE, +which is a format string passed to `message' as its first argument." (project--ensure-read-project-list) (when-let* ((ent (assoc (abbreviate-file-name project-root) project--list))) (setq project--list (delq ent project--list)) - (message report-message project-root) + (unless no-message (message report-message project-root)) (project--write-project-list))) ;;;###autoload -(defun project-forget-project (project-root) +(defun project-forget-project (project-root &optional no-message) "Remove directory PROJECT-ROOT from the project list. PROJECT-ROOT is the root directory of a known project listed in -the project list." +the project list. +If NO-MESSAGE is non-nil, don't display a message about project removed." (interactive (list (funcall project-prompter))) (project--remove-from-project-list - project-root "Project `%s' removed from known projects")) + project-root "Project `%s' removed from known projects" no-message)) (defvar project--dir-history) @@ -1963,6 +1973,7 @@ project-prompt-project-dir It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." (project--ensure-read-project-list) + (if project-prune-zombie-projects (project-forget-zombie-projects nil t)) (let* ((dir-choice "... (choose a dir)") (choices ;; XXX: Just using this for the category (for the substring @@ -1992,6 +2003,7 @@ project-prompt-project-name see `project-list-file'. It's also possible to enter an arbitrary directory not in the list. When PROMPT is non-nil, use it as the prompt string." + (if project-prune-zombie-projects (project-forget-zombie-projects nil t)) (let* ((dir-choice "... (choose a dir)") project--name-history (choices @@ -2117,12 +2129,15 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." - (interactive) +(defun project-forget-zombie-projects (&optional no-remote no-message) + "Forget all known projects that don't exist any more. +If NO-REMOTE is non-nil, don't forget remote projects. +If NO-MESSAGE is non-nil, don't display a message about projects removed." + (interactive "P") (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) - (project-forget-project proj)))) + (when (or (and no-remote (not (file-remote-p proj)) (not (file-exists-p proj))) + (not (file-exists-p proj))) + (project-forget-project proj no-message)))) (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 8 Apr 2025 06:28:00 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 08 02:28:00 2025 Received: from localhost ([127.0.0.1]:58433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u22RE-0003my-2X for submit <at> debbugs.gnu.org; Tue, 08 Apr 2025 02:28:00 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:51973) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u22RA-0003mK-Uq for 77566 <at> debbugs.gnu.org; Tue, 08 Apr 2025 02:27:57 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 0C49C4433D; Tue, 8 Apr 2025 06:27:45 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <1cc09ffc-0c5c-4409-b74c-3b59a588e8d4@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> <87plhnq0sk.fsf@HIDDEN> <1cc09ffc-0c5c-4409-b74c-3b59a588e8d4@HIDDEN> Date: Tue, 08 Apr 2025 09:20:22 +0300 Message-ID: <87jz7vi3ox.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddvfeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomhdprhgtphhtthhopegumhhithhrhiesghhuthhovhdruggvvh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org, Ship Mints <shipmints@HIDDEN>, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Instead of desperately cleaning zombies that are popping up again and again, >> I'd prefer an option with a list of directories that should be never added >> to the project list. > > I think we have that in the recently added option project-list-exclude. Ok, this works nicely: (define-advice project-forget-projects-under (:after (dir &optional _recursive) remember) (add-to-list 'project-list-exclude dir))
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 8 Apr 2025 02:33:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 22:33:14 2025 Received: from localhost ([127.0.0.1]:57843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1ym2-0002eC-JC for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 22:33:14 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:44476) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1u1ylz-0002df-Lj for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 22:33:12 -0400 DKIM-Signature: a=rsa-sha256; b=yrP3d8rUmUiDE4U9nZcDZfDdliwJEogss3N8zTDqyCYWq9g0wpNbhp1R7QCUYZcgGIUXcJNxy3XlPYWxJlzbDksgcMT1OqARML/EipLIktrgsIAYGkB46apr5GLjdZxkouxHDXS18AR54nh2M93D1TRCqJDL2+RAsnbLfZYM2kJwV/0AqJ5dsv+jgByx9rcJhI8upDr9DpbKZx829R3KMNEFTsGHjPWNWPu5xhVaQxUSSUHaBJPe1CYpl1cFln11kde8FxYLzNI70oRgglLmGrTQKhP8N8MbXb/sgdF+N9V47feW0aRWIxeGWSLd0A2qdK12ikOnxr9wV0kjnWejTg==; s=purelymail1; d=spwhitton.name; v=1; bh=CZVk+0SQQdtsu0HYOfygMM9+Ki+uXIL6AOjrHj0Xgv4=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=G40btHfqiUMF868UKtUf3lcZrWLfwWD/MvS+D+GcDqap+jCe3ZX2HSldNYZW3Aq/shuna2OST4bEq5vzEt5oXEIQClyuRgy9LKRyTe8eYc1rRGe9GpDw17zddI0dbs3NskgDfh9TJj6pcjShRz4SjrJzEA53oDhblXlgAWtAn8+z/WC5rIhiI042Du54SoqogKfeRdYzL2Ss/s4aDpD9mDrSJHBlIs9RIlS3MziHQewAKbeisLOJezdKUU6OT9P5Cur1poctM+XFznsbuCSyKDGMHxC6AY0SqVMKCmiFxT+OlhyPoLA3cCqbF36+0idcdxaX8jkBY1b9mqJieigv0A==; s=purelymail1; d=purelymail.com; v=1; bh=CZVk+0SQQdtsu0HYOfygMM9+Ki+uXIL6AOjrHj0Xgv4=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 77566 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 68380104; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 08 Apr 2025 02:33:04 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 0A70C7EF730; Tue, 08 Apr 2025 10:33:00 +0800 (CST) From: Sean Whitton <spwhitton@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> Date: Tue, 08 Apr 2025 10:33:00 +0800 Message-ID: <87zfgridr7.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77566 Cc: Elijah Gabe =?utf-8?Q?P=C3=A9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello, On Mon 07 Apr 2025 at 08:34pm +03, Dmitry Gutov wrote: > On 06/04/2025 03:29, Sean Whitton wrote: >> Thanks, though why do this only when switching projects? >> Why not do it proactively whenever fetching the list of projects? >> Performance concerns? > > I'm concerned about performance, yes. With my SSD, it takes about 4ms to > "clean up" ~70 projects. The number could be higher, and the hard drive could > be spinning media. > > So could someone point out what will we get by proactively cleaning up the > list, rather than doing that only when a project is being prompted for? I see, yes. Doing it only when switching projects seems good to me. -- Sean Whitton
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 8 Apr 2025 01:34:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 21:34:33 2025 Received: from localhost ([127.0.0.1]:57730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1xrE-0006ih-Q0 for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 21:34:33 -0400 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]:51424) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u1xrC-0006i9-1h for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 21:34:30 -0400 Received: by mail-qk1-x744.google.com with SMTP id af79cd13be357-7c08fc20194so962129285a.2 for <77566 <at> debbugs.gnu.org>; Mon, 07 Apr 2025 18:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744076064; x=1744680864; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/ZPmYundOey57cj8+xtyvJohXngYi84MSpPdbdsgiPM=; b=WoMOTZzgawG9IArOxVgqPbwdsji/1CcIgsZnTo3ghb+lutE/rQPxe8Ryqf5TkirOuM C8qMzsk6E3rt0F0dSYcKHafLExlPRt/YwQwdc2V0a9UMhYPw/imeWyhqwRi76r7LgNJc lJ+4DGL/TPkGCi1pwf9aGGYilBYiQw33qi3KXISXRDvXgj3fDvtNUjPNHL8ym5yHbVD2 iqWWH/ZKkPGFqPvRcbEc67V1UC0J/UlACz94MUNXNpXzJq3N4gKpNSJ5aIcSORv49o46 nHUITYbMrVzA02G96TUoZ17oczHGS566ncJe7fM+UcKJBLwGzC/0aZHGVBDRKIcxFJx4 d3IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744076064; x=1744680864; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/ZPmYundOey57cj8+xtyvJohXngYi84MSpPdbdsgiPM=; b=LxBPv58kE95UKrThUOrVpId3T86N6KsaIw/j40mWpSNwMG9lSPyh0C1O+4le85+Lbe +6vHl6zZHda2yus531Jyie2KhZeFG0P/5wpIPAfZ0b05kw5asspxPW5pgADNYYMacX4F aG/LayYRYRiQiH+WXJzk/8Ps8uTL8LkZNHj/ojukOK6w133h+vkV+0SkU5XAQL2W1+2H HM7zaqfLeAcBPfP2QEmoIYoPvH+mh3kN9cHI8nVI0usa2WcqQf6LTHHgK3cu6I9M2fAE TOa3zWXdPEBUxn/jyVm3ydUwCIx+viQys3ux/Ymg+RVCk0tSeDaPtxP2TSjfYdboff8g sVfA== X-Forwarded-Encrypted: i=1; AJvYcCVk9I+nGIThVhcBYG5XlZ2109Oi7VxehJiJHOJd854O2hEDbT/0dJrqkweQPDZ2+0JTXw5+Gw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Ywq65gZ/60KwR/PoE+Wa4ECf4rmd+P/ZHqkg2mikyoPrDAi8udR 5o1TsAKVJ5Njiwkakz38+8DxvOpA5ckythel2aKdr6KXEbqEmTDXJOGuvtnIXEgQIgIIbwLwcxo 9LeVBo/D4OsVN9QuUgZ7r0UnlmlM= X-Gm-Gg: ASbGncvpCdkV59PGEOYbST7j94OY8n6c/Sk/PnLodELIL5aQwNtDBSwQe4O4tBAUFNW 3YXPlAayYaktDyhNTwGkj80NQpnKVtcndrckRS72nUfzg2wf87DioHNymUiMllMpTJAPobesEcK FvBZ2DKtZfAXiP/xP7fjFZFjpKIMXYw8OUR2490UneaEzFGwwiTfLtTA== X-Google-Smtp-Source: AGHT+IHLEKyAIWclAmjlxwJk/cywhK63t+m7e/HU/sqPgqg1V9F4c7z3UaORMqlkIKFtqsA7quowbUznHFvQ50+1FLI= X-Received: by 2002:ae9:e30a:0:b0:7c5:99a6:7883 with SMTP id af79cd13be357-7c774dfadbamr2436516685a.54.1744076064211; Mon, 07 Apr 2025 18:34:24 -0700 (PDT) MIME-Version: 1.0 References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> In-Reply-To: <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> From: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> Date: Mon, 7 Apr 2025 19:34:12 -0600 X-Gm-Features: ATxdqUFfbFRAfVo1dyC9SFKhBRxID5arQ3bS2sUeDl1_Dyu9089aLDwl-RaWdf4 Message-ID: <CACnP4NJQG-htOT6qXtZqCB3W-duOzzA_SAvCO8Cb=daAaEqiCA@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Dmitry Gutov <dmitry@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000044c89006323a5a20" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Ship Mints <shipmints@HIDDEN>, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --00000000000044c89006323a5a20 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dmitry Gutov <dmitry@HIDDEN> writes: > On 07/04/2025 03:39, Elijah Gabe P=C3=A9rez wrote: > > +(defcustom project-prune-zombie-projects nil > > + "Automatically remove from project list projects that were deleted. > > +If set to `all', remove projects when project list file > > +is being read or written. > > +If set to `list-read', only remove projects when project list file > > +is being read. > > +If set to `list-write', only remove projects when project list file is > > +being written. > > That's a lot of alternatives. Do we have a picture of the users who > would use each of the values? > AFAIK, no, I would honestly prefer just a booelan, this can be confused. And speaking of remote projects, maybe we should add a prefix argument > to project-forget-zombie-projects instead of an option. > The patch already provides this, should the option be removed?: @@ -2117,12 +2148,17 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." - (interactive) +(defun project-forget-zombie-projects (&optional no-remote no-message) + "Forget all known projects that don't exist any more. +If NO-REMOTE is non-nil, don't forget remote projects. +If NO-MESSAGE is non-nil, don't display a message about projects removed." + (interactive "P") (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) - (project-forget-project proj)))) + (unless (or (and no-remote (file-exists-p proj) (not (file-remote-p proj))) + (and project-dont-prune-remote-zombie-projects + (file-exists-p proj) (not (file-remote-p proj))) + (file-exists-p proj)) + (project-forget-project proj no-message)))) > --00000000000044c89006323a5a20 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D= "gmail_attr">Dmitry Gutov <<a href=3D"mailto:dmitry@HIDDEN">dmitry@gu= tov.dev</a>> writes:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 07/04/20= 25 03:39, Elijah Gabe P=C3=A9rez wrote:<br> > +(defcustom project-prune-zombie-projects nil<br> > +=C2=A0 "Automatically remove from project list projects that wer= e deleted.<br> > +If set to `all', remove projects when project list file<br> > +is being read or written.<br> > +If set to `list-read', only remove projects when project list fil= e<br> > +is being read.<br> > +If set to `list-write', only remove projects when project list fi= le is<br> > +being written.<br> <br> That's a lot of alternatives. Do we have a picture of the users who <br= > would use each of the values?<br></blockquote></div></div><div dir=3D"auto"= ><br></div><div dir=3D"auto">AFAIK, no, I would honestly prefer just a booe= lan, this can be confused.</div><div dir=3D"auto"><br></div><div dir=3D"aut= o"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> And speaking of remote projects, maybe we should add a prefix argument <br> to project-forget-zombie-projects instead of an option.<br></blockquote></d= iv></div><div dir=3D"auto"><br></div><div dir=3D"auto">The patch already pr= ovides this, should the option be removed?:</div><div dir=3D"auto"><br></di= v><div dir=3D"auto">@@ -2117,12 +2148,17 @@ project-remember-projects-under= </div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 count) count))</div><div dir=3D"a= uto">=C2=A0 =C2=A0 =C2=A0count))</div><div dir=3D"auto">=C2=A0</div><div di= r=3D"auto">-(defun project-forget-zombie-projects ()</div><div dir=3D"auto"= >-=C2=A0 "Forget all known projects that don't exist any more.&quo= t;</div><div dir=3D"auto">-=C2=A0 (interactive)</div><div dir=3D"auto">+(de= fun project-forget-zombie-projects (&optional no-remote no-message)</di= v><div dir=3D"auto">+=C2=A0 "Forget all known projects that don't = exist any more.</div><div dir=3D"auto">+If NO-REMOTE is non-nil, don't = forget remote projects.</div><div dir=3D"auto">+If NO-MESSAGE is non-nil, d= on't display a message about projects removed."</div><div dir=3D"a= uto">+=C2=A0 (interactive "P")</div><div dir=3D"auto">=C2=A0 =C2= =A0(dolist (proj (project-known-project-roots))</div><div dir=3D"auto">-=C2= =A0 =C2=A0 (unless (file-exists-p proj)</div><div dir=3D"auto">-=C2=A0 =C2= =A0 =C2=A0 (project-forget-project proj))))</div><div dir=3D"auto">+=C2=A0 = =C2=A0 (unless (or (and no-remote (file-exists-p proj) (not (file-remote-p = proj)))</div><div dir=3D"auto">+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (and project-dont-prune-remote-zombie-projects</div><div dir= =3D"auto">+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(file-exists-p proj) (not (file-remote-p proj)))</div><div dir= =3D"auto">+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-ex= ists-p proj))</div><div dir=3D"auto">+=C2=A0 =C2=A0 =C2=A0 (project-forget-= project proj no-message))))=C2=A0</div><div dir=3D"auto"><div class=3D"gmai= l_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde= r-left:1px #ccc solid;padding-left:1ex"> </blockquote></div></div></div> --00000000000044c89006323a5a20--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 8 Apr 2025 01:25:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 21:25:54 2025 Received: from localhost ([127.0.0.1]:57709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1xis-00068X-E1 for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 21:25:54 -0400 Received: from mail-qv1-xf41.google.com ([2607:f8b0:4864:20::f41]:60682) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u1xip-000681-2s for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 21:25:51 -0400 Received: by mail-qv1-xf41.google.com with SMTP id 6a1803df08f44-6eeb7589db4so52849406d6.1 for <77566 <at> debbugs.gnu.org>; Mon, 07 Apr 2025 18:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744075545; x=1744680345; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YD87dS95VUCM2xMSjhVztXGrnvznHl7tCk/S5m3HE40=; b=jJUTI79O8BvMnpYQl/bFsn7Ho/GPfUqP7LiZNyMH8Zo/S94d7yL+s4dFz5y8R1RyJW Vj79KzgdDjNFWqehY9cDvrvRkuYuTTEk187e/yiRMJeHFWTQLPcd8oiYRcxWPtIXCDov 1VyZ7M0O18Jmxz2GZGCHyPkdI8s9zXROCTc7Dnpz5btpNJhWXH0Cfc82ZhM1hKRdSoim hso+Vc8hKeHs07Cx9QTkbaUxn6o/OHdt4fSKH/2ENOJ579MFivg9repm/g/bs6hVxae5 KHorKz2VBpZHOqoiqV/UbXXXkg/r7XUCNeL0K2EXpanjIeAXzf8DX4H/FywMPqLapkIG FdBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744075545; x=1744680345; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YD87dS95VUCM2xMSjhVztXGrnvznHl7tCk/S5m3HE40=; b=k+RH4jNbxgVwMOZwiKC/LCp3RsKj6C3QcQnbT5xcnY2qDSYLEPf3hqZ1ISNlixYcj7 7nuaO+ACb83YEAeIGFCZxryp+RS+ML8sj8WtfshNpi7Vol6M41XBlfAzNoXzEplVWnnQ +yj/ztvBzdQArkDfZIVn6g33nymZpk4gHTuI08Uc6BU6YCr/dVWivTFDap5diVxS7Uat GWky2Li/nGQVxsq00i0B66C75yA+VU0ybgvW2TMRJ5KV0YIGiTnJLQpX8KWltsgHZGPg WlQaCVK+uFWfhnsynu9Beztr6mCoajf2D/A2q+lwXxVFxPWrVPJfj33r27NaCb/PZMHM ck6g== X-Forwarded-Encrypted: i=1; AJvYcCVNuYJxbqFzs5B/rwAiUE5D1mhZYcSPvkps91ZjxegqWawl3RizIKKhgdqoZEhOsxtESd57Hw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxrVBdpQ8KhWTszAaIiNaOjwVURjDLrZobibZgBI4hcKy388jBV oJV2ZHm7Tv1R2hP7rCOyiwfQuJrf9ldQrQTh5LoKmvfkOQQikhRH22PC+eH/KaaR03CFyY6sanz JRZ2q3HJSDuoxFu1EsiEOXFsh7iHErDjE X-Gm-Gg: ASbGncuayoXSGMIod8SSrLuUBam4qZmmgTEzveld1tHjLm83nRDbt8KUGraCu73ZKmR sLwbj1VybIWP5NQ0BDlmuSAi0SjX86lDBthKKV1J7IOoJ5FxUfneNIN8CwNLB1zUHDxq4ZKopMI 53EjZ5D1uDkIc8hv03N8UJHSD5+86RD8Jaurdbj1neSc/R8nrwki37Ng== X-Google-Smtp-Source: AGHT+IH5bVAmaUvwCOH/0cqqHYj989F2l5GmngM6wR2MG6d9ur22lQpQh3ZGwErS4tfCU91jPGWBS8bA52tfVUjU6TQ= X-Received: by 2002:ad4:4eaa:0:b0:6e8:feae:9291 with SMTP id 6a1803df08f44-6f0584c05d3mr191959706d6.24.1744075545240; Mon, 07 Apr 2025 18:25:45 -0700 (PDT) MIME-Version: 1.0 References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> In-Reply-To: <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> From: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> Date: Mon, 7 Apr 2025 19:25:33 -0600 X-Gm-Features: ATxdqUGG7fVrzxnqDE7m942O0EqKuuluQaiQsc-M8XByAmCVSG4sfmqr6b7izn4 Message-ID: <CACnP4N++cOkbRsktu9nw+peOSMH3Z-dc546Pa_57D+XCEFqkeQ@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Dmitry Gutov <dmitry@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000055ec9506323a3b29" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --00000000000055ec9506323a3b29 Content-Type: text/plain; charset="UTF-8" Dmitry Gutov <dmitry@HIDDEN> writes: > On 06/04/2025 03:29, Sean Whitton wrote: > > Thanks, though why do this only when switching projects? > > Why not do it proactively whenever fetching the list of projects? > > Performance concerns? > > I'm concerned about performance, yes. With my SSD, it takes about 4ms to > "clean up" ~70 projects. The number could be higher, and the hard drive > could be spinning media. > Yeah, that is why i originally added it only when switching projects, projectile does the same. So could someone point out what will we get by proactively cleaning up > the list, rather than doing that only when a project is being prompted for? Maybe for ensure that the zombies were removed? For example, packages that use project--list for read the projects. Instead what about purge it once after emacs startup? > --00000000000055ec9506323a3b29 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D= "gmail_attr">Dmitry Gutov <<a href=3D"mailto:dmitry@HIDDEN">dmitry@gu= tov.dev</a>> writes:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 06/04/20= 25 03:29, Sean Whitton wrote:<br> > Thanks, though why do this only when switching projects?<br> > Why not do it proactively whenever fetching the list of projects?<br> > Performance concerns?<br> <br> I'm concerned about performance, yes. With my SSD, it takes about 4ms t= o <br> "clean up" ~70 projects. The number could be higher, and the hard= drive <br> could be spinning media.<br></blockquote></div></div><div dir=3D"auto"><br>= </div><div dir=3D"auto">Yeah, that is why i originally added it only when s= witching projects, projectile does the same.</div><div dir=3D"auto"><br></d= iv><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_= quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1= ex"> So could someone point out what will we get by proactively cleaning up <br> the list, rather than doing that only when a project is being prompted for?= </blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">Mayb= e for ensure that the zombies were removed?</div><div dir=3D"auto"><br></di= v><div dir=3D"auto">For example, packages that use project--list for read t= he projects.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Instead wha= t about purge it once after emacs startup?</div><div dir=3D"auto"></div><di= v dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote"= style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote></div></div></div> --00000000000055ec9506323a3b29--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 21:49:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 17:49:09 2025 Received: from localhost ([127.0.0.1]:57305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1uL7-0003Uz-7e for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 17:49:09 -0400 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]:37509) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u1uL4-0003UC-VX for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 17:49:07 -0400 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id A09DB114019D; Mon, 7 Apr 2025 17:48:59 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Mon, 07 Apr 2025 17:48:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744062539; x=1744148939; bh=pvz2JcLp1517giw82iiasbpsjlqtUz987pIjCcZKEZo=; b= FNqYr+gh5jR4f/hwtcJaK6g+qPpfFbUZuOUmyiJ4wwYVl/NXoZsoLpYrN8T4TGk7 c6ugr3HDhtm+vG9MptzxP55ziHw6phPP2CuPFLpKy3Yv7xYlre+cblvcgl8DD8WD YtBPGy3Jnh+sP8leCzVcNQUc327G0Obtxq4yRgWsT2fuJHLm8ufSW67B+9MRCSDx 4KiVASyZBO+7VyLr/QFDqUUCEedkuDWkOVyhgjnuOlc6+YG5y3kt7DNl6EZYMyYD QHrvvrmyuNiPdq5PrMS7x9ZuLat9SpgJZet4xBa2awZ0kTZ1pKRQSqAmNffv4LVZ aIFGd1KWSjDggVGCyFqedQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744062539; x= 1744148939; bh=pvz2JcLp1517giw82iiasbpsjlqtUz987pIjCcZKEZo=; b=h /6+Kr4lVK8/liAxWF4Bj50M2ItUKkhbDZ7k4HVWvn5hPC1FF4LXO8eje5SzIcu3O pBLxpq5SfP7WiUnDzznnweklzLvHijBl1V7FXt9diALxMa7tWfSRWX69+3RVVUGm mx9Z4Oa2SGJF3Jx3cxjpqXDOm1HrkOeu5rQgNdG9flBxZCc9zfgu2OgVbLb6caXp foQzq9RR8dj76faOdk9xVHNKvrvJEyUQSUtTiqotY+d+0QGlCNLYkiVia6bt/YPG 4uJPkBl+l77f06TIp3C8GtPV2W0L0Bpv3Kxeu7bkPPGTMFgUzWFZdnuZZZdNPpTN pNMIhfR9eqosKLc80j4Sg== X-ME-Sender: <xms:S0j0ZyvZfguaUlfgbU6Ru_MEpIsRU_1nrNDZXkV34p7L1iYbEBwX1A> <xme:S0j0Z3c1uaF3p0id6w4pSGl_3r7qpo_rR_h41DN1nIUhznu6NEPfVlCcl1e5ZNj0o 97RMGmneHFKa0l_EbE> X-ME-Received: <xmr:S0j0Z9wF-bSBxWtOtlRW61cVvDeoEeysXoHT9EY2XzkGOjumZTJLBH8V9o7pGNKfpA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddufeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddt vdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovh druggvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieek ueeftddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht thhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjuhhriheslhhinhhkoh hvrdhnvghtpdhrtghpthhtohepvghgieegvdeiudeisehgmhgrihhlrdgtohhmpdhrtghp thhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomhdprhgtphhtthhopeejjeehie eiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepshhpfihhihhtthhonhes shhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: <xmx:S0j0Z9OS_jxJUy6EtrFnlZCRShI5M2rw0Sc_nnaZuumZL7p8iDI3mQ> <xmx:S0j0Zy_aFUGMsmCeJzn6tFKV5n56lOPFZ_zn8gy7kHw9ZmxXJ1vZOg> <xmx:S0j0Z1W8jr6mL9IiWg89Bpp0FP7ztm172yFKUjgoFPVRJ3W5e81hBA> <xmx:S0j0Z7cf9CbNn7tFRP8tdnLUoAc3Ytje_LnJDrtff6cowqcdcrT5yA> <xmx:S0j0Z3Km3Wp-s5pr2mK6ImkTi1uVPkI8wzcyn15jpSbwuGMEB1XR8UUV> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Apr 2025 17:48:57 -0400 (EDT) Message-ID: <1cc09ffc-0c5c-4409-b74c-3b59a588e8d4@HIDDEN> Date: Tue, 8 Apr 2025 00:48:55 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Juri Linkov <juri@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> <87plhnq0sk.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87plhnq0sk.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org, Ship Mints <shipmints@HIDDEN>, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 07/04/2025 21:33, Juri Linkov wrote: > Instead of desperately cleaning zombies that are popping up again and again, > I'd prefer an option with a list of directories that should be never added > to the project list. I think we have that in the recently added option project-list-exclude.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 18:35:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 14:35:57 2025 Received: from localhost ([127.0.0.1]:56868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1rK9-0005LI-7h for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 14:35:57 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:59277) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u1rK6-0005Kk-Cr for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 14:35:55 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 8DE1C4424C; Mon, 7 Apr 2025 18:35:43 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Dmitry Gutov <dmitry@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> Date: Mon, 07 Apr 2025 21:33:31 +0300 Message-ID: <87plhnq0sk.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddtledvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomhdprhgtphhtthhopegumhhithhrhiesghhuthhovhdruggvvh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org, Ship Mints <shipmints@HIDDEN>, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> +(defcustom project-prune-zombie-projects nil >> + "Automatically remove from project list projects that were deleted. >> +If set to `all', remove projects when project list file >> +is being read or written. >> +If set to `list-read', only remove projects when project list file >> +is being read. >> +If set to `list-write', only remove projects when project list file is >> +being written. > > That's a lot of alternatives. Do we have a picture of the users who would > use each of the values? Instead of desperately cleaning zombies that are popping up again and again, I'd prefer an option with a list of directories that should be never added to the project list. Or maybe improve 'project-forget-projects-under' to remember what projects it forgot to not add them again, e.g. by a new property in ~/.emacs.d/projects file: (("/dir1" (forgotten . t)) ...)
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 17:40:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 13:40:26 2025 Received: from localhost ([127.0.0.1]:56720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1qSQ-0000xp-2a for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 13:40:26 -0400 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]:46483) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u1qSM-0000xD-Pe for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 13:40:23 -0400 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 3A1C2114013D; Mon, 7 Apr 2025 13:40:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 07 Apr 2025 13:40:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744047617; x=1744134017; bh=T1520tsMRIILTHjNZMamVq01HO/QXGZ+ckc75D7Untg=; b= jTBivHaGE0yzsZBP/T2UaoH0CaSh4FDowmOgfR6RGcsc7fQDJUsac6fArI2HCS7Q Hl4pOcyXJWxF7WIc9AQDsMWBZ+fR2OZAwWVE8W4cjEWMqhNR6gVzDD8BdZH27WHf +t51jfTY0ynFMxe7ExsllBQVeslU1T5cPe12ksYxVKRYefxS/Ins9F724npmZ/0Z HSx48sKUJLd7V9+6Jr+j3FdDovIbHYf4zD2huktJDE3aUrE60tolwLvekJZD/PKt GOyMA/vzaEppTeJ9k4Kwip4FFXd62KIKnbAllKECmgJYy1aRLUeuCdAzTDPzfThR PeHZFKVMAcNy0/pJ6gLsgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744047617; x= 1744134017; bh=T1520tsMRIILTHjNZMamVq01HO/QXGZ+ckc75D7Untg=; b=U 26dg3YOtlw+4WH1HQ8ekM/eK5e43SdEyia3PSUZBxb3aigXFhAeNkVAJNJs8qZRR YEeSxZrZCDDAXzUP5mRSPauaOA5z7wkdzR5+WiMhFG6LoGomL804SIHglyvNivtF vjapKHltsVrafSzi7xL3qR5rEbtn30I/zurLK/SjJC51RkzTTQTjIHtK1+el8F/a PmaknsugIqBD/dADKyQpGCL2xYNlFw9E+4Xa+3tSmr+u4nEXNmW0h4SMSaoh+gAl jM5gjXR4oYT6KNBmrrnqdjTPsPcckQDnSlB2rPaY1pt0LvnopPQkZHy67yJzA6Cj eb9ijQnSPteiuQ2om4Nvw== X-ME-Sender: <xms:AA70ZwyWhS97HLNcrjxo4dAojUIibu55MLz_kAXayBLq22Q8ONLAFg> <xme:AA70Z0THtUNXAyAbbhATldVCLD9vLOsfQBU0Ci_UJFXBmyW8V_bc7jrq7vkaixT5_ hztsxqP1IH_dswRUPo> X-ME-Received: <xmr:AA70ZyVIfcfTvtalmH5QSR247wzoMwaKBSwGMh6h6kuEVgHX4Ib1K6PeKd1jx68Ctg> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddtkeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddt vdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovh druggvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieek ueeftddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht thhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehshhhiphhmihhnthhsse hgmhgrihhlrdgtohhmpdhrtghpthhtohepvghgieegvdeiudeisehgmhgrihhlrdgtohhm pdhrtghpthhtohepjeejheeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtth hopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: <xmx:AA70Z-hhKFztEk-2zkdgsa-emnrHu9Sj8ttfJXwzCxc7dNuXxV3f3Q> <xmx:AA70ZyDkSzNJwABHTO7fJPg01fcUt49XlhSjEp4IuX7UgeQj6wkG1w> <xmx:AA70Z_J9q5St77SgI56MWBJaAdQ3x_UbDAEJkRWZH9EcItOR8XEzqQ> <xmx:AA70Z5Cd4cmTc1VXxxgWGrHboMo7esq537MkkdFXI5PgIfjwLIfLVw> <xmx:AQ70Z5ZVtNFnHE-IM1kXrKKOSBhZnIEC9-MQu1-OywiljL5AQDqp7pqj> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Apr 2025 13:40:15 -0400 (EDT) Message-ID: <999a66ed-498d-4e7b-99d4-d38723a88565@HIDDEN> Date: Mon, 7 Apr 2025 20:40:12 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Ship Mints <shipmints@HIDDEN>, =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 06/04/2025 14:26, Ship Mints wrote: > I think we need to call zombies something else and also consider that > remote files may need to be ignored by the zombie checker to reduce the > costs of checking project paths, to avoid tramp prompts for an internal > function, and to accommodate that not all tramp connections are > available all the time and those may not be reachable and should not be > considered zombies. Speaking of remote projects, even when a connection is available, checking all of the projects for existence might create a large latency, simply because of the lag to the remote host. So I'm not sure what's the best approach here. Though we could just add the option as off by default and say that if you turned it on, you accept the consequences.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 17:36:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 13:36:25 2025 Received: from localhost ([127.0.0.1]:56711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1qOX-0000dQ-1v for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 13:36:25 -0400 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]:38251) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u1qOV-0000cu-9d for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 13:36:23 -0400 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id D052A25400A4; Mon, 7 Apr 2025 13:36:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Mon, 07 Apr 2025 13:36:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744047377; x=1744133777; bh=gyo8M6MsLCjIU7arJSmSMHwCexy9KApsrWWTtycJaDc=; b= kCBaJKaDdxI+r+shkDfCKK6nhTAibv2EOjqoHd6F33umNB2aDeWeSY0ZSmzfkmpY CNetSxdB2QX4XP6EDEOj248X7zL/iUI8+3UpzhpGE0Z3etmrnvsfy0wZtl+PENqA i0uaMCn9d7qQgZU1EOIyFclQcuxO48xgh8ytufVSNv75+ezXimiPiql6tskUg98A Rez2DZJjZfYiI7zpHpPz0hcV8ec5xIhgoS0YiN69yunaZHpp1xWZQYOuQfapDdOn 88Rt+kDKPCexXCuiUoXA42svDpJCuuF4S0D/ql1A+5KkYFWWBcq5bq12MrnBufnn EBLwBYIuYt4VdUwDwe9/gg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744047377; x= 1744133777; bh=gyo8M6MsLCjIU7arJSmSMHwCexy9KApsrWWTtycJaDc=; b=B rtL1UrO36DyVk5wOqnIGXu5rlOhgIjqGpTd+V/XpahRNc8KiR7ujvxZFgbb+A8BU DqdZXv4FvGRK0CQuNiT5IlHydgBRaZG5PukPbBRLL8k0jDvbEzD6R7XDxrYEZlt7 lyK3p9QQGnWUmo6t4jtqF5eo1yLXc0RZdy/BogKSD9/0E4xXvu28wKeqiVaRVCau e4oqEkvYjIEppARXKraNhLmVM+uq4QH1CskZrpbki4C6j4SzNOP+9iczSTM/sUFT KyAGBwmuW2hGBRa6qClqgEqEr1hCDKvfr+bDyIC1PimJuoeyA0Fp+J34sTJhrV9P RRBqEwmc1yfyyl21g3bxg== X-ME-Sender: <xms:EQ30Z2sPeZ7xgeNM0grHVWroFyFJlSv7Iq6wlnv84AysSMxuJqNtBw> <xme:EQ30Z7fO_4UIGo9Z0yzwMzZxv6pTa7Ljd6nTEhIwTESMI45kz7GudK4WV80O0CGAc Q0o78Qvt7Pf_8p4qd8> X-ME-Received: <xmr:EQ30ZxzGtxsTHSgwD-oTzYfgivjip5y72XVNF-kHzFOfuXkxk2VTlDw-ujG4uY3ssw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddtkedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddt vdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovh druggvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeet veegtedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht thhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvgheigedvieduieesgh hmrghilhdrtghomhdprhgtphhtthhopehshhhiphhmihhnthhssehgmhgrihhlrdgtohhm pdhrtghpthhtohepjeejheeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtth hopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: <xmx:EQ30ZxPu7xcTWDxLI9EGbMAOutSZB58JqBFxdKIY8HkIGV1fib-jjQ> <xmx:EQ30Z2801fAMRxh3kPAep_myBrtTJWTplI7oGxhnxdNOb56DXUQf7w> <xmx:EQ30Z5WpHTEHc909f66eUz-BBKnRDgAHadB564uMvERQsUWs0AEJwQ> <xmx:EQ30Z_ej9o162UpZDmBjj8cNjB4CI39HnUCDaYwhSNJrJsfThHWRzg> <xmx:EQ30Z20qBbgksyOUgLGba2BYTcE4pGj6zcjHxvlYhMEq-FgL9VTc3Lvc> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Apr 2025 13:36:15 -0400 (EDT) Message-ID: <43b3792c-d917-4be6-b9bf-7fb1f8184a81@HIDDEN> Date: Mon, 7 Apr 2025 20:36:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN>, Ship Mints <shipmints@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87zfgseren.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 07/04/2025 03:39, Elijah Gabe Pérez wrote: > +(defcustom project-prune-zombie-projects nil > + "Automatically remove from project list projects that were deleted. > +If set to `all', remove projects when project list file > +is being read or written. > +If set to `list-read', only remove projects when project list file > +is being read. > +If set to `list-write', only remove projects when project list file is > +being written. That's a lot of alternatives. Do we have a picture of the users who would use each of the values? And speaking of remote projects, maybe we should add a prefix argument to project-forget-zombie-projects instead of an option.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 17:35:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 13:35:06 2025 Received: from localhost ([127.0.0.1]:56702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1qNF-0000UY-RF for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 13:35:06 -0400 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]:59371) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <dmitry@HIDDEN>) id 1u1qNC-0000Rk-Rf for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 13:35:04 -0400 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id EAC13254009E; Mon, 7 Apr 2025 13:34:56 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Mon, 07 Apr 2025 13:34:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1744047296; x=1744133696; bh=WlRoNUFL80BR/+J1R+aKtBq4NzSdGIB0tWcCGiGHshA=; b= STdGXsIZ8KnzbbyCVDQce2ld/BxzESdE2DGcn5wyUogW9p9aRQuslLdSxspJPWdd xdljB65TlrBpgwtUSwtBLOlj67PhpZoQcQxDv/PBdIAk8qpXQr3rjDExVj0lAo39 rpEE6ritjlyz79IRXcac3ap/bueVT5bjPek/XWqMjZXBJA0VVv0vcdRidqPCkuDQ zEURzBiV3fP3+DqkcruT/sZygSItZUPFMmndCo76p7S0ecUx8ECX/p4ifo50yJBO DDrD4hV24wPZEiiRUoAYoS6VdO3N4Ro0DfaFtyzzCd+04vxdsvk6Adxc/Nz9ISI7 3vpJQgQWj4LVkWnpOS8e/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1744047296; x= 1744133696; bh=WlRoNUFL80BR/+J1R+aKtBq4NzSdGIB0tWcCGiGHshA=; b=T Bjx2hwOJpE/Z6LmH07RbolL/ET4dtUcCthB6rZcmN9cFHPTHaEhnwUYHYkVjzh3f pGVmls4dhLzAOHJc57KsyxX/x1IzEnEYt1bi13LjIr8Zn0V9anEZ2tgidWlVEdgw q3Ttkq0B69+II7BlJ/LMkBD7Ifks1h6cyI43Nekq/KLSTUvaJDPy9WAavGQ90kgx 758hJciJFt/wEEpfx8HnfG1ucSkLLvyLvDLMCU2lAUcc+3kVd5b+jhPa4Gjx2BwJ sfPvn+zaZw2gkut5IdZ0e3srhfMHMszsU2PR2+w6FUUWPP8vOB8gq1wXZqVKDazr eXPaue8HYZgoZXEDLK+0w== X-ME-Sender: <xms:wAz0Z57mtV3wPSsHgZrsChLX9MBjH-54F3sODwOhMfesydUA_PYmYg> <xme:wAz0Z25BQznYl3MUzTct4oqznWLTm19AdN3OiJP9q9SGayNrjosOCP6w6-cvi8kLO mNWtxpnrcK6SGIkae4> X-ME-Received: <xmr:wAz0ZwcINHuNh5uKm-n9TSamqhuSWxSBmsDCRjB46xcoBzLKmtIuUkIMBHGiiM-enw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvtddtkeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddt vdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovh druggvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieek ueeftddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphht thhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsphifhhhithhtohhnse hsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopegvgheigedvieduieesghhmrghi lhdrtghomhdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: <xmx:wAz0ZyIhtfH7Kh42bu7KEaDcngnoEV24wt6GTxIou6CUDgEuxkERWQ> <xmx:wAz0Z9Jrf-kj9428NmmTfsN5Cp2q16U0Z5WAwj-1PmzrTvT8lvqYBg> <xmx:wAz0Z7wwnuhJIMz3ZAqMITUroPy7d-1c8pz011Y4Tuu5nf9KYiXMUQ> <xmx:wAz0Z5I5EZNuSj2xILPd3PWPtidX1EiQthDINuW-i7oybYx_30aklg> <xmx:wAz0Zz8KUFARAwRzThutzEzgsb2OyYSWP1roZzgTJIFpbOvHi_D-_E_C> Feedback-ID: i07de48aa:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Apr 2025 13:34:54 -0400 (EDT) Message-ID: <3f8dc4f0-81ce-4343-9351-4fede1516825@HIDDEN> Date: Mon, 7 Apr 2025 20:34:50 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Sean Whitton <spwhitton@HIDDEN>, =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> Content-Language: en-US From: Dmitry Gutov <dmitry@HIDDEN> In-Reply-To: <87jz7ynndw.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: 77566 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) On 06/04/2025 03:29, Sean Whitton wrote: > Thanks, though why do this only when switching projects? > Why not do it proactively whenever fetching the list of projects? > Performance concerns? I'm concerned about performance, yes. With my SSD, it takes about 4ms to "clean up" ~70 projects. The number could be higher, and the hard drive could be spinning media. So could someone point out what will we get by proactively cleaning up the list, rather than doing that only when a project is being prompted for?
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 13:20:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 09:20:13 2025 Received: from localhost ([127.0.0.1]:53384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1mOa-0004b5-UW for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 09:20:13 -0400 Received: from mail-vk1-xa2c.google.com ([2607:f8b0:4864:20::a2c]:58786) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1u1mOY-0004VS-Ak for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 09:20:10 -0400 Received: by mail-vk1-xa2c.google.com with SMTP id 71dfb90a1353d-52446b21cfdso1868963e0c.1 for <77566 <at> debbugs.gnu.org>; Mon, 07 Apr 2025 06:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744032004; x=1744636804; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9DH5SxQ0tTGI81hEk35iONWhp7DsU8enuRdbBkgB8s0=; b=K45jyKqjS5FKqziPgXRJPqW28Xr1+doqgM2rXf7Ta36uIXtBGa1UjYfH52Mbra8SJW fmwSPTQVxqq1CWQgx6c92z1IVEZXLe7tDfY7CCcfdV9VF9LFrkFPevyZIHKaLAra5Cqn vR527nv3QuVRAvlRSaliYjE9Z974P8DAU7Er7XZAHNkBMj9vlBEop52M3MwM7oKK8njh d9XfEzMMinMGDCiWHlyQIT2G3zIMG2pVL49kz4RmyzlS7PrsNM/Bjm58jPKP4pkofmcc SpryZVP5TxjUeICHfELKh0NAa2FYv94IYEJo8w9z8b/ibD3b0Jfi2sVaVWkMCaSAplrD 88Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744032004; x=1744636804; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9DH5SxQ0tTGI81hEk35iONWhp7DsU8enuRdbBkgB8s0=; b=cFKoRGWbMMA2/Qlt8P9H/m83741SKzilEzpk9zJyBZKFi4cOmT8T3MH/BExddjW/xt pHs71n71c9Tv3LeRxrVfkVYx4fwr8Z3m4z6lfK4z0pDJtUiDq5Kb7iAFd+aCVS6m8VyF xd6p8XVy6dSkQxn+zA1Jv6HboVX0I5LZjIprR4A9NYsW8hbsij4Awea4VbucLWOEPxRC /3EBQwmX449nzz8N8KHHznTZdiPHog3sUyOR8WHi92lbGOiVfCZ+cio5+PlbTjpgzU14 UG0E7hwwwYaN6UtS09TqQEjIEcRtmr4SusbuOE8RXhB1iwEgzEi3oT97OT9LLBZmBqop u7ug== X-Forwarded-Encrypted: i=1; AJvYcCUCiKkm1BQM53Owi8BUImb1di4gstc4nlQ1VIg3qPsChM7WqUJ5/yklsZepu5ytntNrUgkxgA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxd1+++HGb4Per4ryXxwgX6FaldShRW9duZ13ibdvszzIzZwt/R GHsRhdnLplNYWBYLg/TIKpP+g6iyYL1Luexg6JWpdNSSJntnQnqBgaj15u/3n0/Pk89Su7BEArs MMw93o2SChjHo/6LaxHVFMdroRkA= X-Gm-Gg: ASbGncvONeS39ul5fFG9qHe2yUgD2qY/fB4KkYUlbvS34iNsXxz7X9LjryMrlLcwirn 7hriWLYbF589UucAijtrK109/7YToJMcV87AqD9kDKUeBMNJ2Y546zfeaYno/zIrNJ83ysYtf8y qiYIf5CLangmpZrEvTbru5ADlwMw== X-Google-Smtp-Source: AGHT+IHp9PjfHUN0q47Shp2XO5sk9kFTfznFKKf66Xx98jsICXS1ycE6BgRkGEWD9YHzL8/q66DoPGldVLveS+LT0Fw= X-Received: by 2002:a05:6122:2207:b0:520:3536:feb5 with SMTP id 71dfb90a1353d-52765da6a79mr7986408e0c.11.1744032004306; Mon, 07 Apr 2025 06:20:04 -0700 (PDT) MIME-Version: 1.0 References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> <87y0wcjwyf.fsf@HIDDEN> In-Reply-To: <87y0wcjwyf.fsf@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Mon, 7 Apr 2025 09:19:53 -0400 X-Gm-Features: ATxdqUEVdHMqNXJUKHWzmiHoQ49lI3tnCIFDpWe9hBlKK9HPgbg-yeFagCY4rfQ Message-ID: <CAN+1HbpYacN7Mk7sAoQT96hhiNOU_SoLJxAvsbRG0sT0ASz0Cw@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: Juri Linkov <juri@HIDDEN> Content-Type: multipart/alternative; boundary="00000000000017fbdd0632301899" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN>, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --00000000000017fbdd0632301899 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 7, 2025 at 2:41=E2=80=AFAM Juri Linkov <juri@HIDDEN> wrote: > > +(defcustom project-dont-prune-remote-zombie-projects nil > > + "If non-nil, remote files will no be pruned by > `project-forget-zombie-projects'." > > + :type 'boolean > > + :version "31.1" > > + :group 'project) > > Maybe it's possible to do with one option like there is > remote-ignoring 'recentf-keep-default-predicate' > in the default value of 'recentf-keep'. > > > I don't have a remote project so I can't test it. > > 'sudo' counts as a remote project too. > So you can just type 'C-x x @' and the current project > will be added as remote. > Indeed, and you can also open a local project via ssh to get the same thing if you want to test other remote methods. I think this is backwards + (unless (or (and no-remote (file-exists-p proj) (not (file-remote-p proj))) and should be + (unless (or (and no-remote (not (file-remote-p proj) (file-exists-p proj))) to avoid the cost of a remote file-exists-p. --00000000000017fbdd0632301899 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">= On Mon, Apr 7, 2025 at 2:41=E2=80=AFAM Juri Linkov <<a href=3D"mailto:ju= ri@HIDDEN">juri@HIDDEN</a>> wrote:</span></div></div><div class= =3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" st= yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd= ing-left:1ex">> +(defcustom project-dont-prune-remote-zombie-projects ni= l<br> > +=C2=A0 "If non-nil, remote files will no be pruned by `project-f= orget-zombie-projects'."<br> > +=C2=A0 :type 'boolean<br> > +=C2=A0 :version "31.1"<br> > +=C2=A0 :group 'project)<br> <br> Maybe it's possible to do with one option like there is<br> remote-ignoring 'recentf-keep-default-predicate'<br> in the default value of 'recentf-keep'.<br> <br> > I don't have a remote project so I can't test it.<br> <br> 'sudo' counts as a remote project too.<br> So you can just type 'C-x x @' and the current project<br> will be added as remote.<br></blockquote><div><br></div><div class=3D"gmail= _default" style=3D"font-family:monospace">Indeed, and you can also open a l= ocal project via ssh to get the same thing if you want to test other remote= methods.</div><div class=3D"gmail_default" style=3D"font-family:monospace"= ><br></div><div class=3D"gmail_default" style=3D"font-family:monospace">I t= hink this is backwards</div><div class=3D"gmail_default" style=3D"font-fami= ly:monospace"><br></div><div class=3D"gmail_default" style=3D"font-family:m= onospace">+ =C2=A0 =C2=A0(unless (or (and no-remote (file-exists-p proj) (n= ot (file-remote-p proj)))</div><div class=3D"gmail_default" style=3D"font-f= amily:monospace"><br></div><div class=3D"gmail_default" style=3D"font-famil= y:monospace">and should be</div><div class=3D"gmail_default" style=3D"font-= family:monospace"><br></div><div class=3D"gmail_default" style=3D"font-fami= ly:monospace"><div class=3D"gmail_default">+ =C2=A0 =C2=A0(unless (or (and = no-remote (not (file-remote-p proj) (file-exists-p proj)))</div><div class= =3D"gmail_default"><br></div><div class=3D"gmail_default">to avoid the cost= of a remote file-exists-p.</div><div class=3D"gmail_default"><br></div></d= iv></div></div> --00000000000017fbdd0632301899--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 06:42:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 07 02:42:01 2025 Received: from localhost ([127.0.0.1]:51903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1gBE-00064k-MV for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 02:42:01 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:41849) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1u1gBB-00063u-SM for 77566 <at> debbugs.gnu.org; Mon, 07 Apr 2025 02:41:58 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id CDDF02047E; Mon, 7 Apr 2025 06:41:48 +0000 (UTC) From: Juri Linkov <juri@HIDDEN> To: Elijah Gabe =?iso-8859-1?Q?P=E9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87zfgseren.fsf@HIDDEN> Organization: LINKOV.NET References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> <87zfgseren.fsf@HIDDEN> Date: Mon, 07 Apr 2025 09:40:40 +0300 Message-ID: <87y0wcjwyf.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduleelgeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufgjohhffffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucggtffrrghtthgvrhhnpeffgeetfeevlefhleejfeeuheeiudeitdffhfdutdekfeffgffhveehteegueekheenucfkphepledurdduvdelrddutdehrdduudejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepledurdduvdelrddutdehrdduudejpdhhvghlohepmhgrihhlrdhgrghnughirdhnvghtpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhgspghrtghpthhtohephedprhgtphhtthhopehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgdprhgtphhtthhopeejjeehieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepughmihhtrhihsehguhhtohhvrdguvghvpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrghilhdrtghomhdprhgtphhtthhopegvgheigedvieduieesghhmrghilhdrtghomh X-GND-Sasl: juri@HIDDEN X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, 77566 <at> debbugs.gnu.org, Ship Mints <shipmints@HIDDEN>, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) > +(defcustom project-dont-prune-remote-zombie-projects nil > + "If non-nil, remote files will no be pruned by `project-forget-zombie-projects'." > + :type 'boolean > + :version "31.1" > + :group 'project) Maybe it's possible to do with one option like there is remote-ignoring 'recentf-keep-default-predicate' in the default value of 'recentf-keep'. > I don't have a remote project so I can't test it. 'sudo' counts as a remote project too. So you can just type 'C-x x @' and the current project will be added as remote.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 7 Apr 2025 00:39:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 06 20:39:40 2025 Received: from localhost ([127.0.0.1]:50236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1aWZ-00022G-By for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 20:39:40 -0400 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:55732) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u1aWX-00021m-8I for 77566 <at> debbugs.gnu.org; Sun, 06 Apr 2025 20:39:38 -0400 Received: by mail-ot1-x343.google.com with SMTP id 46e09a7af769-72c13802133so1000463a34.3 for <77566 <at> debbugs.gnu.org>; Sun, 06 Apr 2025 17:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743986371; x=1744591171; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=RfAqdz+/zfU38NbJd4nWMoozO4ESerFrCyRcrA38+Oo=; b=Fn7nzFwlBjqamet8u6/DDLzGmHfaIVpysmiRItDX6unCzQnlrmJvsuTALx8GN8Kiv8 q4ZxfEzEsc4sWPEKeSRqaAwilZddEPXsBl3NEvtyk1lzMV0wLZsU+doYp2RSoKchoWDk EyRPhBzlUGwCv3rRyqisQiQ62nCzMAjLPveHjUuZWY0YIlQdOuTUQGNsl/Vwcb/ItC/O Hk0lFKLCY52QGtLk5yMPrqkghw773WglGL+CqXcoSZ55pV7W7KV/2q3mQmfo0V2F3JD2 ZFcK7bVhZxdjQdIav4N1GlD/2LF/vper9fxP319LrLHqBV2p2El8AkRT8pFbUO+X0tSx vl0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743986371; x=1744591171; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RfAqdz+/zfU38NbJd4nWMoozO4ESerFrCyRcrA38+Oo=; b=n5/YZO9Kn5DydGUsx8eq0HCuRK/oaFZBr+dpPvL8kv0lN+STol51HmX9fzCHug1sRg flXagdLg8Yrwpthlq9AWxvW9QKPTayTEGE4XYLIMLJApXuyMODdaPAl+gWJqkGTOu/hS uP1UF3NiXUIhfxWqVRnNEApp+ia9++o9ekzdzvKn2KY6+NdTPex2fJhNGeLswO0u9DIz 6ZIyMyrHMIInwUm08o9vruOU6qOBcwzLzu/QBHl/nDOMTCk8BdKGx9ARH+YOokkCbpOf pv5guQ1YugTsBVaq4jjYnICKD4sVxF12p5kogARf0hSa7LXK3h7qU4NENOIupZ8VHXhF WUng== X-Forwarded-Encrypted: i=1; AJvYcCU5+hOfZELB5W+krOnR/q6SWJIxaEWvv7fTmq6Jh9iAOHTvW0N6L2QtBhPwYlp9fCZI8aP3Qw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxk0ix+0NXxnIKNdMffnSrNCQ0teprSgt7Qo6paGPsTnUsHA9MD CuTIjcWneS98mklQiDZ4YrLEBUBDGMT5sbEgpK/ylpXQQuRGHzl+ X-Gm-Gg: ASbGncuuqBvtAwl3gzSB+dODD/Tx6mBARDLmyyQiUctDQ3alkWI5cq47WY9bH5Oq6Lb 85R87SMrOC0SUs8CUJI7LUXMfyvbZihVYp+Zv6M639tSLC2zDFapUBxCLezC3TNUB06KkB+Wms7 LIqHZ3A454JX9+h0OJAGs901j4YXrUvZl3QSPCNvBeQsNzAPyUniyCjzwZLUyvvifqd/G/pOBKx pHvVfyKF/Tg7m/mOLddp5OZPw+xDk1BljlaifkhgC8/wBbqtzMgM+OxN5r2xUY1qfLkAvNMuaOX swIMKB4RUs8X X-Google-Smtp-Source: AGHT+IFT77Yo1rpEyvNeTubZa9h+UiF9qv+zz1VBttTm1m6+ICIolvOQ1TYFgr8jGuvIZVsA7/Sbiw== X-Received: by 2002:a05:6830:6801:b0:72b:b8d8:3995 with SMTP id 46e09a7af769-72e36957415mr6245587a34.19.1743986371087; Sun, 06 Apr 2025 17:39:31 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72e30529cc5sm1525433a34.33.2025.04.06.17.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Apr 2025 17:39:30 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Ship Mints <shipmints@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> Date: Sun, 06 Apr 2025 18:39:28 -0600 Message-ID: <87zfgseren.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Ship Mints <shipmints@HIDDEN> writes: > I think we need to call zombies something else and also consider that remote files may need to be > ignored by the zombie checker to reduce the costs of checking project paths, to avoid tramp prompts for > an internal function, and to accommodate that not all tramp connections are available all the time and > those may not be reachable and should not be considered zombies. Something like to this patch? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-for-automatically-delete-non-existent-pro.patch From adfd76d9d7f046b10548fad30861afb260c888e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Sat, 5 Apr 2025 16:18:27 -0600 Subject: [PATCH] Add option for automatically delete non-existent projects. (bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-prune-zombie-projects) (project-dont-prune-remote-zombie-projects): New user options. (project--remove-from-project-list, project-forget-project): Allow not to show forgotten projects. (project-forget-zombie-projects): Add new function arguments. (project--ensure-read-project-list, project--write-project-list): Call `project-forget-zombie-projects' only if according `project-auto-forget-zombie-projects' value. --- etc/NEWS | 15 +++++++++ lisp/progmodes/project.el | 66 ++++++++++++++++++++++++++++++--------- 2 files changed, 66 insertions(+), 15 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc63d03eafe..f88074d7f0f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,21 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. +--- +*** New user option 'project-prune-zombie-projects'. +This user option automatically removes projects from 'project-list-file' +that cannot be accessed. + +--- +*** New user option 'project-dont-prune-remote-zombie-projects'. +This user option tells to `project-forget-zombie-projects' if +remote projects must be removed from 'project-list-file' only if +'project-prune-zombie-projects' is non-nil. + +*** New argument NO-REMOTE for 'project-forget-zombie-projects'. +This function argument tells 'project-forget-zombie-projects' not to +forget projects that are remote. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e2cd5bfa231..f0e54f90722 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1551,6 +1551,28 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-prune-zombie-projects nil + "Automatically remove from project list projects that were deleted. +If set to `all', remove projects when project list file +is being read or written. +If set to `list-read', only remove projects when project list file +is being read. +If set to `list-write', only remove projects when project list file is +being written. +If nil, no pruning is performed." + :type '(choice (const :tag "All" all) + (const :tag "Only when project list is being read" list-read) + (const :tag "Only when project list is being written" list-write) + (const :tag "Disabled" nil)) + :version "31.1" + :group 'project) + +(defcustom project-dont-prune-remote-zombie-projects nil + "If non-nil, remote files will no be pruned by `project-forget-zombie-projects'." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1888,7 +1910,11 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list)) + (when (and (consp project--list) + (or (eq project-prune-zombie-projects 'list-read) + (eq project-prune-zombie-projects 'all))) + (project-forget-zombie-projects nil 'no-message))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1903,7 +1929,11 @@ project--write-project-list (expand-file-name name))))) project--list) (current-buffer))) - (write-region nil nil filename nil 'silent)))) + (write-region nil nil filename nil 'silent))) + (when (and (consp project--list) + (or (eq project-prune-zombie-projects 'list-write) + (eq project-prune-zombie-projects 'all))) + (project-forget-zombie-projects nil 'no-message))) (defun project--remember-dir (root &optional no-write) "Add project root ROOT to the front of the project list. @@ -1933,26 +1963,27 @@ project-remember-project project-list-exclude) (project--remember-dir root no-write)))) -(defun project--remove-from-project-list (project-root report-message) +(defun project--remove-from-project-list (project-root report-message &optional no-message) "Remove directory PROJECT-ROOT of a missing project from the project list. If the directory was in the list before the removal, save the -result in `project-list-file'. Announce the project's removal -from the list using REPORT-MESSAGE, which is a format string -passed to `message' as its first argument." +result in `project-list-file'. If NO-MESSAGE is non-nil, +Announce the project's removal from the list using REPORT-MESSAGE, +which is a format string passed to `message' as its first argument." (project--ensure-read-project-list) (when-let* ((ent (assoc (abbreviate-file-name project-root) project--list))) (setq project--list (delq ent project--list)) - (message report-message project-root) + (unless no-message (message report-message project-root)) (project--write-project-list))) ;;;###autoload -(defun project-forget-project (project-root) +(defun project-forget-project (project-root &optional no-message) "Remove directory PROJECT-ROOT from the project list. PROJECT-ROOT is the root directory of a known project listed in -the project list." +the project list. +If NO-MESSAGE is non-nil, don't display a message about project removed." (interactive (list (funcall project-prompter))) (project--remove-from-project-list - project-root "Project `%s' removed from known projects")) + project-root "Project `%s' removed from known projects" no-message)) (defvar project--dir-history) @@ -2117,12 +2148,17 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." - (interactive) +(defun project-forget-zombie-projects (&optional no-remote no-message) + "Forget all known projects that don't exist any more. +If NO-REMOTE is non-nil, don't forget remote projects. +If NO-MESSAGE is non-nil, don't display a message about projects removed." + (interactive "P") (dolist (proj (project-known-project-roots)) - (unless (file-exists-p proj) - (project-forget-project proj)))) + (unless (or (and no-remote (file-exists-p proj) (not (file-remote-p proj))) + (and project-dont-prune-remote-zombie-projects + (file-exists-p proj) (not (file-remote-p proj))) + (file-exists-p proj)) + (project-forget-project proj no-message)))) (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. -- 2.49.0 --=-=-= Content-Type: text/plain I don't have a remote project so I can't test it. > Setting aside the zombie name for now, hHow about calling 'project-auto-forget-zombie-projects' > 'project-prune-zombie-projects' and rather than boolean, accept symbols that could include something > like 'list-read 'list-write nil so users can decide when pruning happens. I've added them and also an `all' option which mix `list-read' and `list-write'. > Could we rename report-message to no-message and change when to unless to keep it uniform? The > word report suggests things other than merely allowing messages. I've added it as an additional optional argument. -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 6 Apr 2025 11:26:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 06 07:26:39 2025 Received: from localhost ([127.0.0.1]:46229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1O99-0003Wg-0R for submit <at> debbugs.gnu.org; Sun, 06 Apr 2025 07:26:39 -0400 Received: from mail-vk1-xa30.google.com ([2607:f8b0:4864:20::a30]:47155) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>) id 1u1O96-0003WN-C6 for 77566 <at> debbugs.gnu.org; Sun, 06 Apr 2025 07:26:36 -0400 Received: by mail-vk1-xa30.google.com with SMTP id 71dfb90a1353d-52403e39a23so2873360e0c.2 for <77566 <at> debbugs.gnu.org>; Sun, 06 Apr 2025 04:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743938790; x=1744543590; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RMSgfeJvjjI1/8EDElhMrGUGtvMk7cv0Sybb2bYwJOw=; b=Qg68PJ1++d7JsS24uUAYhpCt9L1/QDgH9czWh3mr2hnWd8QH8+4xq6hjKgi5TBzs7f 7l0sSW5MMUOHHMZcjk9T0pUoYoWaB+el8+P7FaUltsvx1phlI+y4IoQGNKIo/qpcMQQe Giuq7oaAciNEvIUMwMgvmuaWPiyZV3+ZeZ0+C7n0PhmFmGL99mFWW1Jr5/tRtEYGJD+D 8lxxt46d/6qvhtnJepin4K7WFSrfsW3+1shlMEg+yJbYNcBEdr581UjKp9YC2IJ4ibUO sM+ARQ/TmU3qSWXOfvWivMdtaH6leOQqXQKIQ1hf0iMr6zUYgW+ytwoL8XVbWh9mobXG 9jKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743938790; x=1744543590; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RMSgfeJvjjI1/8EDElhMrGUGtvMk7cv0Sybb2bYwJOw=; b=DJ/e9ZRt3ziA2phQeGu7dNuyagWZ/bEuybD/QWnVYhDtZ28SdTIQrQTJZlWpGkX1b4 GQA7IbgfFC+8UkxD3awup3ZwjUrornG5tLR6lb5hVBqyrHpfCNgheVyepEBYo3osiFxz O1I0jM8ZcyUjbbXJFkClXe4dSwXO1yBpgmV+nft7asYIcxrtMXRmDKr8KlSUuAX/WEZR U1Ii/K3oUhaHzRG+lZjO1BjiK4iAoGuU5A6iVbqwpmx09xDQzAva9lq27NKXpPP1xo0R lkSqZGibxDIH9mqUfjQaM24rpwUbiW5sWEZUJCyYAdNtz7t6A3HEsmjNdJ6PG8Rug/jv XVlA== X-Forwarded-Encrypted: i=1; AJvYcCU2hJ5hW0PgvuI3rjmaJVWi2IjoBofh5HrKzz30uVKUIIQ4omOLRKAZOrgRLUZ+VmUEQgTiIA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxUW7QrA8GGHehokIyw3ZGrmgqmczMPmHGhbXRhVyoqPsCw2Kd1 U855NhF1DeKK/RPn29aZF08IEryr0WnWvmlb1FMrsj7IojrHH4Jm27H13prVCaOfvaPTWhyHhU0 1LwEE/xkmZBBJf6Vrq56PMEtpy2U= X-Gm-Gg: ASbGncuSN3f98TlePCaADpp+u5agF/bj+9ovXJQtVUku3DuFeEHNnyqYMhHTZHU8x7R hh7MFyxb4zlBQnNfHWTywSh0+bzm65LKhyXJrTc0I134e4uwk4n4aVDi3cCWIPNqBuhWwX6WInp +kfbC9dKmHS7yTx2bB62bt92Rfh+xtnhg+4s+x X-Google-Smtp-Source: AGHT+IGVutp1QWw56g4/MZRRMo+UiSmPFTm5EtVZxjqUhMuQ9O9nHtPAMvAEy4V6VDnxFKOHQK4Mt8xshFSXXc5LQbM= X-Received: by 2002:a05:6122:908:b0:51f:3eee:89e7 with SMTP id 71dfb90a1353d-527730e5f78mr3011964e0c.11.1743938790430; Sun, 06 Apr 2025 04:26:30 -0700 (PDT) MIME-Version: 1.0 References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> <875xji2hnw.fsf@HIDDEN> In-Reply-To: <875xji2hnw.fsf@HIDDEN> From: Ship Mints <shipmints@HIDDEN> Date: Sun, 6 Apr 2025 07:26:18 -0400 X-Gm-Features: ATxdqUFtUWI4t_ystqTY_iLyNxR4jOq2H6HYgj_BI-EbPyw39g1YqvJlJ8fHwIM Message-ID: <CAN+1HbpepsP5qeWRy4u9jEFCQU6nQWsVbj9O=mH4M761a_Oo2Q@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. To: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> Content-Type: multipart/alternative; boundary="0000000000001de4a706321a648e" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0000000000001de4a706321a648e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Apr 5, 2025 at 9:39=E2=80=AFPM Elijah Gabe P=C3=A9rez <eg642616@gma= il.com> wrote: > Sending a better patch. > I think we need to call zombies something else and also consider that remote files may need to be ignored by the zombie checker to reduce the costs of checking project paths, to avoid tramp prompts for an internal function, and to accommodate that not all tramp connections are available all the time and those may not be reachable and should not be considered zombies. Setting aside the zombie name for now, hHow about calling 'project-auto-forget-zombie-projects' 'project-prune-zombie-projects' and rather than boolean, accept symbols that could include something like 'list-read 'list-write nil so users can decide when pruning happens. In long-lived Emacs sessions just doing it at list read time seems insufficient. Could we rename report-message to no-message and change when to unless to keep it uniform? The word report suggests things other than merely allowing messages. ++++ *** New user option 'project-auto-forget-zombie-projects'. - This user option automatically remove projects from 'project-list-file' + This user option automatically removes projects from 'project-list-file' - that have been deleted. + that cannot be accessed. [this language accommodates remote projects] - "Automatically remove from project list projects that were deleted. - If non-nil, remove automatically projects that doesn't exist anymore - from the project list." + "Remove inaccessible project list entries. + If \\=3D'list-read...etc. + If \\=3D'list-write...etc. + [whatever other conditions seem reasonable] + If nil, no pruning is performed." -Stephane --0000000000001de4a706321a648e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">= On Sat, Apr 5, 2025 at 9:39=E2=80=AFPM Elijah Gabe P=C3=A9rez <<a href= =3D"mailto:eg642616@HIDDEN">eg642616@HIDDEN</a>> wrote:</span></di= v></div><div class=3D"gmail_quote gmail_quote_container"><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">Sending a better patch.<br></blockquote><d= iv><br></div><div><div class=3D"gmail_default" style=3D"font-family:monospa= ce">I think we need to call zombies something else and also consider that r= emote files may need to be ignored by the zombie checker to reduce the cost= s of checking project paths, to avoid tramp prompts for an internal functio= n, and to accommodate that not all tramp connections are available all the = time and those may not be reachable and should not be considered zombies.</= div></div><div><br></div><div class=3D"gmail_default" style=3D"font-family:= monospace">Setting aside the zombie name for now, hHow about calling=C2=A0<= span style=3D"color:rgb(97,97,97);font-size:14px;font-family:Arial,Helvetic= a,sans-serif">'project-auto-forget-zombie-projects'=C2=A0</span><sp= an style=3D"color:rgb(97,97,97);font-size:14px;font-family:Arial,Helvetica,= sans-serif">'project-prune-zombie-projects' and rather than boolean= , accept symbols that could include something like 'list-read 'list= -write nil so users can decide when pruning happens.=C2=A0 In long-lived Em= acs sessions just doing it at list read time seems insufficient.</span></di= v><div class=3D"gmail_default" style=3D"font-family:monospace"><span style= =3D"color:rgb(97,97,97);font-size:14px;font-family:Arial,Helvetica,sans-ser= if"><br></span></div><div class=3D"gmail_default" style=3D"font-family:mono= space"><span style=3D"color:rgb(97,97,97);font-size:14px;font-family:Arial,= Helvetica,sans-serif">Could we rename report-message to no-message and chan= ge when to unless to keep it uniform?=C2=A0 The word report suggests things= other than merely allowing messages.</span></div><div class=3D"gmail_defau= lt" style=3D"font-family:monospace"><br></div><div class=3D"gmail_default" = style=3D"font-family:monospace">++++<br>*** New user option 'project-au= to-forget-zombie-projects'.<br>- This user option automatically remove = projects from 'project-list-file'<br>+ This user option automatical= ly removes projects from 'project-list-file'<br><div class=3D"gmail= _default">- that have been deleted.</div>+ that cannot be accessed. [this l= anguage accommodates remote projects]<br></div><div class=3D"gmail_default"= style=3D"font-family:monospace"><br></div><div class=3D"gmail_default" sty= le=3D"font-family:monospace">- "Automatically remove from project list= projects that were deleted.<br>- If non-nil, remove automatically projects= that doesn't exist anymore<br>- from the project list."</div><div= class=3D"gmail_default" style=3D"font-family:monospace"><div class=3D"gmai= l_default">+ "Remove inaccessible project list entries.<br>+ If \\=3D&= #39;list-read...etc.</div><div class=3D"gmail_default">+ If \\=3D'list-= write...etc.</div><div class=3D"gmail_default">+ [whatever other conditions= seem reasonable]<br></div><div class=3D"gmail_default">+ If nil, no prunin= g is performed."</div><div class=3D"gmail_default"><br></div><div clas= s=3D"gmail_default">-Stephane</div></div></div></div> --0000000000001de4a706321a648e--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 6 Apr 2025 01:38:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 21:38:46 2025 Received: from localhost ([127.0.0.1]:45427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1EyD-0000X2-6Y for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 21:38:46 -0400 Received: from mail-oo1-xc44.google.com ([2607:f8b0:4864:20::c44]:46512) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u1Ey3-0000We-IV for 77566 <at> debbugs.gnu.org; Sat, 05 Apr 2025 21:38:41 -0400 Received: by mail-oo1-xc44.google.com with SMTP id 006d021491bc7-5fcef5dc742so945378eaf.1 for <77566 <at> debbugs.gnu.org>; Sat, 05 Apr 2025 18:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743903509; x=1744508309; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZO1mcwbNZVcxzNS2UWDgnFciBgYOCNtYdAptrihriVY=; b=XiNF/S1mu/s2Ld/1uRqS0FocfLh63svLAqTMMzlrU7cc7ObclXaMSk6/6sWUBuCGe1 fsfjXrr15uRUmOcLvIPIFScBAgjTao+cmPq5R0mjKDSOyyydS3PzE2gFkuvgzN+Bna0d ZhhRWIrPSnqNzVKwoffUT3mMjDdEXIkpOE/fNrYM+3k58NY1LvUJu9fDAZ5/E+rMn7I0 wKCZ+plHuvi3XMKkUVQ63SVHab5qdeRmt4vJy/SOLioZle97jyfZ/iSSNBCfOjXDWaSb Er8KRxHs33DPmEUTB6Nztn4nB8d1+x6KUO+4nAI6TsoXYDpi9ptU9gfsdegrmMM7KvkZ LgyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743903509; x=1744508309; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZO1mcwbNZVcxzNS2UWDgnFciBgYOCNtYdAptrihriVY=; b=uBVBy5sJ5fzVZn6c/8yfAwLnVhd9qbA8LIarsD97tlcQDgkypgK6JeZ3KLCwTKxHmv ZTQiuqjwH70BMYCleua7hjTbkck6RNwQLluHb71hBEOkWsWq/298fYSIqGFiUwcuxuEA KUAk28Im/YnTQQ1ZlgI8T6f3RXG5huzhBQOFl+PCtZfuP6tQJf/BMROMx7SgwuhP87fV 5UYAs/dmbrF0llfFoUaZa9P92VINTKYMjJTMJRvgehZb/7Te3NytucIut9ffTzPjQBjc awcsLamOlO3dbzJjA6ov+ZNw7aM5DwHKB8GHlKRmbBc7aObd8nc6wY1xGlFbNNrebOE7 OG1Q== X-Forwarded-Encrypted: i=1; AJvYcCUdQT5YClTsm8HyNaVNhWvKgg8iCX7iM5ksoUPDQs8DRpRnwuvt2Qu3MCuf9a0CDCzFE+3elA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxjQIjKoI2oDh+QncTs7irbmpmVUsHwrI6pv6JftITPOxHEP1Aj VBvYW9HejGEI4cMt2ebGVhZao+3nlNIkeoo0t/p9yybzd1LFR/8A X-Gm-Gg: ASbGncsV5K4AjmWXRpdBa8Z/1neRWOeLOe4gn8oTZZxxVNBOY3oIRiaQvicZreRtuBF m1xhflVl/4lKPQOhhFc8EBr9ly92AFXca9iRrlHAcSEo18Gxc9nYAslxndV7bRZD0yx+7yDkuIT uva8EuNam2C3BIJspgOQ5yFxcOj/KwggeGGfwOnnnv6Vgf7sApwPSoSetMgaVfbxPIOtP7bt4Re Bza0enD+e32kGniEh08wsupSOYK7UPid8lKmtyRhQ7zXdnRZ02H4a/rOUCh6gfU8hdb4EkYjWQb MJdngifpKiNb X-Google-Smtp-Source: AGHT+IG4C6sEyFwsDnUcBUPs/XgOexv8oz383/wMFLwgfdtGWMJ1TqkE/egE0Fbd8yPtuXfZWljxpg== X-Received: by 2002:a05:6820:1606:b0:603:f903:c85a with SMTP id 006d021491bc7-6041ff7dbaemr1919841eaf.4.1743903509449; Sat, 05 Apr 2025 18:38:29 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6040c4cc891sm1245462eaf.9.2025.04.05.18.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Apr 2025 18:38:28 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: eg642616@HIDDEN Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87frim2jt0.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> <87frim2jt0.fsf@HIDDEN> Date: Sat, 05 Apr 2025 19:38:27 -0600 Message-ID: <875xji2hnw.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, 77566 <at> debbugs.gnu.org, Sean Whitton <spwhitton@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Sending a better patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-option-for-automatically-delete-non-existent-pro.patch From 23dab12d06101f8f91c4994cc109774a81012767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Sat, 5 Apr 2025 16:18:27 -0600 Subject: [PATCH] Add option for automatically delete non-existent projects. (bug#77566) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-auto-forget-zombie-projects): New user option. (project--remove-from-project-list, project-forget-project) (project-forget-zombie-projects): Allow not to show forgotten projects. (project--ensure-read-project-list): Call `project-forget-zombie-projects' only if `project-auto-forget-zombie-projects' is non-nil. --- etc/NEWS | 5 +++++ lisp/progmodes/project.el | 35 ++++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc63d03eafe..34ffec598ad 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,11 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. ++++ +*** New user option 'project-auto-forget-zombie-projects'. +This user option automatically remove projects from 'project-list-file' +that have been deleted. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e2cd5bfa231..5d986cb60a0 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1551,6 +1551,14 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-auto-forget-zombie-projects nil + "Automatically remove from project list projects that were deleted. +If non-nil, remove automatically projects that doesn't exist anymore +from the project list." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1888,7 +1896,10 @@ project--read-project-list (defun project--ensure-read-project-list () "Initialize `project--list' if it isn't already initialized." (when (eq project--list 'unset) - (project--read-project-list))) + (project--read-project-list)) + (when (and (consp project--list) + project-auto-forget-zombie-projects) + (project-forget-zombie-projects 'no-message))) (defun project--write-project-list () "Save `project--list' in `project-list-file'." @@ -1936,23 +1947,24 @@ project-remember-project (defun project--remove-from-project-list (project-root report-message) "Remove directory PROJECT-ROOT of a missing project from the project list. If the directory was in the list before the removal, save the -result in `project-list-file'. Announce the project's removal -from the list using REPORT-MESSAGE, which is a format string -passed to `message' as its first argument." +result in `project-list-file'. If REPORT-MESSAGE is non-nil, +Announce the project's removal from the list using REPORT-MESSAGE, +which is a format string passed to `message' as its first argument." (project--ensure-read-project-list) (when-let* ((ent (assoc (abbreviate-file-name project-root) project--list))) (setq project--list (delq ent project--list)) - (message report-message project-root) + (when report-message (message report-message project-root)) (project--write-project-list))) ;;;###autoload -(defun project-forget-project (project-root) +(defun project-forget-project (project-root &optional no-message) "Remove directory PROJECT-ROOT from the project list. PROJECT-ROOT is the root directory of a known project listed in -the project list." +the project list. +If NO-MESSAGE is non-nil, don't display a message about project removed." (interactive (list (funcall project-prompter))) (project--remove-from-project-list - project-root "Project `%s' removed from known projects")) + project-root (unless no-message "Project `%s' removed from known projects"))) (defvar project--dir-history) @@ -2117,12 +2129,13 @@ project-remember-projects-under count) count)) count)) -(defun project-forget-zombie-projects () - "Forget all known projects that don't exist any more." +(defun project-forget-zombie-projects (&optional no-message) + "Forget all known projects that don't exist any more. +If NO-MESSAGE is non-nil, don't display a message about projects removed." (interactive) (dolist (proj (project-known-project-roots)) (unless (file-exists-p proj) - (project-forget-project proj)))) + (project-forget-project proj no-message)))) (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 6 Apr 2025 00:52:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 20:52:22 2025 Received: from localhost ([127.0.0.1]:45375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1EFK-0006mM-Hv for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 20:52:22 -0400 Received: from mail-oo1-xc44.google.com ([2607:f8b0:4864:20::c44]:51219) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u1EFH-0006m6-OH for 77566 <at> debbugs.gnu.org; Sat, 05 Apr 2025 20:52:20 -0400 Received: by mail-oo1-xc44.google.com with SMTP id 006d021491bc7-601c469cce3so735314eaf.2 for <77566 <at> debbugs.gnu.org>; Sat, 05 Apr 2025 17:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743900734; x=1744505534; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=tbA6uHUhCCiqwYFhHGXdpSyPPNvOlqfXTgKCzsVDiHY=; b=OL9/xzW/mElVjBVdUPGOpP0qdwsIbwstEjlplRMbd8PVtu2MLeJBZ2cZQcIdrICjID h9ANmZ651WSUow4IwsFgW5dhN+LKqPSgw47utvWCfnOv9gBI3ctvBZYetSnpsm99g9eO wYGFmbZEx/I2yPZx5ioASxSVon0Qh7tuKbjGZCm8e8hphgXyhK+ojRj+ktyZpZRNll5p nlaTAMv1wlTyui1/U5hNc+2Pqs0ksdABdMRZYo7K9XRb9GILpHMDO8GzzU57bzlbuz7I lXtkBksKadlyuUpqprRnmEm/coHtjqhuIbIvki1M729EOIqpWyaiGq7r8MyqIoSPM7tg Gguw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743900734; x=1744505534; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tbA6uHUhCCiqwYFhHGXdpSyPPNvOlqfXTgKCzsVDiHY=; b=ESTlPVIOns4jvz3hawNNqSd/+GgWI0TNuwNws070cm8rpnDxOUMGw2CmDTWROMqLiY HrukFosEwDbISL9gM7zyq9NjNweAhX4ZuSuhb1d05cV9tKkhpHBvEcNJ83QIqzlqrkCF EUHEOiLUCvKQET5Zj9XPmuiAgqlUo2fFQNJG4CO5lupgsdrtD792GMR0h2skqKWrQ8rs b8q80KmipE4nxzqMi7LavuzTC4ke5bNEKk1aP8k/xwP8fdIN/LdRQvRTRG/UOv9to52m 14Se4uDt/gIXt0YCqfe6jlKotCkiTXDAhhGy052dhXVbj/VMa02uFiSe4vMMA/xSYnl7 rpaQ== X-Forwarded-Encrypted: i=1; AJvYcCVrxmd2Uoyd4SAWKkk5CM5qo2/7rJzjqNAJfPT4xotwaOq4EK4B4Iw9rRm81CE0IPhJHppWYg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxoUtT7Vd1m+QeTqjYW21qQQOlVx6D+vzNGSng/m1RdknvcbvUF YAYN4bBLy/fBkqzWQCksEGPGcoeB5SaeqYQ42moCOxVeTd1alHzTDXkQ6+4e X-Gm-Gg: ASbGnctSGwFpgarJvcCIUAEeYMIJgzY58y9Zja28trpMXj2xXd7y1r7QNeg/KGvN7PR 7RwEOZIufEXhjS07aCQ6dj6Ab7vZCLFmenV7qr8eVOT+O5DIw47m3FPGdFPxtJ5fOctQiPxI1le alcwV5dhT5OEP69jE8wXkCmS1O+bo7IBYGQYiVVv+Y4kkx5qyQuVIFUvOkkWDIpaYlKEMOUEq2M unXJvI2AnI6N5jSsxGofYuNGkjQHPhzv+BwdS5FBv76Z2WTmyvvcEHpW2R4b5AFmp+z1yrWDXpr PUieE2ZpGTOW X-Google-Smtp-Source: AGHT+IHI06d5lSn2wuYGKc92tdwy9FCJ89706EOw2mJOgq8nhE6tOvDHCDkXuNaNLzXO3MhLdgLjDw== X-Received: by 2002:a05:6820:2214:b0:603:fd3b:aef6 with SMTP id 006d021491bc7-60415810f78mr3682238eaf.8.1743900733705; Sat, 05 Apr 2025 17:52:13 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6040c5aea3esm1256424eaf.37.2025.04.05.17.52.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Apr 2025 17:52:13 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: Sean Whitton <spwhitton@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87jz7ynndw.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> <87jz7ynndw.fsf@HIDDEN> Date: Sat, 05 Apr 2025 18:52:11 -0600 Message-ID: <87frim2jt0.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, 77566 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.7 (/) Sean Whitton <spwhitton@HIDDEN> writes: > Hello, > > Thanks, though why do this only when switching projects? > Why not do it proactively whenever fetching the list of projects? > Performance concerns? Yes, but depends on how many projects one has. (and because i forgot to add it) -- - E.G via GNU Emacs and Org.
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at 77566) by debbugs.gnu.org; 6 Apr 2025 00:29:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 20:29:30 2025 Received: from localhost ([127.0.0.1]:45353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1DtC-0005fP-DM for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 20:29:30 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:41342) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1u1Dt9-0005f7-B1 for 77566 <at> debbugs.gnu.org; Sat, 05 Apr 2025 20:29:28 -0400 DKIM-Signature: a=rsa-sha256; b=wt/+FNOaD5ueY3mA81FuoUF3P5t2tTV6zQAzCOuYc+m12mUK0CIJFKfwID+qVEVCNVy624sG/3Na191yNOhW/WozqM9KduCxFmT4ceFmYXiVqqNuRSM1Un5njhO2wfh1jjUgH/W5CQhxRCcneI0vemMs90qw0Alt0fLaXWdNig5f5IWk1Qffh+n2MAiOvKlWx7gHLHrpSkfshsloH9wv9MK0CPxtaR24L7IWJU4NnzVUnD3QQqTYaJ8pDW4BMy/URCWyo2OPkqP6cowxN6gqvn68uHjkuG/ltOcUd/jJEa+GIL29AkLJ9/Yz8GPqM+T8OXjrqMwkXr2j72drBN7x7Q==; s=purelymail1; d=spwhitton.name; v=1; bh=2b5j77VVS7Jq2lhWVBrPQ8wdF0o8FMxqeh1IF8R8iag=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=D/e3JGHl8zKpRuZka9/CwYUti26SoiA8VveCWfj2ucEVOLg/lrJO1YBiHPX4JA8ijSxaI3SidIqJG7GmyX0OuevpIeys9Yui6MYXr0m7HJTmnEyH7DnC5HcdOET6XNh6T+2qZy/Wz4Yk0NOdR6ScfV8tVm1jYi+X3EDU86fBQtJA0/W44hO1M29SQKRQVmY6ZLRMkc9JpssKUk12Z0R7lD2xHtNlQIHFvYNXHZZXIUx6TQVXudVYzjViocIboBEetKyFIFC1ORm58gH8nDvLDfhUrISPI36oiSDvXR0CM9NO1+DRiNM9xudql3dTkdps/s1utuJOuqe/Qd1tZ34qUA==; s=purelymail1; d=purelymail.com; v=1; bh=2b5j77VVS7Jq2lhWVBrPQ8wdF0o8FMxqeh1IF8R8iag=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 77566 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1794527911; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 06 Apr 2025 00:29:21 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 343697EF4CB; Sun, 06 Apr 2025 08:29:15 +0800 (CST) From: Sean Whitton <spwhitton@HIDDEN> To: Elijah Gabe =?utf-8?Q?P=C3=A9rez?= <eg642616@HIDDEN> Subject: Re: bug#77566: [PATCH] Add option for automatically delete non-existent projects. In-Reply-To: <87jz7y2mn3.fsf@HIDDEN> References: <87jz7y2mn3.fsf@HIDDEN> Date: Sun, 06 Apr 2025 08:29:15 +0800 Message-ID: <87jz7ynndw.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77566 Cc: dmitry@HIDDEN, 77566 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello, Thanks, though why do this only when switching projects? Why not do it proactively whenever fetching the list of projects? Performance concerns? -- Sean Whitton
bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 5 Apr 2025 23:51:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 19:51:13 2025 Received: from localhost ([127.0.0.1]:45314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u1DI8-0003tx-NI for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 19:51:13 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58904) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eg642616@HIDDEN>) id 1u1DI6-0003tW-54 for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 19:51:10 -0400 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 <eg642616@HIDDEN>) id 1u1DHy-0004xe-05 for bug-gnu-emacs@HIDDEN; Sat, 05 Apr 2025 19:51:02 -0400 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <eg642616@HIDDEN>) id 1u1DHw-0001rm-9g for bug-gnu-emacs@HIDDEN; Sat, 05 Apr 2025 19:51:01 -0400 Received: by mail-ot1-x343.google.com with SMTP id 46e09a7af769-72b7a53ceb6so1757549a34.0 for <bug-gnu-emacs@HIDDEN>; Sat, 05 Apr 2025 16:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743897058; x=1744501858; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=GzySl2ImKMuIOdhxZR60V9vgd7jfTSHBj38wSdnSMV4=; b=c6VKys+GyMUL581BY8nDJr+O9lSc6LsH5GC/4lGOrJht3CjGThXcGovD1yp1HTuzft 6uDB5VWG/fxOtdWGIUyWFPsbJwWD4us8+fZYxuUkDZn8uZhv/Kia7zIqxzOlz665Ofew Dgxk1XrRa3YtEV0SOsyY33H8oanFCfTa7g+f1i8dmJZnyFw1BfxhAzVK17RD/HzZeshP pab5qICLQcM6ZK1rScx2SkGpGKdv0tT4XjMPUEMM/mwuntUfn+PZHWnKIe3PMy3cVrUe LAgkKEnsfJLo6L6JQz63o3pcAJGFUCuW1kFr8Jvqd3GtnBzreBfvx9HUWpVlaQqnlRkV PEhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743897058; x=1744501858; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GzySl2ImKMuIOdhxZR60V9vgd7jfTSHBj38wSdnSMV4=; b=onPvvBpt0CnciKxJVeV8OqAheAL/UM5dQf8g3oBfJOiMSIYG1/OTF3ynBQC1RBPp0T a6m5kKsVetMVOIpwrkm/0cVzdY4QA3GOA+9f1cAVUtLCLkzI0vpTq0kLDQO3a14A1i+a cI3mPGptD3tI2SrCmnkZVOq2GOp8pRZvGQAcEVvieO8iu0ru07enZ1F6BvH3W97wYH2x TTM1r9DobaCDmMwrZYNIGCsoG/xSf6kCjwo1KDzDt63X3ZBdqI8r4Yv9FCT6Pao8dt2C nIO59QENNEy8lufXYwSu0qn9snvX7kXYhKQ7zu0gEUvHVZi6f1qHABFT1lTm0Gcw9VXU O7Yg== X-Gm-Message-State: AOJu0YwNpU+aqzShYMw5RdpjiRftBc0TvrTeuP7FQSQKq6hc36sr5QtG wPCySZp1jkTaqAUa/gt85CPoa8TrPpixI5O/DlqSYf99n0xrkloQuBTgNrqN X-Gm-Gg: ASbGncvw+UCHrckC1q62grv1cCPo4QZKZwnkM2ORw2LJms8LH66yZdefWGLzv6io0S8 6RF3YmRlcKr39I0/cn1NnSL5rvXllBz0p4M6Ui/Zwfi28OvfIqlOFqICquZ+YjpIC3hA/OZBTDn 8eOJ8+W3N3rqb1TS1snyKNkKFAU6hImq7TXSXkT0lyaCKTYL81vzy/LY4jqxq76ykFztcQjdYtP 9eJviuEHiA0J/AJCe7ln9Ivs/AxnqRWHoROgRhEI1r3QW2v0DdnL5DXwO6BFPfcNBq29fbfcY24 QcPWbMIgnXBu X-Google-Smtp-Source: AGHT+IGxclnaty7vso6kToD//6p+xUheC4OdDAXMZjPH0Aor32qdu121oQbWB3jkb3KUw1FeS+TmYQ== X-Received: by 2002:a05:6830:6117:b0:72a:e65:e65c with SMTP id 46e09a7af769-72e36e7f448mr4510120a34.11.1743897058417; Sat, 05 Apr 2025 16:50:58 -0700 (PDT) Received: from fedora ([2806:10ae:e:79da::1]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72e305114a8sm1220488a34.18.2025.04.05.16.50.57 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Apr 2025 16:50:57 -0700 (PDT) From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?= <eg642616@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [PATCH] Add option for automatically delete non-existent projects. X-Debbugs-Cc: dmitry@HIDDEN Date: Sat, 05 Apr 2025 17:50:56 -0600 Message-ID: <87jz7y2mn3.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::343; envelope-from=eg642616@HIDDEN; helo=mail-ot1-x343.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) 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: Tags: patch This feature automatically remove from project list projects that were deleted, only when `project-switch-project' is being used. This acts similar to `projectile-auto-cleanup-known-projects' from projectile.el Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.2 (/) --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain Tags: patch This feature automatically remove from project list projects that were deleted, only when `project-switch-project' is being used. This acts similar to `projectile-auto-cleanup-known-projects' from projectile.el --==-=-= Content-Type: text/html <p> Tags: patch<br /> </p> <p> This feature automatically remove from project list projects that were<br /> deleted, only when `project-switch-project' is being used.<br /> </p> <p> This acts similar to `projectile-auto-cleanup-known-projects' from<br /> projectile.el<br /> </p> --==-=-=-- --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-option-for-automatically-delete-non-existent-pro.patch From d426ab218feb1b2ce8c203991374a9e987f2a379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <eg642616@HIDDEN> Date: Sat, 5 Apr 2025 16:18:27 -0600 Subject: [PATCH] Add option for automatically delete non-existent projects. (bug#) * etc/NEWS: Announce changes. * lisp/progmodes/project.el (project-auto-forget-zombie-projects): New user option. (project--remove-from-project-list, project-forget-project) (project-forget-zombie-projects): Allow not to show forgotten projects. (project-switch-project): Call `project-forget-zombie-projects' only if `project-auto-forget-zombie-projects' is non-nil. --- etc/NEWS | 5 +++++ lisp/progmodes/project.el | 26 ++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc63d03eafe..37e7a32f09a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,11 @@ invoked standalone or from the 'project-switch-commands' dispatch menu. This user option describes projects that should always be skipped by 'project-remember-project'. ++++ +*** New user option 'project-auto-forget-zombie-projects'. +This user option automatically remove projects from 'project-list-file' +that have been deleted when switching projects. + --- *** New command 'project-save-some-buffers' bound to 'C-x p C-x s'. This is like 'C-x s', but only for this project's buffers. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index e2cd5bfa231..6a38f49978b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1551,6 +1551,14 @@ project-ignore-buffer-conditions :group 'project :package-version '(project . "0.8.2")) +(defcustom project-auto-forget-zombie-projects nil + "Automatically remove projects that doesn't exist anymore. +If non-nil, remove automatically projects that doesn't exist anymore +when switching projects." + :type 'boolean + :version "31.1" + :group 'project) + (defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -1936,23 +1944,24 @@ project-remember-project (defun project--remove-from-project-list (project-root report-message) "Remove directory PROJECT-ROOT of a missing project from the project list. If the directory was in the list before the removal, save the -result in `project-list-file'. Announce the project's removal -from the list using REPORT-MESSAGE, which is a format string -passed to `message' as its first argument." +result in `project-list-file'. If REPORT-MESSAGE is non-nil, +Announce the project's removal from the list using REPORT-MESSAGE, +which is a format string passed to `message' as its first argument." (project--ensure-read-project-list) (when-let* ((ent (assoc (abbreviate-file-name project-root) project--list))) (setq project--list (delq ent project--list)) - (message report-message project-root) + (when report-message (message report-message project-root)) (project--write-project-list))) ;;;###autoload -(defun project-forget-project (project-root) +(defun project-forget-project (project-root &optional no-message) "Remove directory PROJECT-ROOT from the project list. PROJECT-ROOT is the root directory of a known project listed in -the project list." +the project list. +If NO-MESSAGE is non-nil, don't display a message about project removed." (interactive (list (funcall project-prompter))) (project--remove-from-project-list - project-root "Project `%s' removed from known projects")) + project-root (unless no-message "Project `%s' removed from known projects"))) (defvar project--dir-history) @@ -2122,7 +2131,7 @@ project-forget-zombie-projects (interactive) (dolist (proj (project-known-project-roots)) (unless (file-exists-p proj) - (project-forget-project proj)))) + (project-forget-project proj 'no-message)))) (defun project-forget-projects-under (dir &optional recursive) "Forget all known projects below a directory DIR. @@ -2302,6 +2311,7 @@ project-switch-project to directory DIR." (interactive (list (funcall project-prompter))) (project-remember-project (project-current nil dir)) + (if project-auto-forget-zombie-projects (project-forget-zombie-projects)) (let ((command (if (symbolp project-switch-commands) project-switch-commands (project--switch-project-command dir))) -- 2.49.0 --=-=-= Content-Type: text/plain -- - E.G via GNU Emacs and Org. --=-=-=--
Elijah Gabe Pérez <eg642616@HIDDEN>
:dmitry@HIDDEN, bug-gnu-emacs@HIDDEN
.
Full text available.dmitry@HIDDEN, bug-gnu-emacs@HIDDEN
:bug#77566
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.