From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KEIZNpVDb2TvSwEASxT56A (envelope-from ) for ; Thu, 25 May 2023 13:16:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yAoWNZVDb2QmfgEAG6o9tA (envelope-from ) for ; Thu, 25 May 2023 13:16:37 +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 8DD352DE39 for ; Thu, 25 May 2023 13:16:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q28wh-0004cU-8t; Thu, 25 May 2023 07:15:51 -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 1q28wf-0004ZJ-Ge for emacs-orgmode@gnu.org; Thu, 25 May 2023 07:15:49 -0400 Received: from mout.gmx.com ([74.208.4.200]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q28wc-0004fE-QN for emacs-orgmode@gnu.org; Thu, 25 May 2023 07:15:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=s1089575; t=1685013345; x=1685618145; i=bvchgvbt@mail.com; bh=QRWF2d/83oipk6KY8VGi2RhSsrt9C6+q0UPHCmv+u3k=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=adoRyhiHnt5GkZMqpH9uGh+rMpxN44i+WcirI1eTAV326umnnUSv4zK17XoSvaA3Mkttk0Y 4OgiihLgTZ8OZQnJwARPqXcTeeaeHwIPqEF2iinxbEeWqGSPXOWUqZpsMDISvd0jTErEzroXl Es50GFyAWoDX1OqhkfEvw6am5GondwyLC5eSiTrk0NeCTLeIvvrzCrYRBMcUJ1trVHE0dqSge etYs4SHxEz65b0XL3yd377lsLGF+Z/wfCIR0/ax0T5Xt+GFqAF1TX84kOxPaJgA2DmZG7rmd8 yA6bIettKiV7HTlGQ0TyvFe3KsVlHJlkCvyv+/ctE0pUnrDqZKYA== X-UI-Sender-Class: f2cb72be-343f-493d-8ec3-b1efb8d6185a Received: from [82.13.53.64] ([82.13.53.64]) by web-mail.mail.com (3c-app-mailcom-lxa13.server.lan [10.76.45.14]) (via HTTP); Thu, 25 May 2023 13:15:45 +0200 MIME-Version: 1.0 Message-ID: From: bvchgvbt@mail.com To: orgmode ml Subject: Re: Modifying the parse tree Content-Type: text/plain; charset=UTF-8 Date: Thu, 25 May 2023 13:15:45 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <87wn0wwugx.fsf@localhost> References: <87wn0wwugx.fsf@localhost> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:vOSKD9pyICKmK8gb1z0c+902DSYU6L600Tp4YtYeUDPx8szi+Ff6DDKbbn3S30wFxGGdG kbOMHgT2coEt5wzFMYjQp1+Ktbu0tAtF7J2RbCEb0EMnPJODzTbjrZVyF/1Kai1vDtEBdFPK19BL sArx+uMmH29jOi39YQmnN/5y/3+SVxizq+X6oVE+/Ua1yEZeA/72WLKFGlGI6ccDDuob1BeY9ehR yAE3yp/JaXpdLsfTIcKlxbO7RT4FgjdmCBkztPHhUS33XKjlu4Y3zRe0IxtVrw+a/WNmO7SVWU6f 5w= UI-OutboundReport: notjunk:1;M01:P0:u2eMb6FS+v4=;Y4BCGzW8R3wLShH3Ld9nWWyjuoO bPxaqMJSNdqLcSLOAm/9H8BFKXRrbOIEp48Ui6/KYFdcS8b2w4ise8sfTsQMRV1DRhvD7GLbT CSufYWdkSNpN/fd1TqnqmZg0fBHMHMWHo1fs4PR5TElpSqBt/3cY0nMMXzz1ZZw7hmmic7yf0 jEF+5ht8UCqJJDwZaQtShbJ1Hgs5x+yjdVekyA5+qCqxEVa/CcdFQaQ3Jh/uqlD4czVBX/KyP U8OID+0KVe3l9pRcB5cDQBbzE8h0EyMqqR+YE8VFmFChifSadYk1tT1FC0xJCf0VojeLe7+kr vmVcMO7UdIhRUY/NzB1br2okHlj8i3Ru93wsAeFUU7tcl5PXZilzvCmLphuJnWa9oLvyY3exQ aQyvX5X6QTv2e/dhMOAd/XVSzV9TIM+4bLKQGakuuUBIwm8VKBqa2uzsVhmE4BxJxDm9QbRRN qD64TZ9vksA7YptcOzN7GD47gKhToDvJbGLTT+4Ha/ZG4iYPRrRh7gQcWO80Q1XnIVAvLXz5Q 9/4CHSouiuDqfEGtkE9qEjpsl8r565uuV05vvLIklZzIHTFrlzU5jpmFuBAmYJJqaUuCgFARR TgkoST8Ej51ebQ/2nVOGp8p70++lV43Q34EslASEmkZwaOka32Hbg+eRus2pIJ/5jOIiJV2rA 0wdRNsm19upXjl7cOSgjv5kNuDdDyXzwB5Ljw/5fHvWCs5f4uxdx18IhdFiaFybY9062MQ7pQ VffbbuPQrcn4KL4X9EJnoIhufgs7BrCg4NT4OvOcCYYpp4DqEMRI2MBh68X+d+Lp7DF+0NQXn IXnIlAL1J/9c0LlWdsa+3RqQ== Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=74.208.4.200; envelope-from=bvchgvbt@mail.com; helo=mout.gmx.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685013397; a=rsa-sha256; cv=none; b=J7XKylCji8FSmHh2npifQN5UrP9PgBC6yKG5/tUZ8q2ZqZiAEdqUnL9hzNFf5EAv3vEVo9 zRdyUfWGiosolDvJAvKShTzNpOk1dEFT1ULyA18CRwUwXl59GEy7gWzgZEh723p6+NRrug /DM26Za6Wad1w+KLSVD/HgnKVbBbYqkXHuFnrL3DoyB3KOJmivoGcf3n4OloSaFg0FxGpS PiZpjKYUv+R9ju10vJEGdJ4jSD/AHpuV+HLTOY5YFS+JVXiGmMU+lesf/35WGIbQu/iop9 fhdwNZ8CWHs+hYyVG4JOW4DVFTm1CcHxxPrz11TDfAd7LtkeMX3HEd0qHYyw4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mail.com header.s=s1089575 header.b=adoRyhiH; dmarc=pass (policy=none) header.from=mail.com; 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=1685013397; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=WeHe2mOMjvbpLMvR2RFeR4Qii67CuVX5QtnhgRqk730=; b=G5Rt41oMmXi/3/EqNu4OSBII+UCQDJlLhtYUqmt/N4JHPdQnddiVZtPS+wL9Mhe8PQFuuW AwMVpERtaswupfucSPpspNc9teD0qBR8jNivUXZGZKndfEBo1OiMQxemdxYBCk3RXQiPyH XLeE+QhRKBDMWErywnZEQ3FSm+d7Pq4Bybi3IPKb+Fc+hMtxBCVAN/7GSlZbTLro2+izUU W00d1S0I2YsVVY30THf7uSRAbq2+0lLMIunEZf1xFoOBITtaJ9nM7wnFvZRnwIl3bR6trC 2+ZmJliTb8mJhrIKvfHFLt2pIf4bmYE+DnrqXXjFmCWMwlb5yhxbGUiwbktvsw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mail.com header.s=s1089575 header.b=adoRyhiH; dmarc=pass (policy=none) header.from=mail.com; 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.84 X-Spam-Score: -5.84 X-Migadu-Queue-Id: 8DD352DE39 X-TUID: 9xEUuNSrk5Rw "Ihor Radchenko" wrote: > bvchgvbt@mail.com writes: > Parse tree is not kept in sync with the original buffer when you > retrieve it by `org-element-parse-buffer'. Okay, thanks. I thought that might be the case, but couldn't be sure. > We generally do not currently > have a way to modify Org buffer text from AST. > > The only way to write the parse tree back is > replacing it with the output `org-element-interpret-data'. Okay, fair enough. Thanks for the info. > But be aware > that interpreted tree and the original text do not have exact 1-to-1 > equivalence. Some whitespace might be lost. Only whitespace? I can live with that. > > "org-element-headline-interpreter: Wrong type argument: wholenump, nil= " > > Which implies that you added invalid headline element to the tree. Hmm. Does headline (:title hello :todo-keyword TODO :todo-type todo) look valid to you as a minimal TODO-type headline? Created via: (let ((todo (org-element-create 'headline))) (org-element-put-property todo :title todo-title) (org-element-put-property todo :todo-keyword "TODO") (org-element-put-property todo :todo-type "todo"))