From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ICPSNexOUGNyHgAAbAwnHQ (envelope-from ) for ; Wed, 19 Oct 2022 21:24:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yAX8NexOUGPNVQAAauVa8A (envelope-from ) for ; Wed, 19 Oct 2022 21:24:28 +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 A7ADB2E6EA for ; Wed, 19 Oct 2022 21:24:26 +0200 (CEST) Received: from localhost ([::1]:48294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olEfx-0006E4-1F for larch@yhetil.org; Wed, 19 Oct 2022 15:24:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olEf1-0006DM-7C for emacs-orgmode@gnu.org; Wed, 19 Oct 2022 15:23:27 -0400 Received: from mail.choca.pics ([2001:910:1410:500::1]:43644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olEez-000854-4d for emacs-orgmode@gnu.org; Wed, 19 Oct 2022 15:23:26 -0400 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 9006F181942B3 for ; Wed, 19 Oct 2022 21:23:13 +0200 (CEST) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 6pusNEXalObt for ; Wed, 19 Oct 2022 21:23:13 +0200 (CEST) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 0CD9D181942B4 for ; Wed, 19 Oct 2022 21:23:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id LEfZl3x-s-6d for ; Wed, 19 Oct 2022 21:23:12 +0200 (CEST) Received: from localhost (153.226.95.79.rev.sfr.net [79.95.226.153]) by mail.choca.pics (Postfix) with ESMTPSA id B69D3181942B3 for ; Wed, 19 Oct 2022 21:23:12 +0200 (CEST) From: Damien Cassou To: emacs-orgmode@gnu.org Subject: Weird behavior of org-element-object-lex Date: Wed, 19 Oct 2022 21:23:11 +0200 Message-ID: <87fsfjd3ds.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2001:910:1410:500::1; envelope-from=damien@cassou.me; helo=mail.choca.pics X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.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" 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=1666207466; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+k1YfVXufHfFU/gLhKXpZQEKNQXScc3kMtksIVqIUDk=; b=iwsB4I498LknAlBmYlQGZ3yuSOB0egoVCkmi9v5nExM2AFwvzDLSRxHz5z/Hy1Q90QljdS zwi0ouTvwQGGbOJPf6SpeVEJDC4ND0es3ipgyEPrUuJo61cIfdm26Ov95l3R5hhAKaOiqu FSHOMUAxvdJV6zxO1ZR1ty/rJcHr4M2bLF42VlKKzKililRySND8+IWlT+TosJBxSaBOsF 1/9JpN02u3+0lKI9usfdRjAY7Cv4eyk6PdiRh5HJhd8euQWXSEb2XUou1K1YNJQKCQEn5Y 0OXGZz/2S7/FRDqfur7yRUVQuQOcjSqnrMuMIpBGyRwmp/Odg6GFA6bzHLE9YQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666207466; a=rsa-sha256; cv=none; b=tDUNF99+y2APYSDx6d7VFcLVYPy2uC67yb1O6enkHhMweTa1aXJMD0pxHDOqmiuF8eGjUG uH4suBaohL8TxaadyuvHeKuwPVRrZcHBCGEJX1f7WCO/DHOyAnoRzIGvSBQd5Zlw65qtig 0Co103Cr9LGnnDnejXr8jQengLnO3POsB9Ge//t3keHnxNzth35XvzZ1O8CbNT4nqLnP2n KdEX0XRZjlOeSx19V+kIZNyivrGJA5rn11L0DERR7lOCyHslwJThkK9Pd84ElFHgCKZG3g mqtdAIuzCvept+HuBZVLndzrZmx5v0CEuGgEvzbkuQOvI1+RizXIv76lvmCjCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -1.22 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: A7ADB2E6EA X-Spam-Score: -1.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4MExq48GGAzV Hi, here is the beginning of `org-element-object-lex`: (defun org-element--object-lex (restriction) "Return next object in current buffer or nil. RESTRICTION is a list of object types, as symbols, that should be looked after. This function assumes that the buffer is narrowed to an appropriate container (e.g., a paragraph)." (cond ((memq 'table-cell restriction) (org-element-table-cell-parser)) ((memq 'citation-reference restriction) (org-element-citation-reference-parser)) (t =E2=80=A6))) >From what I understand, if `restriction` includes 'table-cell (or 'citation-reference), and if the content isn't a table-cell, `org-element--object-lex` will immediately return nil without trying other object types. Is that a bug? --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill