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 ms9.migadu.com with LMTPS id mJMzN031fWTXCQAASxT56A (envelope-from ) for ; Mon, 05 Jun 2023 16:46:37 +0200 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 AACwNk31fWQJpgAAauVa8A (envelope-from ) for ; Mon, 05 Jun 2023 16:46: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 848382A1A1 for ; Mon, 5 Jun 2023 16:46:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6BT6-00054J-AG; Mon, 05 Jun 2023 10:46:00 -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 1q6BT3-00053s-U1 for emacs-orgmode@gnu.org; Mon, 05 Jun 2023 10:45:58 -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 1q6BT1-00054p-VN for emacs-orgmode@gnu.org; Mon, 05 Jun 2023 10:45:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A5E56240103 for ; Mon, 5 Jun 2023 16:45:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685976349; bh=f0PnlsVRftUP9hIGk7RcE17etd8mW/HFs+JtkfgZlKM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=hABRGFS1dd2terpd+HIHwXDuYbYVlA0a2pgnBHBsMrLOnj4tfaCUWqxiEwxtNio0L N/cdZpp947MD2n7S97iG7ZBom1dxddTmdor7IL89MjXf1TG8PGcl+FmIRwx+iA+n/Z 1XViVeIiB/DzPdCd5MquGgD9Ry3GTnMxtzd5KgHWXUwTayXQzg4vEmv+of45WfQ0Bg gm3Yx1xj16tKicbUstfLt9jaHOI9oqsu2aRIhLq28e9XvPz410yr9AfUZeIa5+tuJ8 p50oOgTbZOJJvfNgjvYe6qULCkvvyDv5LqhUgFwUgSLTRRGBOM/GrlHB4BSZuCnoIW ULsHLgz9iuVRQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QZby45TBKz9rxD; Mon, 5 Jun 2023 16:45:48 +0200 (CEST) From: Ihor Radchenko To: bvchgvbt@mail.com Cc: orgmode ml Subject: Re: Getting the components of an item in a plain-list In-Reply-To: References: Date: Mon, 05 Jun 2023 14:50:29 +0000 Message-ID: <874jnm0xqi.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685976397; 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=M95PcU9TmgRQVF3QhI1HrMEl9N7A7upDNEHqgxXRsEg=; b=YE9tBhROJ2IS5RUOnd9IA6WcItI4oDjHXzbLJfy/jpkOufcvIUW69RN/P+d1vdBAOsfxzJ zp0cXB6bfq0vVNv34R7lL35rmyQQxeDPoaU0dzvDMLzGeD6u3QbPfT8fKNH0x4mrqjKGht gp8nLE+FNWnXlrbq9wH7JclFezt+htzvhaSzJUltzsoHKnvD1ccPcYNyEawDrtQkuXYItV W/H/Ps51fyckS9U5IjHWYRIRDvkBkgNeLo/rEVtBRuHlbeMmV3cJP7qPnwp6Lid7FhGxR1 1IdB2Wz0k5Ec0l+KWjGX2a21ctCb7xmGigyoELcPj6Kdwk1msa96tSf3SpKNQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hABRGFS1; 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=1685976397; a=rsa-sha256; cv=none; b=EPT6VFp9FC9+rKE8PkgZUMUKOxmXumsO1eKl2WPVZdD9idWnhklRs2vKnkKAXM126u5ovh 9yeRU2tSPoN29QUccJUB/7IyLZteCoNBDVVvIWpUMeBjCI3YZY7bdLo9Z3JlSTNfqstfDe 5BCg6Q0xtd/AlNeEzIHILuR+O3vQMdqh/w3e73EZHurQIvBvo1CiDVcMRHOdpXVJyKFwGY 6Z7QeViQ4GbknLXQemTsz1FqXDCq5gowLCwYlIYIE41udufe1MxguBr5f3gPIdqbg0xnL+ Pc0nIJW1WXCfuqt4D8AtmFA1Kjq0rcfvewT6VjjgfQ7aUrvupTiykNLBg1Hywg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hABRGFS1; 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" X-Migadu-Queue-Id: 848382A1A1 X-Spam-Score: -6.16 X-TUID: O43HuQMD+w2d bvchgvbt@mail.com writes: > If I have a plain-list element that looks something like > > ... > I seem to be able to get the items from the list using > > org-element-property :structure > > (260 2 "- " nil nil nil 338) > ... > But if I try to use org-element-property on that, of course it > fails because it's not an element, as I understand it, rather > it's an object(?). List structure is a semi-internal property, parsed using very old code, not fully compatible with the rest of org-element API. Please check `org-list-struct' and other functions in lisp/org-list.el to find how to retrieve information about list structure. Or just not use it. > Explanation: > What I'm trying to do overall is to get the various details out > of a list item that might look like: > > - State "DONE" from "NEXT" [2023-06-05 Mon 10:54] \\ > example > > So I'd like to be able to get the date of the timestamp (this > isn't an absolute requirement, I'm happy enough to just using the > current date), and the "example" text (which, obviously, isn't > always "example"). If I have to use buffer-substring-no-properties > and my car & car (above) then I will, but it would be nice to > know there's an easier/better/more appropriate way of getting at > what I want. Here, you should better use `org-element-context' - it will parse on object level, down to list items, paragraphs, and the containing objects. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at