From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id wIINIzO6EmUUFwAA9RJhRA:P1 (envelope-from ) for ; Tue, 26 Sep 2023 13:02:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wIINIzO6EmUUFwAA9RJhRA (envelope-from ) for ; Tue, 26 Sep 2023 13:02:11 +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 F06D440E3B for ; Tue, 26 Sep 2023 13:02:10 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fMUJTpF1; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695726131; 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:dkim-signature; bh=sb0zoGMPm/4efM+LQGfBDsio1zzVdFEMqe72ScLfYK4=; b=HNSLHks1mizDD68iTBLgvCZZ6e2jrifKAJY3gvDOWzarD0L00L+YwpuwhSk2s6mlSDEl2A 7ahUxYUpK02WdfcPXcAIOlg5u00TNhTbJ8zbculU1dtH8jfpZYR41o9iCUA9dRd/jqiSiG FlJ03TQwfF6zjbuoLOL4QkX2KuHEyAhNtZaxdXBRUjMPLP68sPELpjZHkXK7qn5hDq6HJn 2QhQ1WQ+epjeSyj/r4DvVbDs/ZFohHrhq4vwV8gshslaEM5nbbDZ5sGcm5oml364YMbKMs 9leunF71MthWUGbmjALSq9+wpl2BYhRDbupeNO0qQsJgAjl52+hSoORvTEmMrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=fMUJTpF1; 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=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695726131; a=rsa-sha256; cv=none; b=JQ5abR5+Pxwq1KE0i0tMfKz83YC7DE1k26eAJggGhqi3DeMBwVhf9S5y3y3xd17kWQgcHw 1WtKK+Jd2xNB+v3jDlv/vo8dILJfQmRdHejRmWBanIb8PGPvW5sf++bRtQTL3hnhWomC5e xAMaE6I0PShBvtIxlHsY2PHsMKUVvqHHEB9SY0GVE7LeMWx1xkGUvqkTOT33920JzIjkiB Xy61AsgKQXm8lCaMWK2Uxycx41AkZuPq4cyZARaJhO78bySVruHh4jhYGqXXHzT22KEHVz EGGyO4im686E7dfM8PY345MsHZfQtHs9T+teM4NUPSs56JyoUJaCe4IRr1oikg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ql5ol-0005T8-S7; Tue, 26 Sep 2023 07:01:27 -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 1ql5oj-0005Rf-On for emacs-orgmode@gnu.org; Tue, 26 Sep 2023 07:01:25 -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 1ql5oh-0006Vj-JS for emacs-orgmode@gnu.org; Tue, 26 Sep 2023 07:01:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 69B52240103 for ; Tue, 26 Sep 2023 13:01:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695726080; bh=KOs7V8UXaAo08Sgl2qKOTBacHvkznxLRT5t7Xl9ekhA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=fMUJTpF1Jp5AJiA2D6XRz4i5KIR2heQ8MxhfqfQqo4vHw0gmTb+5TTUUfiHF03sWo 3Wuoj9SuzwohpF6Ad6jSVpvmc3wFrJDczrGI+c5oWLsIsuLOMztVORs+NEpUQmBAkC AgrsNutJ5vj0Yfxes6NccYb0XxmHg4jp6IXU9GYCWoyeWbhpwkbXLFi+v4mVrc2wb+ b512pUR64gNIKlPMuAPmR6fWi+LHnXo+E8723KRdsjoKDyhtCVc3yHyccODyc/+QnH tsIA49zCnM1BodniIAgyMsnna938h3Mi0/wlv6AUvL3RqJHq8kVjEQJyxC0ZLm5hIM N1aPDwk8u8dfQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rvxcv4wSbz6v0p; Tue, 26 Sep 2023 13:01:19 +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: <87msxcj3kw.fsf@gmail.com> References: <87msxcj3kw.fsf@gmail.com> Date: Tue, 26 Sep 2023 11:02:42 +0000 Message-ID: <87v8bx8ael.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: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_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-Spam-Score: -9.39 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: F06D440E3B X-Spam-Score: -9.39 X-TUID: EgAyjFBWWD38 Suhail Singh writes: > Ihor Radchenko writes: > >> But do you actually use one but not other in practice? > > As in, could users have a preference for one vs the other in practice? > Yes, since the choice isn't without consequence, it's conceivable > (generally speaking) that some would prefer one over the other. FWIW, in > my specific case, I use CommitDate, but I am not convinced it's "the > right thing" in all situations. > > Not having conducted a survey, I also cannot comment on the frequency > with which users have a desired preference for one vs the other. I am > also not aware of general rules where users would necessarily prefer one > over the other, but it's possible they may exist. My point was to simply > point out that there is more than one interpretation of > "vc-modification-time". I see your point. Although, from the point of view of Org development, we do not want to add features nobody practically use. Such features add burden upon maintainers and do not practically benefit users. So, I am inclined to reuse the existing approach and only add more granularity if users ask for it. >> It will only work for files without includes and force us to use >> exactly the same hash algorithm. > > I don't follow. I was stating that the concept of a "file hash" could be > obtained in more than way. I.e., in addition to it being calculated "by > hand" it would also be possible to query an oracle (the VCS in this > case) for it. This is distinct and orthogonal from the decision of how a > "file with includes" is handled. Sure. But the way "file hash" is calculated should be consistent. The way Emacs calculates hash is different from git. So, supporting Emacs and git ways means more code (not a good thing unless necessary). We should thus prefer Emacs API to calculate hash. > If I understand you correctly, the logic you have in mind, would be > something like this: > > - during publish, compare the file hash of the file being published as > well as all included files > - if the values for all are the same as in the cache, don't publish (if > user has signalled such intent via the equivalent of > org-publish-use-timestamps-flag) > - if the value of any one is different, re-publish and update cache with > the updated file hashes > > It doesn't matter how the specific file hash is obtained, as long as the > mechanism is being used consistently and the file hash of the included > files are also being consulted in an appropriate way. Yup, you are correct. Now, to practice - let's start from updating ox-publish to use text hash to decide about re-publishing. I will put it into my todo list, but patches are more than welcome (my todo list is rather long). The function to start looking into is `org-publish-cache-file-needs-publishing'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at