From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Missing snprintf in ucrt mingw + vc-refresh in find-file hook? Date: Wed, 14 Feb 2024 19:29:02 +0200 Message-ID: <864jebx8dd.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5098"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arthur.miller@live.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 14 18:30:08 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 1raJ5D-00011H-72 for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Feb 2024 18:30:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raJ4G-0001EO-Cp; Wed, 14 Feb 2024 12:29:08 -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 1raJ4F-0001Dz-1G for emacs-devel@gnu.org; Wed, 14 Feb 2024 12:29:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raJ4D-0007e4-Ta; Wed, 14 Feb 2024 12:29:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MVZLtG7qpnipsNK6X95/gar/jVCWa55u2ob9EDWaX80=; b=S3k0dMt+/dSW Ndbyt6Y3TwosaFSIYbbz9RAKR+FWZhK+IZ0Av1Pj1j/ycSHjJBStg+JbBtroTsh7Jjo437XjhYBD2 Ew9sxuVfZW/HKVNhVSlgspPrMQ85sP9j6hD82a5XcCLWi4CWgJmoDF34xChZ0GthlEv00AsmBiqXb Pczze2waYr/weYphsLf9xLxddcfnt/AAkhOJyPe+Uo5xDtcXX8esNm7QSi+d90jXjJ+Ry3oEGgm6o uRZy18lvfWHuBR67v8EOm2ZSKG1MEZWyhxk0Wy4JHB77C1zzL+ejqLBjOOT/r54NUXpese3USkje2 EGXiT13S/QGUnZL9ZGROpA==; In-Reply-To: (message from Dmitry Gutov on Wed, 14 Feb 2024 19:01:10 +0200) 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:316208 Archived-At: > 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?