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 05:42:52 +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> 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="20511"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 14 04:44:06 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 1ra6Bp-00058J-21 for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Feb 2024 04:44:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ra6As-0001tH-Jv; Tue, 13 Feb 2024 22:43:06 -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 1ra6Aq-0001sk-Hc for emacs-devel@gnu.org; Tue, 13 Feb 2024 22:43:04 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ra6Al-00014f-KW; Tue, 13 Feb 2024 22:43:04 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id F09B532009FA; Tue, 13 Feb 2024 22:42:55 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 13 Feb 2024 22:42:56 -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=1707882175; x=1707968575; bh=E9b6zL+MjBJJ60esynxFsfacbWByHPjNQTabKU1U02E=; b= AKAO4JhPN7EO/F+T1TFA7romhY159sCypibcV5Q8pzzHv8CrQq00aygGqitfznJO 4EeLz9qWfFurM6fGfFLsjMmAxk0WSgo5PYNBrUQihGOZbWQiGrKP/Bwc1Ez9qzMm Wb9e5NRzR6RmLP6ytkvTBKrKBNQu5by+mbA0lZoPisgfdxY7x7K0yPfOlgFRS+ob 7K2w3gSeoQ0MFmS+YIEVutb/xo6ePI1WgNR3d9NcAVBL16pnMkP+terOeD3SRKv5 9FvYI00h/jL/tkPKox2ZvN+UAT4w0o5dli2DjKi7lH7JZQtipomyYaI1AhoLsg3q 5puW0TwVG5TYvXWANKeq/w== 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=1707882175; x= 1707968575; bh=E9b6zL+MjBJJ60esynxFsfacbWByHPjNQTabKU1U02E=; b=p Dq5aZPkLUzWRahPUJyfkbbWu62ip1Hb1iDp9c+hFV2BEvLvgGQmnAiGb+05K8nAD 3y26qHV5w5zhn64MHR+7fUt3A7503HvUz4HCgPU7rxrF3nv+dlwDNH9w8eshurcw etqy9pQOYLiWRWKtYSrrKAuHQwC07tlwslMx3PpkCLKtqpeVeEnpKX/y1/lgMS3o nRnoWTqQ1WmJiEEB2ZxGZT6IPhCy1MFk0K/xdDj7iwNE7MTSwKccIFWRBJoqUlt2 1G+JvBhRi/mesJJsR+sGP7fh3k40+02/Kk/zuLha1txO3F8vY6QaSFf4p6BuRvow 3HbI+ZQYCahjv9XQOZgyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeigdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Feb 2024 22:42:54 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.20; envelope-from=dmitry@gutov.dev; helo=wout4-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, 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:316196 Archived-At: On 14/02/2024 01:10, Arthur Miller wrote: >> We could try dropping the forced refresh from find-file-hook. Then we'd have a >> function there that should be called differently, which would just reset the >> saved backend/status for the file, and the cached value for vc-mode (the >> mode-line element). > > I didn't suggest to rebuild everything :). Just an option to remove the update > for those who don't want the update (I guess I am the only one). That's wouldn't be a big rewrite, I think. So far it seems the required changes would be limited, that's why I outlined the idea. >> Then, if the user disabled showing the VC state in the mode-line, and doesn't >> have any other packages installed that use the status, Git won't be called, at >> least not right away. > > It would be one's own responsibility to keep track if it is needed by other > applicaitons or not. This why I asked, if there is something else than modeline > that needs this. > > I see defcustom declaration fo vc-display-status is changed from what it was in > 29.2 to what is now in the master. I guess you (or someone) is already planning > something in this direction? Was it meant that vc-refresh (or something in the > chain of call) decide to call git or not based on the value of that variable? > Looks to me like that was the plan, but I don't know the intentions. The idea behind it was something else: to be able to unify mode-line elements (from vc and project). > In case when list of files are checked, one can let-binding vc-display-status > to nil in vc-refresh (or the responsible one) so to not trigger git? vc-display-status only affects vc's mode-line element. >> So I would welcome such an experiment, especially if one is careful to retain >> support for vc-follow-symlinks. >> >> vc-after-save could similarly avoid doing the full refresh until the file's >> backend/state are requested again. > > When they request for the backend state; they could do so asyncrhonously to, by > starting a timer? The update will not be immideate; run first when Emas is idle, > if it is just the modeline; but third party apps, if there are such, can be more > picky. That's not simpler.