From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Missing snprintf in ucrt mingw + vc-refresh in find-file hook? Date: Wed, 14 Feb 2024 23:05:39 +0200 Message-ID: References: <6aed5106-b78c-49f1-8caa-a7f9d34c161b@gutov.dev> <207528e2-6bec-436e-8868-8e7b707133f6@gutov.dev> <86sf1wpjui.fsf@gnu.org> <8876d606-c4af-4a27-a1b1-4c3dea6d720e@gutov.dev> <86r0hfxgm9.fsf@gnu.org> <7ecaf383-081f-47ad-bd83-6f1fe300fddc@gutov.dev> <865xyrxa3o.fsf@gnu.org> <864jebx8dd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6649"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: arthur.miller@live.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 14 22:06:50 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1raMSv-0001U5-PF for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Feb 2024 22:06:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raMRv-0004aE-PG; Wed, 14 Feb 2024 16:05:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raMRt-0004Zj-Qe for emacs-devel@gnu.org; Wed, 14 Feb 2024 16:05:46 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raMRr-00035m-CP; Wed, 14 Feb 2024 16:05:45 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0FEC75C006A; Wed, 14 Feb 2024 16:05:42 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 14 Feb 2024 16:05:42 -0500 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=fm2; t=1707944742; x=1708031142; bh=+5iWlZ/M8yHZBAywv2ihaZmfbelWbrJ35VlX6A5rQlE=; b= TLx/PRR6hWRZwZJCyhAwIoC8af1yFJwkpsqxaf0uG3taj6e3tdNCDSofrUQk14cT M0VQLoR6EIGUrn5PnZdNhH4Z6gvjREZVLD/Pu1/+6u+ZOVmdMJz1Uel4owVCJID2 TG2giGghqJZKEwCN1Dc6cRQQBqvn4j7CZ3uiBXWpDNAsS5WftTKVzimywKZw8fg7 bacJM6d+LopWs9lJDUFgqc5ZTaScQ+2qbP6NS3uB68tv4NYEZ1Wya+M2oET2a6mi eDR4gqWfpQuh0o/N0D3ZakMxAGr1fw8dV5dPK6GsAUyDhriCBJ07nHqAXTSFXb/y RKJPXMZisUurTVPQt0yVmQ== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707944742; x= 1708031142; bh=+5iWlZ/M8yHZBAywv2ihaZmfbelWbrJ35VlX6A5rQlE=; b=x RQmOU133eQpw+03yseW6cActFD1ZPQeO536qXS+QrHlY9145toD4i/MbFpd8edlW hHrn6RSQDIdgdhVV4OzDzUswpqgTXF1W2wcK6n2EnguxsNNbqgKoHocDt1kAk0Az LHAPFKYAFEzWoXEynscg4tJV0FVIdCc5e9taWFHtb6Y9tRgwsLdl7M3Jlk/bdD36 YqNTCYGVKg/cDzZZpSoLK1MwY4NQ+e6XL15S7TSu4moumaNnQs+Gx+R87c+E3WF8 MLDJsjQ8vh23RvPEwTpR5jVsEIm7wSpx8C//+EdAHe/ioUPHmxH7Xf5zx43x9qHr N32g13MU8nZcKVJ7EcYWg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejgddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Feb 2024 16:05:40 -0500 (EST) Content-Language: en-US In-Reply-To: <864jebx8dd.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.28; envelope-from=dmitry@gutov.dev; helo=out4-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316211 Archived-At: On 14/02/2024 19:29, Eli Zaretskii wrote: >> Date: Wed, 14 Feb 2024 19:01:10 +0200 >> Cc:arthur.miller@live.com,emacs-devel@gnu.org >> From: Dmitry Gutov >> >>> My point is that find-file-hook has an explicit and very specific >>> trigger for fetching the VC information, whereas doing that from the >>> mode line doesn't have that advantage, and will probably need to call >>> VC much more frequently in order not to miss changes. >> Again: the backend and state are cached. Why would VC be called more? > How do you know when the cache is stale and needs to be refreshed, if > the only purpose is to show the info on the mode line? It's really a question of when to invalidate. And we can continue to do that when/where we do now (find-file-hook and vc-after-save), just without re-fetching the new values.