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 qNmjIG5cC2WnSgAA9RJhRA:P1 (envelope-from ) for ; Wed, 20 Sep 2023 22:56:14 +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 qNmjIG5cC2WnSgAA9RJhRA (envelope-from ) for ; Wed, 20 Sep 2023 22:56:14 +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 1D40C57015 for ; Wed, 20 Sep 2023 22:56:14 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hSfUwbEY; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695243374; a=rsa-sha256; cv=none; b=j9xm6MwwPYmuSy2jXwNYcl3+JBk8J3P0HU29btko8y+EDXjBTQwUqIpcQYc1BH9lLq5Va9 IMgPmhFEKCS1ftqjQISlX9J09wU3Av+Jh22vAzrcng7MGaW1CF5x+2hII7WxSkXs959GW2 WErZQ8v16hmer+7vD4e4LUM0Rot5bTbIPkXAh8Qt5mIH07eH+X2duOxIrjkRUFUZ2TD0Hx SaeDFFMvzTDrAMsN3ZYWCx1oG2C/x/8WhFAYicL7U23UK1xV4Wz5LCbOH/8Fy4aUwCIpSK r3wQuWmpBdcx53qnwZ9FvgnXBKmpfETV84+HlxELL772pbDcocpHJvKilI8Iaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695243374; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=Ldh8qLA4+IW+MiQhy/Cu+yPdCRmxEvI3UxegiIt/A2Q=; b=dKPtoK1hHZdOTYVrI7iNogm/ma3AsjzI0AMUbkMAYmje7SVe8SKOc0aC+xdTyj4my8O1Mv CwGtzvFPWjFI/XyAJW+9v8gRWsHfPH3/IBm2D+O/8B7RDuVJ0By65Iu1ClOfWu1t67iQWU P1YTBGqSKL9+6sHlPVDGuwWT/NQE2DLhGHLO+vmuIR8zvga69rpe/dwXhMyo3k1lhvRp3N eDHfsX8Qj5Bs3Kw8bfCFlfM2tCHN5RuQLYDnc5N2R99utObLu92yh6Semu0qDYOUxHnd8s OiA4s2WbYmqVsY6EAAB2lNvQZ3rj73m+hclqENWNsD2VbdKlcwpH4ok1yxGUHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=hSfUwbEY; 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=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qj4E9-0004ss-Tb; Wed, 20 Sep 2023 16:55: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 1qj4E8-0004sU-2Z for emacs-orgmode@gnu.org; Wed, 20 Sep 2023 16:55:16 -0400 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qj4E6-00066D-K1 for emacs-orgmode@gnu.org; Wed, 20 Sep 2023 16:55:15 -0400 Received: by mail-qv1-xf42.google.com with SMTP id 6a1803df08f44-6584184810bso303516d6.1 for ; Wed, 20 Sep 2023 13:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695243313; x=1695848113; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ldh8qLA4+IW+MiQhy/Cu+yPdCRmxEvI3UxegiIt/A2Q=; b=hSfUwbEYwhJCaBa78lyx/2x/d1tAkOAfg/Apu/KcuyhhbO9E5HPfNPCzj7QJJixTQo HHHRAkBSdL79G59yCh4hWQ+dMRj6b5jirbnqufOI02dEVnMyjERl+JNA606Qe3DD3GfS fOd+CMPU0Q1EoojPxlz2c5Yn2ImsXoIokE1K5liEvTixIvzVMwKY1Xbf2UbR6UTijboI jIVn+LgVegfSUL9U4g27Y/wpfF7p1HEoIKbL6CmJM/JybxFIJe7oRPJ7vjT0VodLg99I qny12n0et+hHGu6qRoswlAhIeSvu2+QK1U5MRtmGc2/fjhbkJJXnbmomMHmGx2cWDyDB +dKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695243313; x=1695848113; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Ldh8qLA4+IW+MiQhy/Cu+yPdCRmxEvI3UxegiIt/A2Q=; b=L4vHbU8T/Epgg1ir/3RRrWPqJviSdkNNZMZkydL8jIBwCVtqgfHT0nAPgYyEryLgfl RVoxAWaYPNsB2e2DLGDhu8Udyhm08z4sNdubPyOSNV4OJwAO3FyMDO5qAKFiz45w31nh Qx7r6RyCbxMrcfVd3RP+3FiGBNWke7z23xS52vvLtVnnO8466w2YjIMAYM9WEFTfY8rv LJ01AAZCXn2xcwjRt6NblX3dNcnn30ENk8kZ3gW0mnsX5oQSkr/63IzMDQ0XsA+mMOdM 4LzXICutBMSS9ikacKwAXvKgld6gre+nhOcIY2Q4Q2jemHcTWDd0eJJnV1xWH39imfRC ZKuQ== X-Gm-Message-State: AOJu0Yxk/OSCDkhzJ9sdC7u7HnN99K96UPXlsrN9IbNZx6qRc9BQanAi VuKEUnkIQBxjKwt9VS7ZvY/tfggEdNzx4g== X-Google-Smtp-Source: AGHT+IHhQbwO03nOeh07v6jM1d/kNJ1F3UvUOra+C4m7GIXy3E9UBJpDygImglkl1ZafPdDm3gcUSg== X-Received: by 2002:a05:6214:5017:b0:63c:f852:aa3a with SMTP id jo23-20020a056214501700b0063cf852aa3amr3546626qvb.4.1695243313043; Wed, 20 Sep 2023 13:55:13 -0700 (PDT) Received: from fig.gmail.com ([146.70.198.175]) by smtp.gmail.com with ESMTPSA id h20-20020a0cf414000000b0063f822dae2csm851qvl.54.2023.09.20.13.55.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 13:55:12 -0700 (PDT) From: Suhail Singh To: emacs-orgmode@gnu.org Subject: [FR] Make notion of "modification time" configurable during publishing In-Reply-To: (Ihor Radchenko's message of "Fri, 15 Sep 2023 10:34:37 +0200") References: Date: Wed, 20 Sep 2023 16:55:11 -0400 Message-ID: <87led01s5s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f42; envelope-from=suhailsingh247@gmail.com; helo=mail-qv1-xf42.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.52 X-Spam-Score: -9.52 X-Migadu-Queue-Id: 1D40C57015 X-Migadu-Scanner: mx2.migadu.com X-TUID: 9c8DmzbeixNf Ihor Radchenko writes: > - weary-traveler asked to add a new feature to Org publishing system. > > The use case is publishing using CI tasks, where a new, fresh image > is created every time a website is re-published. Such image does > not preserve the original modification times of the source Org > files, making Org publish re-generate everything every single time. > > The new suggested feature is (optionally) using last git commit time > instead of file modification time. > - Conclusion: the feature request is to be submitted to mailing list > for more detailed discussion. The requested feature is for the notion of "modification time" to be configurable by the user. Even in the specific situation quoted above, different users may desire different alternative notions of "modification time". For instance, - the value of the DATE keyword - if using git as vc, the "git author date" - if using git as vc, the "git commit date" It would help for the notion of "modification time" (currently hard-coded as file-attribute-modification-time ) to be configurable in the following functions: - org-publish-cache-mtime-of-src: this is used to decide whether or not a particular file needs to be republished. I.e., the function at the heart of the motivating situation discussed during the meetup. - org-publish-find-date: this is used during the publishing of sitemaps where the modification time is used as the default value (for directories the filesystem modification time is the only value ever used). The user-supplied "modification time" function would take the FILE as an input and its output would be in the style of `current-time'. A default value could be provided for above cases which preserves current semantics. Additional inputs to such a "modification time" function that may be helpful (though may not be necessary) are the PROJECT-PLIST and the PUB-DIR. > - Org already has somewhat similar functionality in a form of > ={{{modification-time ...}}}= macro. See > [[info:org#Macro Replacement][org#Macro Replacement]] section > of Org manual. I believe the modification-time macro for git uses the "author date". This may not always be the desirable "vc-modification-time" notion. However, when it's not, the user has the freedom to create (and use) their own macro. > - Also, several other places in Org are relying on file modification > time and might need to be considered. org-html-format-spec is one such place that may additionally benefit. However, in that case it may be sufficient to simply mirror what's done for the modification-time macro. I.e., consider only one notion of "vc-modification-time" and have it be the "author date" semantics. -- Suhail