From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EJ69NHYqe2JXgQEAbAwnHQ (envelope-from ) for ; Wed, 11 May 2022 05:16:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wI6fNHYqe2KkBwEAauVa8A (envelope-from ) for ; Wed, 11 May 2022 05:16:06 +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 80360411BF for ; Wed, 11 May 2022 05:16:06 +0200 (CEST) Received: from localhost ([::1]:40570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nocpY-0005Qk-To for larch@yhetil.org; Tue, 10 May 2022 23:16:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nocp8-0005P6-En for emacs-orgmode@gnu.org; Tue, 10 May 2022 23:15:38 -0400 Received: from ciao.gmane.io ([116.202.254.214]:57104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nocp6-0001QB-Lu for emacs-orgmode@gnu.org; Tue, 10 May 2022 23:15:38 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nocp4-0002VA-2s for emacs-orgmode@gnu.org; Wed, 11 May 2022 05:15:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Andreas Leha Subject: Re: source block evaluation in #+DATE line Date: Wed, 11 May 2022 05:15:29 +0200 Message-ID: <87h75w69pq.fsf@med.uni-goettingen.de> References: <87lev961yo.fsf@med.uni-goettingen.de> <875ymdqh9z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:yBVg20vOj1COo2OMlK3hDQGQr3Y= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652238966; 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:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5n8GHX/jwdb7Hm52x4oUuv8Fw53Pc7Vi7g9O/g0aBD4=; b=MaOU3fQ7UhdhzEuxTDOJWng+mGunziXZBOWLIqtoMUFmliSXAKHWZZLgya82G2Fu8FbayZ HjL1uqzcvUUYws90iUejSlXdRaKt4d9AUQG8u9H495UEIliUTlj9DRs9F0Q8UyT/HRrJHw zzW+R037kaYxm9LweIOP5mJpsfIbG7RDQERnFfaivQblvck4JXRlcjnEufy6JosmHbjVer 1Kco7MdpPd9y6Osqd52qJ5gyLkngCDbAXm7+itqphNQfd+6edrlInoybj04Io28mFLV0WC rzggsA/sw28RGBpr5dZosjR9IfAZ8K7O0ow5lSXSGovPtkGYJ2JiUU6A7HDcXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652238966; a=rsa-sha256; cv=none; b=QQf+PUAsiVsxuy8AB9m96jbtGRWbBOAEZLhsxooj0gwrkPd4nutICXntOO9E1ZDibZHy4n OaClgyMZj5uhqLgNSvzDEWtsNYWfqoUgaHPLsXOVt3AEzraZOYLeI5HlC+CK2/b5gNSTIx U0AERJPJf6PaCJBl8M086KOxUefYOORzLZYLFNgIhHkhN3QHRErzWYy9/OL7gbZtjz9FAs DwDplUOGlOiznkKRnkmHSZa6r0aTMXtvzzaKBJ9GqIZFKGqx0l6rEUNmDNmiuMuinXpKnD P/2Ynd6MyyVmEyMewiInPwOH8hz9Kt3NOBnOKwwbDoyKUi73hWqB40WIRKaNjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Spam-Score: -2.31 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Queue-Id: 80360411BF X-Spam-Score: -2.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: SOrf/B64JUik Hi Kaushal and Jeremie, Thanks for the comments. And sorry for the misleading example. I do not want to use source blocks to insert a date. In fact I want to include the current git commit hash on the title slide. So, something like this: src_sh[:exports results :results output wrap replace]{git describe --always --dirty} But that is not evaluated... Any hint? Thanks, Andreas Kaushal Modi writes: > Also check out the {{{time}}} macro if you want complete control on > the formatting of the date string. > > Example Org snippet: > > ===== > > #+date: {{{time(%Y-%m-%d)}}} > #+options: toc:nil author:nil > > > See the ~{{{time}}}~ macro in [[info:org#Macro Replacement][org#Macro > Replacement]]. > > The format passed to the ~time~ macro is same as that understood by > [[help:format-time-string]]. > > - Note :: Remember to escape the commas. \\ > Example: ~#+date: {{{time(%b %e %Y\, %a)}}}~. > > #+begin_src emacs-lisp > (org-export-as 'ascii) > #+end_src > > =====