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 QM01HLdo52Pe1QAAbAwnHQ (envelope-from ) for ; Sat, 11 Feb 2023 11:06:47 +0100 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 eCz0G7do52MVeAAAauVa8A (envelope-from ) for ; Sat, 11 Feb 2023 11:06:47 +0100 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 19FC2F637 for ; Sat, 11 Feb 2023 11:06:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQmle-0002z5-Qk; Sat, 11 Feb 2023 05:06:02 -0500 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 1pQmld-0002yj-KI for emacs-orgmode@gnu.org; Sat, 11 Feb 2023 05:06:01 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQmla-0008BO-Jm for emacs-orgmode@gnu.org; Sat, 11 Feb 2023 05:06:01 -0500 Received: by mail-wr1-x42e.google.com with SMTP id co8so3763887wrb.1 for ; Sat, 11 Feb 2023 02:05:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=GbJ5Kx28wG89qs3JWsTmLOCPDAaJYGa32X/8ZbW6jlY=; b=X0jeuxMZcoIRvkTqDc8uXAZlEMCF51rADPfo33vCCpldld8uheqpR/1f5E4S9S2TME LjOtFrkO+/ase2GMmxWLnzBgw3yTVTGkORusWnDP+rEIh9/z7+9WEpYotfRutkghTmFq oe9cpxn3CvN49I8EJxipKqUuwNWTH65DlKpi0IJbdeM6jCjU5iwGW3c2GpoZnkzJvJFv ywLe1Ca/6JH13ErhzGU4sOx8IbU9UE/Ey5s/wnWl46SU5UJOE+/9ROHeeifXNAEGuG0i gkrWCm0OT5kSbOxVMxSwJPOijOo1lasW5iRoZOot+1v5DK5XZZfZSNmz7nqI3J1bbgc3 vs5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GbJ5Kx28wG89qs3JWsTmLOCPDAaJYGa32X/8ZbW6jlY=; b=Us88y6ApbA3MaJUPOiHCs6N7jpnEstzroVWqeQ9ZWgF17AFTEN4JHhV0lfKwBuNJkY 2AdTJtvnH2qzTFkdJT3RUOSlpoxMXvjBDtLlVMxWIfOfC05Sbb0B2olW7UqXGRgAdlQx ifAGlv7Dufte+UQlPagbyZOe2zdVjSHvLQFG6QX3mYlNnTeaDO2l6JVyQ4w2z1NDgHMU mX6sKW3BDe/NLuUtp9MmDcyGilOxz/frJZGw0ABHmpFMQoujwyY7G8WOPz679p4CWUnN vGJH/3i6/Vp/xS3AehVxqjpbVoUI756kcs6oCdyAT38f8OnCRN6g/d95OoWegtRIDgN0 VVfA== X-Gm-Message-State: AO0yUKWDT/WdVFQrGHRKcg+KwyCa4l+AmZ4uZigXlBLIaoSLZkrnaP9j Dylo8XdKQk5Z+6JPhBFsHAI= X-Google-Smtp-Source: AK7set8BxLZfbD4v3xiB9DR+8gNY9nCLl8hbJsAKYm7mrjAJI0yKmxcvQIv/nxKAPMscwfOuem3ldA== X-Received: by 2002:a05:6000:1052:b0:2c5:5106:dad1 with SMTP id c18-20020a056000105200b002c55106dad1mr586685wrx.12.1676109956427; Sat, 11 Feb 2023 02:05:56 -0800 (PST) Received: from keynux ([2a01:e0a:505:3460:169:7511:f49a:58eb]) by smtp.gmail.com with ESMTPSA id k2-20020a5d6d42000000b002c4061a687bsm5851183wri.31.2023.02.11.02.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 02:05:56 -0800 (PST) Message-ID: <63e76884.5d0a0220.ef6c0.6d06@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Sat, 11 Feb 2023 11:05:54 +0100 From: Bruno Barbier To: Uwe Brauer Cc: Uwe Brauer , emacs-orgmode@gnu.org Subject: Re: export to html, colored dates: org-mime export works but org to html does not In-Reply-To: <87ttzsvac8.fsf@mat.ucm.es> References: <87a61kwqre.fsf@mat.ucm.es> <63e757b0.050a0220.88abf.16a2@mx.google.com> <87ttzsvac8.fsf@mat.ucm.es> Date: Sat, 11 Feb 2023 11:05:54 +0100 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=brubar.cs@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, MSGID_FROM_MTA_HEADER=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-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=X0jeuxMZ; 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=1676110007; a=rsa-sha256; cv=none; b=G3Kl7qqSjxhbT8JXSayc5DxLR3ByIzQfTwleQEwGxhmy9STdJkp+OsO06M7dQAbGPqv5D4 CvZk/4NcyVIAgva690xnoDqFSq/zFfD41U8fEo4aOkFjIATmmmF1wHO0qzRevtVYaZmppl M3JHUbEU2pQl+4L7Zcmr/A8xDnO8aFIW/saf3zUs2NwmyUqIDBmXg5o0y3gmQfGbv+K0+/ woJ+yqx6ZeT0+fUIe6VJhMnw+XPGBKupWbbE0E9b33mmwj4CIivtWkVBGnui4Kl1I6QQzV g/WxS0rzVhGDDiz8zl8ydNyU4pz7/3ZOSRQUipoid9x63ktDlNTbEZGJDPzN3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676110007; 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=GbJ5Kx28wG89qs3JWsTmLOCPDAaJYGa32X/8ZbW6jlY=; b=JtiRXNunCgY55ZZUdSJIpUJxVPKGOxq2xcwqogH4f0ua9+9C6hdRcRJecZF81DmLt54EEE +IGR30wcOu90mf+vB37Jke9zhnDJfCDpCDimTEMvHekqKpgDNCWsXCrElxNSLFPEjHzC8O 5nzF4ztCyAz9Su1WrbrUIYXj0eIR/Lo+iylRkOa6RwpLaOgyrcfbFKHsew49WzaMakikpB iDFwgqHD7TCZQFXtvTWu/hJM+Sy8YjdFQxhHK24kkbLp5cUiTJUBcgeKMFuxK3Zttw50DH VOk1EerAhyZsHTY5fWj0szIWEqERiy/0LEzyrnRUauNEAXfxlm2tpzV5C5KLTQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=X0jeuxMZ; 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 X-Migadu-Spam-Score: -11.60 X-Spam-Score: -11.60 X-Migadu-Queue-Id: 19FC2F637 X-Migadu-Scanner: scn0.migadu.com X-TUID: giR6rHQv3c9f Uwe Brauer writes: >>>> "BB" == Bruno Barbier writes: > >> Uwe Brauer writes: >> .. > >>> (add-to-list 'org-export-filter-plain-text-functions 'my-html-red) >> .. > >>> But if I have >>> #<2023-02-11># >>> in an org file and export it to html, no color is added to the timestamp. >>> >>> I don't know how to debug this. >>> >>> Any idea? > >> In org, "<2023-02-11>" is a date, not plain text. Thus, your function >> doesn't get called with a text matching your date. > >> Note that using macros, you could get almost what you want. > >> #+MACRO: IDATE @@html:$1@@ > >> {{{IDATE(<2023-02-11>)}}} > >> And maybe ther is a way to also customize date format to get rid of the >> brackets. > > Thanks, did you test it? > I am asking because for me I even did! :-) You need to call the macro named 'IDATE' like this: * Title {{{IDATE(2023-02-11)}}} {{{IDATE(2023-02-11)}}} See: (info "(org) Macro Replacement") And it will work for you too. Bruno > > #+LANGUAGE: > #+EXPORT_FILE_NAME: /home/oub/Desktop/testdate.html > #+OPTIONS: toc:nil > #+HTML_HEAD_EXTRA: > #+MACRO: IDATE @@html:$1@@ > > * Title {{{<2023-02-11>}}} > {{{(<2023-02-11>)}}} > > > Does not work when exporting to html, and I have recent developer org > version installed > > Uwe > -- > Warning: Content may be disturbing to some audiences > I strongly condemn Putin's war of aggression against the Ukraine. > I support to deliver weapons to Ukraine's military. > I support the ban of Russia from SWIFT. > I support the EU membership of the Ukraine. > https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/