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: master daea9b3 1/2: Read mailcaps again only when necessary Date: Mon, 01 Nov 2021 20:13:54 +0200 Message-ID: <83lf27lp5p.fsf@gnu.org> References: <20211101135344.25800.81476@vcs0.savannah.gnu.org> <20211101135346.2EBEB20B72@vcs0.savannah.gnu.org> <87tugvrerf.fsf@gnus.org> <83sfwflrox.fsf@gnu.org> <87fssfrdul.fsf@gnus.org> <83o873lrg2.fsf@gnu.org> <8735ofrdhz.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27131"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 01 21:28:12 2021 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 1mhdue-0006q0-1y for ged-emacs-devel@m.gmane-mx.org; Mon, 01 Nov 2021 21:28:12 +0100 Original-Received: from localhost ([::1]:37766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhduc-0005he-Dl for ged-emacs-devel@m.gmane-mx.org; Mon, 01 Nov 2021 16:28:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhbop-0002dR-BM for emacs-devel@gnu.org; Mon, 01 Nov 2021 14:14:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhboo-0004Fr-7Y; Mon, 01 Nov 2021 14:14:02 -0400 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=Nt3TjD+NcOIsJA1S7+8fOnpTErv+veZ6TchB1y2m2RY=; b=cwvJ1lVoPq2T dHYsqUjYQt5uHDG4v+posLIU9D6zf84HmNrusH/8Oq4HyrnqOEhgnlUvhZjaHLCycxdQr/q3UDorL eSRP27RZJQmSUjKyM+zXLIAJRzxR+Eu9REIFrr/6WyFhnrN8rb6sckIhh1tK9FdaknAlxft0Mhoxs p47NthbkPHjh17p9SGm/NTEL5R13RdKQawOhPB0u2zf6s0YDYUvTm5pL5jE6ZapRajB05cg/1jJVz ZtTTJAvFF9tBh+IXt1QZyBYRn6XXIUyZ5cHx3GngoLsFQChIKmio9sXVTzyh0xYr/lOsGAlaU+ZFN 4UJaDy0RJh7Y+A7dQRdBWA==; Original-Received: from [87.69.77.57] (port=4703 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhbon-0004CF-O6; Mon, 01 Nov 2021 14:14:02 -0400 In-Reply-To: <8735ofrdhz.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 01 Nov 2021 18:29:12 +0100) 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" Xref: news.gmane.io gmane.emacs.devel:278430 Archived-At: > From: Lars Ingebrigtsen > Cc: monnier@iro.umontreal.ca, gregory@heytings.org, emacs-devel@gnu.org > Date: Mon, 01 Nov 2021 18:29:12 +0100 > > Eli Zaretskii writes: > > > What if we have the same file name in several different directories -- > > how will you record the files so they all get different hash slots? > > Oh, you mean relative file names? I think it's up to the caller to > decide. If they don't want that, then give an absolute file name, and > if they do want that, then don't. But that's contrary to every other Emacs function that accepts file names. They all interpret the file names relative to the default-directory. And so do the primitives the current implementation of file-has-changed-p: they expand the file name internally. But the file name that gets recorded in the hash table does not follow that rule, and that is the problem. because this way it makes no sense to use relative file names, unless the caller asks for trouble. So in practice, every caller will have to pass an absolute file name, which again is different from all the other APIs we have that accept file names. Once again, the key for recording the time stamp is the file name you pass, so that key must be unique, and that means file-truename.