From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uFPaLYW/DmUVTgEAG6o9tA:P1 (envelope-from ) for ; Sat, 23 Sep 2023 12:35:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uFPaLYW/DmUVTgEAG6o9tA (envelope-from ) for ; Sat, 23 Sep 2023 12:35:49 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6410A47A7A for ; Sat, 23 Sep 2023 12:35:49 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), No valid DKIM" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695465349; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Tj2wGOftxFqdSjEZhFEDjWteZks401tVMruNnuHMWgc=; b=An5ajQaWTb3Lb8ashUuWtMm92Vx8J9ISvzydLKpfldSnluQ2rwHNW2qGyPDEBHW/Iy41OF Tz5q7wlSPkBlyT+/JvmnoT18AYDxAmoqea/8d971v8ytPgNRQri+mA1sBgO5XnmkQi2oRx t9cOa3Sh10C2OF8p+4dJByjfCXTcQtg6RdT/VpJaYAVeuXYz47LF7zoedTlZZqdPxHhwnv SUqIdpdG7hl8+FybX43+LY74myFbebOwFAc//JBwsCJBpDDn3IpLRUYYCuftVKxbMS63UO ceiZZAm8rwxSJMgW4aUio06dd3ARy62m8U0C7U3NtPZlhhb9gjPGUaI40cZz+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695465349; a=rsa-sha256; cv=none; b=r2N6mftUdwmVCZ0/DZqK23kBmYolAgesAZjNma/kCzaJoGP0rUBUJKuhoOeXhlWAooEIBj tH53G0DZAuUzHLRKNCec6AaqTJZKo4z4krvffHhn/snzWh5UOA8eQwhxronZ39QD2vzyQg BQkvKn/60+jlFhNXufjeXw50vsfblJXo4BZLUSBdIGKC6GnJys+dvMo/p705ARoXH8vq8I j+tz4zL/tXOEf205dPIGAmFmGCzlCtC7y5HJDD6AXLFOiSHX32B1GmRCWcamLKLqMFAwy9 f80/rFgERyrOhyupRYb9GJ+q5favrkMc05x2uguP2MXQq11cu8HgU17RwCiV2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict), No valid DKIM" header.from=posteo.net (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjzyn-00038U-IW; Sat, 23 Sep 2023 06:35:17 -0400 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 1qjzym-00038H-B0 for emacs-orgmode@gnu.org; Sat, 23 Sep 2023 06:35:16 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjzyk-0003nQ-Gh for emacs-orgmode@gnu.org; Sat, 23 Sep 2023 06:35:16 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C7C25240103 for ; Sat, 23 Sep 2023 12:35:11 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rt5B71czLz6tm4; Sat, 23 Sep 2023 12:35:11 +0200 (CEST) From: Ihor Radchenko To: Suhail Singh Cc: emacs-orgmode@gnu.org Subject: Re: [FR] Make notion of "modification time" configurable during publishing In-Reply-To: <874jjmm16y.fsf@gmail.com> References: <874jjmm16y.fsf@gmail.com> Date: Sat, 23 Sep 2023 10:36:28 +0000 Message-ID: <87il812n2r.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -2.90 X-Spam-Score: -2.90 X-Migadu-Queue-Id: 6410A47A7A X-TUID: zIUMKOloz8nd Suhail Singh writes: > Ihor Radchenko writes: > >> I am a bit confused. What do you mean by "git author date" and "git >> commit date"? > > In the output of `git log --pretty=fuller`, there is AuthorDate which is > distinct from CommitDate. In case unfamiliar, an elaboration on the > distinction: . I see now. But do you actually use one but not other in practice? >> I think that we should use an alternative approach. Both "git time" and >> "fs time" are only an approximation. The true decision to re-publish an >> article should be triggered by article text being modified. So, we may >> better decide based on the file text hash, not the modification times. > > For it to work, the "file text hash" would have to also take into > account the "file text hash" of included files, or the decision to > re-publish would have to be predicated on the hash of included files as > well. I.e., the equivalent of this logic in > org-publish-cache-file-needs-publishing : > > (let ((mtime (org-publish-cache-mtime-of-src filename))) > (or (time-less-p pstamp mtime) > (cl-some (lambda (ct) (time-less-p mtime ct)) > included-files-mtime))) And the code right above the quoted already looks into INCLUDEs. It should not be too hard to add buffer hash calculation there. > But assuming the existence of equivalent logic, yes something like a > file hash would work. In fact, at least in the case of git, the VCS > could even be queried for it (via git hash-object). Probably an overkill. It will only work for files without includes and force us to use exactly the same hash algorithm. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at