From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YBQVOve4n2D9AwAAgWs5BA (envelope-from ) for ; Sat, 15 May 2021 14:05:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oIy2Nfe4n2DZFQAAB5/wlQ (envelope-from ) for ; Sat, 15 May 2021 12:05:11 +0000 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 8CE3B23844 for ; Sat, 15 May 2021 14:05:11 +0200 (CEST) Received: from localhost ([::1]:39648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lht2c-0001yd-Nr for larch@yhetil.org; Sat, 15 May 2021 08:05:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lht1g-0001vq-II for emacs-orgmode@gnu.org; Sat, 15 May 2021 08:04:13 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:44809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lht1e-0006Kj-Kq for emacs-orgmode@gnu.org; Sat, 15 May 2021 08:04:12 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 74AD0100009; Sat, 15 May 2021 12:04:04 +0000 (UTC) From: Nicolas Goaziou To: Ihor Radchenko Subject: Re: [PATCH] Fix test-org-element/cache References: <87wns0jkg5.fsf@localhost> Mail-Followup-To: Ihor Radchenko , emacs-orgmode@gnu.org Date: Sat, 15 May 2021 14:04:03 +0200 In-Reply-To: <87wns0jkg5.fsf@localhost> (Ihor Radchenko's message of "Sat, 15 May 2021 19:38:34 +0800") Message-ID: <87o8dcryoc.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.178.231; envelope-from=mail@nicolasgoaziou.fr; helo=relay11.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621080311; 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; bh=3yQb4oQSuK9ZTdEl8/5TC4SJ4rI9rb5yzKzo0Almys8=; b=Jxgappi0oYsvGcqZMAXmcHsfiKYXxOcKK/xQkXT9oqn5IZmMIKcwDMiwP2uVxlkeyiFtS3 DrgKJMKH7llaWhMcADCT9UwTX/oqWNtX/bwQH918vobESDtchbqRkOSGaQooaqH3y6c4Ee kBAW/2ilFBJW0EQs1gGed6YDi54UYgbvGgz5XQylQ2Xp2tpWacS5XQVLqwm6ElM6XX22Gg +9w8tNJa3ttQDoZIBdk6/4tWMTms/xedkPTVGE6Fjs+vVMQxNRaSoKX3lKb+x/n3PrOajY 7kzWDDT/kNWTPS15QdEe4yNCRa/MhbxUb8aiZpblOmvV+Ot2DQefzr7XChjAeQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621080311; a=rsa-sha256; cv=none; b=sjkPLP3QSPeXjzhAoNuJeFBpye1ZdPfrUR02mOUbJTdDwEtXyFMos7KWTYH+k1BK2Egbww e0rpZvVD78FlH0jPbjOow5BdDc0ZKT4OW2QKYnnFNvri63zvOtX+YU1GgxBQu7KmWWkpVo Soe/gU1YGLpH+cusqZsjmYqNJSUsQMrqNCt87/V9mmCqZXSL+hX7Zt02oy+IM3i4rge2mL 1UQAi0CO6z5xEluMDTn81/Mrf59V8Pf0gjPTVdoYpD7SPDHJQ4u7DIT/46/LRt6YmU3L16 Go1hc3ve19FlOHK57IG23UP57UeyeXQoJGiLGa0kDS2jhiUeYDT+k7GHfw9QXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8CE3B23844 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: 55TU+Rw+s2ks Hello, Ihor Radchenko writes: > I encountered a bug in test-org-element/cache. The test creates the > following Org file with table and runs (org-element-at-point) at the > beginning of the second line. The expectation in the test is that we are > at the table row, while in reality these are two distinct tables (the > "ab" line is a table within "item" list entry): > > #+begin_center > P0 > > - item > > P1 > | a | b | > | c | d | > #+end_center > > > I tested with emacs -Q (with no org-element-cache enabled). The return > value of (org-element-at-point) is (table (...)). In the test (before > inserting "item") the same point has different element: > > #+begin_center > P0 > > > > P1 > | a | b | > | c | d | > #+end_center > > Now, org-element-at-point (correctly) returns (table-row (...)). I'm not sure to understand your report, but `org-element-at-point' should return a `table' element at the very beginning of a table (here at the beginning of the first row), not a `table-row'. Regards, -- Nicolas Goaziou