From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CIgaD3lKHWLcPgEAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 23:19:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WOApDHlKHWLpUAEAauVa8A (envelope-from ) for ; Mon, 28 Feb 2022 23:19:37 +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 424EC2ABA2 for ; Mon, 28 Feb 2022 23:19:36 +0100 (CET) Received: from localhost ([::1]:44092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOoMh-0000qj-0I for larch@yhetil.org; Mon, 28 Feb 2022 17:19:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOoLs-0000qJ-Mz for emacs-orgmode@gnu.org; Mon, 28 Feb 2022 17:18:44 -0500 Received: from [2607:f8b0:4864:20::e2e] (port=36447 helo=mail-vs1-xe2e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOoLq-0000BK-Gy for emacs-orgmode@gnu.org; Mon, 28 Feb 2022 17:18:44 -0500 Received: by mail-vs1-xe2e.google.com with SMTP id e26so14603876vso.3 for ; Mon, 28 Feb 2022 14:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sulliwood-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R+bjFWpuf0zsAZ+p7asYu/6UdHWIgRNsSiDYy4Al/hQ=; b=1ZJ6oqAYgCBG0Whzo6qvkN8S7AmTYDP4ghwp/lCIQjL5oXUSWkmg3kFKiFnYW56kKt kMnrK19dW8ZSiSaBDZjWI6d9RpeHlN9QJGAw7KCEnZ82nGL62lrFGWOXrh1IGfoyV0Mm 6YrR4FU3cUwWCWV6L8AnUeTPBzRZNUP7//x8QCoaa7YUPkxjetd2SGtoJEzLdCiJztTc 0XM+SqoyVCB97/dDVlsEN4Yr8R+I85mZraN7Y6JpqxaoxLdDn/dyHiSPyhq9ZbKaxQJI ymgBEJKSkuRHnaCcXWOIdt/3CAysgjy6pplQlNDIhE8FG3KtVQQ2KB6+kJH28vFb2giP iQdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R+bjFWpuf0zsAZ+p7asYu/6UdHWIgRNsSiDYy4Al/hQ=; b=ZMLw5AxjrXoY4xHxpkX5zKIMn1QwGuwUL4s4V6PVSeZGFRhh0ZVR/An9Ui46mC6zKA F6b0qIY7pYzcqINzVIZFKJXtVVb7ijBFULuR+7xzkMW+mh++m2TcS4bISNUoGOhbkjjR 6hHbo5dWOECPRUp/In6mvWRZZ3A5xO4UyB0Wodp4zUJV3VVhKgmVEqql5R/quL58mPhE 7euMdvzfha3LBT/o2nT44bwzvmUB80loCVpO1SLQU+JoY0S9/Q20u+vXTNHW1TrrxY0O YV4c90QNgxwFLGtr0v8O3H12JMk4AtWb5kxAA9goMBdVMqpvcetYlARdnahGp4YXPLxe Q3/g== X-Gm-Message-State: AOAM531Pgi0vgwJb/D+tUb9D6k1BRGOXO62mNoIJsEOZftd6ZiFltjbJ 1pesc7tF6TJJQQP9IzQ2KamFM5kOMUbialBTIYRwDw== X-Google-Smtp-Source: ABdhPJyaoEnBWL4etIeZEmGJ6nyizoe3L3bsci28oWzKUsAt1FNUPkbstR0q+BShn+dDd3FNhjBPcoIDiUvO13bXkDk= X-Received: by 2002:a67:2e4c:0:b0:31b:91a5:5b51 with SMTP id u73-20020a672e4c000000b0031b91a55b51mr7802296vsu.77.1646086721210; Mon, 28 Feb 2022 14:18:41 -0800 (PST) MIME-Version: 1.0 References: <185742ab-1719-540e-742c-5496ff61731d@hoowl.se> In-Reply-To: From: Greg Sullivan Date: Mon, 28 Feb 2022 17:18:05 -0500 Message-ID: Subject: Re: Inconsistent handling of multi-line properties To: Kaushal Modi Content-Type: multipart/alternative; boundary="000000000000499fb705d91b6e3e" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::e2e (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::e2e; envelope-from=gregs@sulliwood.org; helo=mail-vs1-xe2e.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=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: , Cc: Hanno Perrey , emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646086777; 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=R+bjFWpuf0zsAZ+p7asYu/6UdHWIgRNsSiDYy4Al/hQ=; b=M1ODTxCuRBRnJZ7cEZfrLo8sIIntuW4O0UckJeoGQi6lnDaFFx+2SnQcevQysRMDijZeWS eMOut+Gma5pY1CIrbXpST0PMlUpcVcqHA2RmCwb/gLkVmKZT3PKjc+OYCN500ksj8acDok i7tZ1UcQIC5N4NpHaW1nxKTgziWSsnsJJa5ipN8cbq01MD86N7R7SGgw8wIN7FfAAv/RGs 6qSlNCQySOn1E4fhKLjwW14K41HFDrdKlOQ4F+SajZm0y/qON3gs2wqFoHL9TRfueS12cz RQUQDuHmH5Czyi/NlDqid0PooPhdffjDNzbPigmDatfuPicCklLq7pxJ9Tphmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646086777; a=rsa-sha256; cv=none; b=d7JqYaLSqdqFCHYmx3n0osSvBuPaHtfHBODqZcYaf4eFvIPBYVcmOO6iRNTK5gjmCJtKaN QU4PUALzuJmsVdaNoOG6k3cVop4roNBqL7NGNdk+cV32kVglIptgMxMiCEZNJFrYgrBXWC m564MUIqYGPMqepT9NmzJD+HN2Pae++HwV+px11X33Zm0rSG4yxbOwAezr+1r9PjkqRAY9 aKkrjknEBA9hdyfgGr3lRUtECxdT69iFj3GY8bPb42HLB2Ci9oJt3mUILA7yJ40rNf08rO aaUPmzzRNeGMZCVsAOnTWckYK8YoolbeICXGRos5bsglDr9NwrTgU9Irzleurw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=sulliwood-org.20210112.gappssmtp.com header.s=20210112 header.b=1ZJ6oqAY; 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: -5.09 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=sulliwood-org.20210112.gappssmtp.com header.s=20210112 header.b=1ZJ6oqAY; 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: 424EC2ABA2 X-Spam-Score: -5.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: gE5SfkXWDlXv --000000000000499fb705d91b6e3e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you very much for that suggestion. Unfortunately, that does not seem to work for org-export-taskjuggler. An exported taskjuggler file has extremely simple syntax. For a report, for example, there is the header, "textreport id name {" then a series of "attribute_name", "value" pairs such as "formats html". Some attributes take multi-line string values, which are designated "-8<- \n line1 \n line2 \n ->8-" (but with actual newlines rather than "\n"s). The taskjuggler export uses a very simple approach: when an org headline is tagged as a report, it cycles through the properties, and for each property, simply emits the property name followed by the property value ( org-taskjuggler-valid-report-attributes contains names such as "formats' and "center"): (org-taskjuggler--indent-string > (org-taskjuggler--build-attributes > report org-taskjuggler-valid-report-attributes)) > where > (defun org-taskjuggler--build-attributes (item attributes) > (mapconcat > (lambda (attribute) > (let ((value (org-element-property > (intern (upcase (format ":%s" attribute))) > item))) > (and value (format "%s %s\n" attribute value)))) > (remq nil attributes) "")) > For an org source such as ** Reports > :PROPERTIES: > :REPORT_KIND: textreport > :formats: html > :center: -8<- > :center+: [#Plan Plan] | [#Resource_Allocation Resource Allocation] > :center+: ---- > :center+: =3D=3D=3D Plan =3D=3D=3D > :center+: <[report id=3D"plan"]> > :center+: ---- > :center+: =3D=3D=3D Resource Allocation =3D=3D=3D > :center+: <[report id=3D"resourceGraph"]> > :center+: ->8- > :END: > unfortunately, (org-element-property :center) returns only "-8<-", whereas I want it to return a 9-line string. -- Greg -- Greg Sullivan email: gregs@sulliwood.org cell: 617-417-4746 70 Pigeon Hill Street, Rockport, MA 01966 On Mon, Feb 28, 2022 at 3:37 PM Kaushal Modi wrote= : > On Sat, Oct 2, 2021 at 11:03 AM Hanno Perrey wrote: > > > > Hej, > > > > I have noticed that properties that stretch over multiple lines using > > the :value+: syntax are ignored by org-element-property and therefore > > also by e.g. org-export-get-node-property when exporting to ics via > > ox-icalendar.el (see example below). I was wondering now whether this i= s > > intentional and to be expected or a bug? > > I use the :value+: syntax for the subtree properties regularly. For > exports, though, you need to prefix the properties with EXPORT_. > > See the (org) Export Settings node in Org manual. > > > When exporting sub-trees, special node properties can override the > above keywords. These properties have an =E2=80=98EXPORT_=E2=80=99 prefi= x. For > example, =E2=80=98DATE=E2=80=99 becomes, =E2=80=98EXPORT_DATE=E2=80=99 wh= en used for a specific > sub-tree. Except for =E2=80=98SETUPFILE=E2=80=99, all other keywords lis= ted above have > an =E2=80=98EXPORT_=E2=80=99 equivalent. > > Here's one of the pathogenic test cases of ox-hugo: > > =3D=3D=3D=3D=3D > ** Custom front matter in multiple lines > :PROPERTIES: > :EXPORT_FILE_NAME: custom-front-matter-multiple-lines > :EXPORT_DATE: 2017-07-24 > :EXPORT_HUGO_CUSTOM_FRONT_MATTER: :foo bar > :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :baz zoo > :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :alpha 1 > :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :beta "two words" > :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :gamma 10 > :EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :empty_string "" > :END: > =3D=3D=3D=3D=3D > > All the HUGO_CUSTOM_FRONT_MATTER properties get collected as expected. > > Here's another example: > > =3D=3D=3D=3D=3D > #+author: > #+options: toc:nil > * Heading > :PROPERTIES: > :EXPORT_AUTHOR: abc def > :EXPORT_AUTHOR+: ghi jkl > :EXPORT_AUTHOR+: kmo pqr > :END: > =3D=3D=3D=3D=3D > > C-c C-e C-s t A exports to: > > =3D=3D=3D=3D=3D > _________________________ > > HEADING > > abc def ghi jkl kmo pqr > _________________________ > > > =3D=3D=3D=3D=3D > > --000000000000499fb705d91b6e3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you very much for that suggestion.
Unfortunately= , that does not seem to work for org-export-taskjuggler.=C2=A0
An= exported taskjuggler file has extremely simple syntax. For a report, for e= xample, there is the header, "textreport id name {"
the= n a series of "attribute_name", "value" pairs such as &= quot;formats html". Some attributes take multi-line string values, whi= ch are designated
"-8<- \n line1 \n line2=C2=A0\n ->8-= " (but with actual newlines rather than "\n"s).=C2=A0
<= div>The taskjuggler export uses a very simple approach: when an org headlin= e is tagged as a report, it cycles through the properties, and for each pro= perty, simply emits the property name followed by the property value (org-taskjuggler-valid-report-attributes=C2= =A0contains names such as "formats' and "center")= :

=C2= =A0 =C2=A0(org-taskjuggler--indent-string
=C2= =A0 =C2=A0 (org-taskjuggler--build-attributes
=C2=A0 =C2=A0 =C2=A0report= org-taskjuggler-valid-report-attributes))

wher= e
(defun org-taskjuggler--build-attributes (item attributes)
=C2=A0= (mapconcat
=C2=A0 =C2=A0(lambda (attribute)
=C2=A0 =C2=A0 =C2=A0(let= ((value (org-element-prope= rty
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(intern (upcase (format ":%s" attribute)))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0item)))
= =C2=A0 =C2=A0 =C2=A0 =C2=A0(and value (format "%s %s\n" attribute value))))
=C2=A0= =C2=A0(remq nil attributes) ""))


For an org source such as=C2=A0

** Reports
:PROPERTIES:
:REPORT_KIND: textreport
:formats: =C2= =A0html
:center: -8<-
:center+: =C2=A0 =C2=A0[#Plan Plan] | [#Reso= urce_Allocation Resource Allocation]
:center+: =C2=A0 =C2=A0----
:cen= ter+: =C2=A0 =C2=A0=3D=3D=3D Plan =3D=3D=3D
:center+: =C2=A0 =C2=A0<[= report id=3D"plan"]>
:center+: =C2=A0 =C2=A0----
:center= +: =C2=A0 =C2=A0=3D=3D=3D Resource Allocation =3D=3D=3D
:center+: =C2=A0= =C2=A0<[report id=3D"resourceGraph"]>
:center+: ->8-=
:END:


unfortunately, (org-el= ement-property :center) returns only "-8<-", whereas I want it= to return a 9-line string.

-- Greg
=

--
Greg Sullivan=C2=A0 =C2=A0email:=C2=A0gregs@sulliwood.org<= /a>=C2=A0 =C2=A0cell: 617-417-4746
70 Pigeon Hill Street, Rockport,= MA 01966


On Mon, Feb 28, 2022 at 3:37 PM = Kaushal Modi <kaushal.modi@gma= il.com> wrote:
On Sat, Oct 2, 2021 at 11:03 AM Hanno Perrey <hanno@hoowl.se> wrote:
>
> Hej,
>
> I have noticed that properties that stretch over multiple lines using<= br> > the :value+: syntax are ignored by org-element-property and therefore<= br> > also by e.g. org-export-get-node-property when exporting to ics via > ox-icalendar.el (see example below). I was wondering now whether this = is
> intentional and to be expected or a bug?

I use the :value+: syntax for the subtree properties regularly. For
exports, though, you need to prefix the properties with EXPORT_.

See the (org) Export Settings node in Org manual.

> When exporting sub-trees, special node properties can override the
above keywords.=C2=A0 These properties have an =E2=80=98EXPORT_=E2=80=99 pr= efix.=C2=A0 For
example, =E2=80=98DATE=E2=80=99 becomes, =E2=80=98EXPORT_DATE=E2=80=99 when= used for a specific
sub-tree.=C2=A0 Except for =E2=80=98SETUPFILE=E2=80=99, all other keywords = listed above have
an =E2=80=98EXPORT_=E2=80=99 equivalent.

Here's one of the pathogenic test cases of ox-hugo:

=3D=3D=3D=3D=3D
** Custom front matter in multiple lines
:PROPERTIES:
:EXPORT_FILE_NAME: custom-front-matter-multiple-lines
:EXPORT_DATE: 2017-07-24
:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :foo bar
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :baz zoo
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :alpha 1
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :beta "two words"
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :gamma 10
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :empty_string ""
:END:
=3D=3D=3D=3D=3D

All the HUGO_CUSTOM_FRONT_MATTER properties get collected as expected.

Here's another example:

=3D=3D=3D=3D=3D
#+author:
#+options: toc:nil
* Heading
:PROPERTIES:
:EXPORT_AUTHOR: abc def
:EXPORT_AUTHOR+: ghi jkl
:EXPORT_AUTHOR+: kmo pqr
:END:
=3D=3D=3D=3D=3D

C-c C-e C-s t A exports to:

=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0_________________________

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 HEADING

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 abc def ghi jkl kmo pqr
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0_________________________


=3D=3D=3D=3D=3D

--000000000000499fb705d91b6e3e--