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: Mon, 12 Feb 2024 16:58:52 +0200 Message-ID: <207528e2-6bec-436e-8868-8e7b707133f6@gutov.dev> References: <6aed5106-b78c-49f1-8caa-a7f9d34c161b@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="39774"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 12 15:59:43 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 1rZXmX-000A6K-QY for ged-emacs-devel@m.gmane-mx.org; Mon, 12 Feb 2024 15:59:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZXlt-0006Io-AT; Mon, 12 Feb 2024 09:59:01 -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 1rZXls-0006IC-FP for emacs-devel@gnu.org; Mon, 12 Feb 2024 09:59:00 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZXlq-0003Us-1p for emacs-devel@gnu.org; Mon, 12 Feb 2024 09:59:00 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DEDB93200AA5; Mon, 12 Feb 2024 09:58:55 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 12 Feb 2024 09:58: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=1707749935; x=1707836335; bh=RjR38n/eRJ6aKQLDMon+PyvkFz7BKORk5BDW6QV8d0c=; b= n5GanW0yEeHjkck8VnuOSG5MpHf1yJB4p/IJBYrz5w8rnJ7Pn04quCUSiayxRry4 QAPpTocvJtRL+pA3UXEZ1IVfmGibJIgz+hQFHqjVzNpe4eHRfMV1r7Zg+CKvS4d7 5sXdcK8QsLlUD816FbNx5/9B/UHW4Z8ADBGIeHwe+9XyQCRLS047+YoCWS7QdWBw uzoAFhDCqRXTgpNEdt+PE1T3s0VD33Q0Obv7XupEUTSyHSDNbhDoEZ9m4Fw0WHc4 RNZT8RN+ycrU05qNH1uexWJqSM3wKPThg2c3TyXqejYuqPXpKrU1WVrc57ds+eKo 8Mo4r3a8Z0iSD6rDlwkhoA== 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=1707749935; x= 1707836335; bh=RjR38n/eRJ6aKQLDMon+PyvkFz7BKORk5BDW6QV8d0c=; b=n sV3WEDMnR8FwPCTbiCDIaokMO8G3uzjiQ/8AMNyyjihJJ1dsd0hNNxSkR/reu+HJ N59Po5wABKW+xjkjZjGfEsn5MwXFWQnrlRI1nCN+7/V/EWJYh6tAq/aWCx+Q0BSj jXWanmTAQKb53kGVkJWPwQu7doaeZhj2J0nspH44bk7JZM8YnI9I8gIs/6lZlxeI Zmr+QljYHKApujJbbds6M7NdZ7WJJ3rWmA+D1nN8wOReSxuCzslGLIemb3fFRh40 /QsT7i1R40iVHt3i82GLj0ThCeZwNixPboE34NRgRfDfmKc6b+iKBohXqTinDRV5 MIVkwKY06qJlI4XwKNlcQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefgdejtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Feb 2024 09:58:54 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.25; envelope-from=dmitry@gutov.dev; helo=wout2-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:316139 Archived-At: On 12/02/2024 15:56, Arthur Miller wrote: > Dmitry Gutov writes: > >> On 12/02/2024 12:06, Arthur Miller wrote: >>> Also, calling vc-refresh obviously results in a quite expensive call to git >>> process everytime I open a file from git repo. Is it really a good default >>> option? At least I interpret it so since emacs -q has vc-refresh in >>> find-file-hook. Why do we even need vc-refresh by default in find-file-hook? >> To have the mode-line indicator up-to-date, I imagine. > (setq vc-handled-backends nil) solved it. I would prefer such an expensive > feature to be opt-in not opt-out, or at least better advertised so I don't have > to find by a chance what Emacs is doing in the background; thanks. The fact of the matter is, it's relatively expensive only on certain platforms, but much less so on the main one that we keep in mind when developing Emacs (GNU/Linux). You might be curious to hear that visiting a file controlled by Git under MS Windows was ever slower in the past, and yours truly spent some effort reducing the number of process calls we take to compute a file's status (about 10 years ago or so). >> I imagine. > I would appreciate if you leave sarcasm out of your answers. No sarcasm here. Your question is valid: why not defer the process calls until some operation actually requests the file's status. The answer stems from the UI considerations. And if we show it in the mode-line, we have to update the file's VCS status eagerly.