From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CHq9EP5RqWVAEQEA62LTzQ:P1 (envelope-from ) for ; Thu, 18 Jan 2024 17:29:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id CHq9EP5RqWVAEQEA62LTzQ (envelope-from ) for ; Thu, 18 Jan 2024 17:29:50 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=HrBnBR7k; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705595390; 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=PhynyolRBEyQwTEmn7UAm4ZcnWFgMk1wnUZ0DY8bawY=; b=BddWzH8tW0YzzBu/NETm2h639XAAIMHocU4Kma3g6Oc5aSDOPFmShqb/5ytH0fSFL9T1ic 7hhXkjUDcbAlVI+aRmT2evgrNJXpnYLvHDW1STHL3Y25+dtOU45X4gpXXROFdNhNZhXyIr LRhXcWdT7Nqmf9zCccpvm/mL1MbOzzfNWHu0svF3Pr2WxLvc8UopONrW8hSx1gEuO0R5mn cN0RusDp/JjOMmNvAEK1iaQmMtK7nh2g4dSrx97bDQ/cjZG2KiLRa7xu5UVsyh6QX9JzWJ pc7rLIRMtFDsB8InVO2GdrypJz5YZJCfvHKyXCEh6WoEpLKZbOS5zidzJuVdbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=HrBnBR7k; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705595390; a=rsa-sha256; cv=none; b=r8RIn+br7tShss59ntzUlHAfQn1+8NPQq/sGp3c63gjf5J98AtJptl7+QOu+XUreZsF8aa 3ogiWgHqsMUB0R5dt/GDNxN825jMECtiHa28a9Tf5h63gezlF3bT0L5/vDh786uDDl8hhP zQESJUjP1FnA8SHSR02z3unw+htmdq1gV7K8B28zOSuCmbfOMcxHs0GsB84psKM89bEyyW PBaEuZc9Z4WPoeNSsr0XFXnZ+tOGQCa/MtMfu7HNukdERjTaYjsUXVWJR8+T3J0mzGK5lP GAy5wqNXlIqrThfNPhOjQID83rxQptEA6DhMYhOJ2ocK0UuOCJX7+GDohjEalA== 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 E3CA7348F8 for ; Thu, 18 Jan 2024 17:29:49 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQUEw-0007lJ-Ii; Thu, 18 Jan 2024 10:23:34 -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 1rQUEq-0007jD-Ul for emacs-orgmode@gnu.org; Thu, 18 Jan 2024 10:23:30 -0500 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 1rQUEo-0006CE-Nj for emacs-orgmode@gnu.org; Thu, 18 Jan 2024 10:23:28 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ED0B7240101 for ; Thu, 18 Jan 2024 16:23:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705591402; bh=Itt90PnSD/J2t4N3JZXmhFVUGm+9KG8vUFdZ05JqS6A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=HrBnBR7kpp/oRAhKdpmXsGWj/mECJCfk+AvjYBTQxQ6WQLSipIYWPikq1f8YuMTbH NFY/IWV95AKegV5FoTq4HE7Cv6HfpCdiNm7m8itFxEHeHV1IbVrLu7970X7mk5W7UH Ui40V5DFAE6hWENpWeCpFlbLZI6jL7FVCishDRJVEB+4ayXEWJ/xS4+wIhX2ijdBoK Jt3QsitZa+XlzR9k77jFPYejFEi8vc1eyvq8a5PhK9T+kWbE0xxeKjVphTMSpvnGTm 2aGz8qXe5kBeP5THC7VKFzrlS9eV8RplzxoffpFIn2k00xi9KRKXnkdR1Js8Ms/ZQ7 RbRXLck1FkqdA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TG62c6GVdz9rxL; Thu, 18 Jan 2024 16:23:20 +0100 (CET) From: Ihor Radchenko To: matthias@gnu.re Cc: emacs-orgmode@gnu.org Subject: [FR] Transfer export attributes from dynamic block to its first child (was: Bug: clocktable) In-Reply-To: <000801d6959e$18d14e70$4a73eb50$@gnu.re> References: <000801d6959e$18d14e70$4a73eb50$@gnu.re> Date: Thu, 18 Jan 2024 15:26:35 +0000 Message-ID: <871qaer7bo.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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.90 X-Spam-Score: -9.90 X-Migadu-Queue-Id: E3CA7348F8 X-Migadu-Scanner: mx12.migadu.com X-TUID: TWBgCHKsFZn4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable writes: > J=E2=80=99ai un soucis avec le clocktable qui semble =C3=AAtre un bug ca= r il n=E2=80=99accepte pas les attributs latex avant la ligne BEGIN: > #+ATTR_LATEX: :align Xll :width \textwidth > #+BEGIN: clocktable :scope file :maxlevel 2 This is a commonly reported problem - when using dynamic blocks (in particular, clocktable block), it is impossible to set export attributes for the generated table. This is because the attributes of the dynamic block have no effect on the table inside it. I suggest to provide a standard dynamic block parameter that will make Org mode prepend certain affiliated keywords to the generated contents: #+attr_latex: :width \textwidth #+begin: clocktable :scope file :maxlevel 2 :org-dblock-prepend (:attr_late= x ) #+end: will yield #+attr_latex: :width \textwidth #+begin: clocktable :scope file :maxlevel 2 :org-dblock-prepend (:attr_late= x) #+attr_latex: :width \textwidth #+CAPTION: Clock summary at [2024-01-18 Thu 16:23] | Headline | Time | |------------+---------| | *Total time* | *0h 0min* | #+end: Tentative patch is attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Allow-transfering-dblock-affiliated-keywords-to-its-.patch >From b6bfe67ed19b2c3a0c3744488f051c29e79a5b3d Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Thu, 18 Jan 2024 16:24:34 +0100 Subject: [PATCH] Allow transfering dblock affiliated keywords to its contents * lisp/org.el (org-prepare-dblock): Use :org-dblock-prepend dblock parameter and append the listed affiliated keywords before the generated dynamic block contents. --- lisp/org.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 8929a7217..585b9aa5b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8836,6 +8836,12 @@ (defun org-prepare-dblock () (delete-region begdel (match-beginning 0)) (goto-char begdel) (open-line 1) + (let ((prepend (plist-get params :org-dblock-prepend)) + (dblock (org-element-at-point (1- (point)))) + (affiliated (org-element-create 'paragraph))) + (dolist (prop prepend) + (org-element-put-property affiliated prop (org-element-property prop dblock)) + (insert (org-element-interpret-data affiliated)))) params)) (defun org-map-dblocks (&optional command) -- 2.43.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 --=-=-=--