From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id CBmPCeaODma4twAAe85BDQ:P1 (envelope-from ) for ; Thu, 04 Apr 2024 13:28:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id CBmPCeaODma4twAAe85BDQ (envelope-from ) for ; Thu, 04 Apr 2024 13:28:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="iWGa/wy9"; 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=1712230118; 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=K1akOgM8FjJrmoerzlFFdvEHBKAH7ucewjmYTEWz3Eg=; b=qvJObFysCJZrXvHp/UmhcYTjKKc14xx+/PqETG81T857WqRkT4j62zMsnVNj4CRzYFmWva 1s0aviCSis4AueNXLbgTRryflIgbxLCjJX/IXHgm4Kgq0fheLAH0UWRMkJ/z0r6P6yoahy G07nDUJRDeNOo6tmc/gdhcj5bRQKe7AtoJ9pR7Q28AVvdSo0BFfd2xt+7aux3QDv7T11Oc wfI6C3lu1zPUbFBY5s8nMtqVdC4vQ12GnwaVFRYp6wKAhrqCs2hoetXSqgvmWagC8QoOur kPrzB6zrohh8tSjoKBzRDtjQDDjzu5g6cDCwD9YdjdnjuNvVu++AzEOebD6oWQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712230118; a=rsa-sha256; cv=none; b=jN4FPLRfGslWYgj2rcTMgev2gSxHLatxcAw+o5Lx/jQMziU4PAjd1qToUhqBL11jq/4yAB txDccLJPdcbHgdxFfgPIG98BuMfjvpdwBno+rce3EglARD07hcU24UfZzbHcbXQwUfrqBn ZZX2cln+Kvyq9O1zombm4jExoIgyrn1Tm3262aggaCY+ivm0tUn3za7Pf826ro+EE8gKfI fBysRE4odG/0Q2xDK1wTOVac86T9AMnVH08lxb3fRVKwlPx8zQZ9vnjFleMzQZyHsH3tzF FkRRcAvmf1csmvdL7yeLrJCVV8I5Ar/nHHkkChk36ZSbhz4xQFWo/4mHXLlAmQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="iWGa/wy9"; 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 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 0230363EF7 for ; Thu, 4 Apr 2024 13:28:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsLFz-000669-P4; Thu, 04 Apr 2024 07:27:47 -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 1rsLFx-00065p-Ok for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 07:27:45 -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 1rsLFs-0001ym-5c for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 07:27:45 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2A42F240101 for ; Thu, 4 Apr 2024 13:27:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712230057; bh=UaYwacBjdUBEXEa/4yEEpGgvPRGUIM2O3MHr2ZZ3Ku8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=iWGa/wy9EN+Gh+EpsFGnJoAA5F0DPFdpXfP0lE4U1Ea1yZLzKQvoBykDBOLP2laL5 wpXZtNmmdaFptQDbbK5PPmLRZz1KEldnIrB4Tn9i1OPQblSktNqD7g6vYn05gCbpWl FFZZESClx1DYynKCWFcIUxj3jsRySSorlaAltpr2TYdKZUEQloxdf4hDdsJjghCq0/ Xz/tJCKFjKSwAp6UmbO9pwFoH7w4mi3ACtS5jYqWezssY5le0VfuInAdzH1x8IYKqv vDTVepNd6TVOOQKAReIc7jnbNiyWmBthhUaNdwUvAD0g0kpbEv7HoAEDg9wn72RYmX oMAQ4lPWtwXqA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V9K941xPyz9rxN; Thu, 4 Apr 2024 13:27:36 +0200 (CEST) From: Ihor Radchenko To: dongdigua Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org-faq.org: rename org-export-htmlize-* options to org-html-htmlize-* In-Reply-To: <875y77wm6u.fsf@localhost> References: <875y77wm6u.fsf@localhost> Date: Thu, 04 Apr 2024 11:27:51 +0000 Message-ID: <87a5m92wqw.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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_H4=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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.46 X-Spam-Score: -9.46 X-Migadu-Queue-Id: 0230363EF7 X-Migadu-Scanner: mx13.migadu.com X-TUID: 0wmrAeNvFpCx --=-=-= Content-Type: text/plain Ihor Radchenko writes: > dongdigua writes: > >> sorry, my email client wrapped the lines > > Thanks! > I looked into this again, and I can see that the FAQ entry is dubious. > ... > So, we need a much more significant rewrite to make this FAQ entry up to > date. See the attached alternative version of the patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-faq.org-How-can-I-preserve-faces.-Update-answer.patch >From 3d6e938c09f896c9c55575b318829d2ef7d1c9ea Mon Sep 17 00:00:00 2001 Message-ID: <3d6e938c09f896c9c55575b318829d2ef7d1c9ea.1712229941.git.yantar92@posteo.net> From: Ihor Radchenko Date: Thu, 4 Apr 2024 14:22:01 +0300 Subject: [PATCH] org-faq.org (How can I preserve faces...): Update answer * org-faq.org (How can I preserve faces when I export an agenda from the command line?): Fix the answer, making sure that the instructions actually work on the latest Org mode. Link: https://list.orgmode.org/orgmode/PS2P216MB113830307EE638A1FF044F55A024A@PS2P216MB1138.KORP216.PROD.OUTLOOK.COM/ --- org-faq.org | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/org-faq.org b/org-faq.org index 3674165c..f2b7d510 100644 --- a/org-faq.org +++ b/org-faq.org @@ -3643,41 +3643,48 @@ ** How can I preserve faces when I export an agenda from the command line? #+index: Export!Agenda #+index: Export!Faces -Normally, when you export an org file or an agenda view from within -emacs, htmlize will convert your face definitions to direct color css -styles inlined into each == object, resulting in an HTML output -that preserves the general look of your Org buffers and agenda views. +Normally, when you export an agenda view from within emacs, htmlize +will convert your face definitions to direct color css styles inlined +into each == object, resulting in an HTML output that preserves +the general look of your Org buffers and agenda views. Let's say you generate an export from the command line, such as the following: -: emacs -batch -l ~/.emacs -eval '(org-batch-agenda "e")' - -or - -: emacs -batch -l ~/.emacs -eval '(org-publish-all)' +: emacs -batch -l ~/.emacs.d/init.el \ +: -eval '(progn \ +: (org-agenda nil "a") \ +: (org-agenda-write "~/agenda.html"))' In such an instance, the exported HTML will contain only very basic color styles. The reason is that when Emacs is run in batch mode, it does not have a display and therefore only rudimentary face definitions. If you'd like to use more complex styles, you'll have to -make sure that the export process only assigns classes instead of -direct color values. This can be done by binding the variable -=org-export-htmlize-output-style= to =css= for the duration of the -export, for example with - -: emacs -batch -l ~/.emacs -: -eval '(let ((org-export-htmlize-generate-css (quote css))) -: (org-batch-agenda "e"))' +supply custom css styles to make these classes look any way you like. +To generate face definitions for a CSS file based on any faces you are +currently using in Emacs, you can use the following command: -Then you can use a style file to make these classes look any way you -like. To generate face definitions for a CSS file based on any faces -you are currently using in Emacs, you can use the following command: +#+begin_src emacs-lisp +(defun org-html-htmlize-generate-css-for-agenda () + "Create the CSS for all font definitions in the current Emacs session. +Unlike `org-html-htmlize-generate-css', do not prepend +`org-html-htmlize-font-prefix' to face names." + (interactive) + (require 'ox-html) + (let ((org-html-htmlize-font-prefix "")) + (org-html-htmlize-generate-css))) +#+end_src -: M-x org-export-htmlize-generate-css RET +: M-x org-html-htmlize-generate-css-for-agenda RET This will generate a == section, the content of -which you can add to your style file. +which you can manually copy to your style file: + +: emacs -batch -l ~/.emacs.d/init.el \ +: -eval '(let ((org-agenda-export-html-style \ +: "")) \ +: (org-agenda nil "a") \ +: (org-agenda-write "~/agenda.html"))' ** How can I avoid dark color background when exporting agenda to ps format? :PROPERTIES: -- 2.44.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--