From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sC1FFBKGvmPE1QAAbAwnHQ (envelope-from ) for ; Wed, 11 Jan 2023 10:49:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AACIExKGvmNDqAAAG6o9tA (envelope-from ) for ; Wed, 11 Jan 2023 10:49:06 +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 84A2D11C23 for ; Wed, 11 Jan 2023 10:49:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFXiM-0006j0-8p; Wed, 11 Jan 2023 04:48:10 -0500 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 1pFXiG-0006iT-FO for emacs-orgmode@gnu.org; Wed, 11 Jan 2023 04:48:04 -0500 Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFXiE-0000NJ-Qb for emacs-orgmode@gnu.org; Wed, 11 Jan 2023 04:48:04 -0500 Received: by mail-vs1-xe2c.google.com with SMTP id d66so2698138vsd.9 for ; Wed, 11 Jan 2023 01:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=bc5134QFUltE2VvAwMpUUgHFbH9WDoSUiznIod61wdk=; b=A8xxKByuBz8t/HrSMYIaV4g4Gwbi7wHSM5ZayFrOXB8W5UJeqIXtz/0mIs6Y4Cv93J +FfMb5Q4c/O2ngJ0JvDSGk27GXxnWmGBR68vbCL/VhicCjWSwdFmA1Qkn/7ePqtKVK0p 4C+PdqM30XAMnRJEl0mTGdDqDoXLrSG8T5bJAai5w1D5IbnO8TrNfisWzbhZPVh74KsN Fup+bcTQ/H2mIaFtsl/O4fZ9y1b8bg6srQmpEg9f/eS6mZs2nNASToLCLe7XMoQWmYZ4 Ux2cUJLRyJ6yH3JO99n5EhCAPy2LEgQt5dspMyFD14fxacpJow4u3yHtoEDPaz1d4uaa D/vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bc5134QFUltE2VvAwMpUUgHFbH9WDoSUiznIod61wdk=; b=78S2gHylo+pXyKj5kRxDr9A51HOX44ALEZTqv1NAWkkj+9my2cPSn01lRvGtDK626w Lvqkg0C9ppGq1sYexJqC/nit4f0WvLPn0CJ/NXD3SLlpR9dd5oJFgEzUyIYHHtkWBlUg Sv/wP+NAJ4fAp59Gf65b7/m44D7VX7l6315keH/M6nBXUSdL6bJat+o+h+3SzOn97spR vxBwe4y1rofHhRXC2L3JjOkTC1tb1UmgxkztEKXH9g/iTnk27sTAuDWhvkNka6YOga4Y i2dRHqKUS1xvS7rddHVUYMcwbgqA8aJ9lGUBgF7vOUlisCDq+/I4y36ihj2ZsvxDBh7U FvuA== X-Gm-Message-State: AFqh2kqwnNAUhCIvRSRDSCQ2GBYkpWUWEC+DNIprUBTkNJ1dXOSeIoUy PSiw3YujnJtuwX87OWrVxVf1tKNFi4oQBg36dem6NDXOnbX1jg== X-Google-Smtp-Source: AMrXdXvT3ClzzaC7sZDfj+SGojVcMaATtyahNmWbYQhA9dw5FX9o0BFgf+8a5vCyDN4lwZobuMtebHbpB3aRz9QvwFA= X-Received: by 2002:a05:6102:5c5:b0:3cd:50b1:803a with SMTP id v5-20020a05610205c500b003cd50b1803amr5647526vsf.33.1673430479484; Wed, 11 Jan 2023 01:47:59 -0800 (PST) MIME-Version: 1.0 From: Michael Dauer Date: Wed, 11 Jan 2023 10:47:48 +0100 Message-ID: Subject: (org-element-parse-buffer) and (org-with-wide-buffer) To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000493a3505f1f9e587" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2c; envelope-from=mick.dauer@gmail.com; helo=mail-vs1-xe2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=A8xxKByu; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673430546; a=rsa-sha256; cv=none; b=HP6utf3qa3opZXGqpZRj1HWKb2yz5TC8RLy0wQFu8u7XEOTL3isnnDp43jUP1xDgPFDfu7 TMGuJKhgGDU+iPLUVe090qjrPx1gx1Y8ypjpvguT+xFm+Yy7VrNOAdsLhc156+nf1VYevm eu12EXZT8k0PSu1PCSkemsQZDtREfeMrhaEpYX6vLgpKke+UF9Mcl4yZ+d7iMg7OqdtoLd exo8JSXTb7chtdjrspzNRlvC+/DTY0waexSgkoy2KHfjxe4nHp4g1n5AnRDJSclaTuSKvc c2/Hcgp978pqmwC++M4vnOOsXK1/bnb70AqKj8+o9v6HLTeNAfPNZwFq39oGMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673430546; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bc5134QFUltE2VvAwMpUUgHFbH9WDoSUiznIod61wdk=; b=k28aCwzYwIpQMo68VHgAqpBVnIxD9RXa2jXnM/iWeuszBV5YJ/E7D+qDtQijwpBlTrehkp qxV75dWvsRywYhA7HAP8XIaoBPQvR+hVLluDgqpz68927VpKAtS63ucAAZkuhUIDXwN0GP NnD21iKDRuIhM62xDCIo0CcwF132Trw70uA1vwXt1a7Llc7IGBIzs+DJRgglmU1cy4BIsB lu3K0O7BqPvkh6AAqtMxZnaRh+1avGyPjBlJblnTiX7E3u+uifqOqVDjPWICOmpR0upgP/ nIcwY9ZDS7KdlTWLkEgUTcCxSruWm9aR0ro6oXaunSwbIUM3p59QrPMgyHbPLw== X-Migadu-Queue-Id: 84A2D11C23 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=A8xxKByu; 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"; dmarc=pass (policy=none) header.from=gmail.com X-Migadu-Spam-Score: -8.03 X-Spam-Score: -8.03 X-TUID: gymK97snC91L --000000000000493a3505f1f9e587 Content-Type: text/plain; charset="UTF-8" I see a potential bug here: (org-element-parse-buffer) with VISIBLE-ONLY does not include regions made visible with (org-with-wide-buffer). Test (Have h2.2.1 collapsed before running it.): >>> * h1 ** h2 *** h2.1 *** h2.2 #+begin_src elisp (org-with-wide-buffer (org-narrow-to-subtree) (goto-char (point-min)) (list (--map (cadr it) (s-match-strings-all "^\\*+ \\(.*\\)$" (buffer-substring-no-properties (point-min) (point-max)))) (org-element-map (caddr (org-element-parse-buffer 'object t)) 'headline (lambda (it) (org-element-property :raw-value it)))) ) #+end_src #+RESULTS: | h2.2 | h2.2.1 | h2.2.1.1 | | h2.2 | h2.2.1 | | **** h2.2.1 ***** h2.2.1.1 aaaaa *** h2.3 * h3 <<< I would expect both output rows to be identical. But it seems that (org-with-wide-buffer) has no effect on (org-element-parse-buffer) with VISIBLE-ONLY argument. While I believe this is a bug, I would also appreciate hearing about possible work-arounds. thx --000000000000493a3505f1f9e587 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I see a potential bug here: (org-element-parse-buffer) wit= h VISIBLE-ONLY does not include regions made visible with=C2=A0(org-with-wi= de-buffer).

Test (Have h2.2.1 collapsed before running i= t.):
>>>
* h1
** h2
*** h2.1
*** h2.2=
#+begin_src elisp
(org-with-wide-buffer
=C2=A0(org-narrow-to-subt= ree)
=C2=A0(goto-char (point-min))
=C2=A0(list
=C2=A0 (--map (cadr= it)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s-match-strings-all "^\\*+ = \\(.*\\)$"
=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 (buffer-substring-no-prope= rties
=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(point-min) (point-max))))
= =C2=A0 (org-element-map (caddr (org-element-parse-buffer 'object t)) &#= 39;headline
=C2=A0 =C2=A0 (lambda (it) (org-element-property :raw-value = it))))
)
#+end_src

#+RESULTS:
| h2.2 | h2.2.1 | h2.2.1.1 |<= br>| h2.2 | h2.2.1 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|

**** h2.2.1=
***** h2.2.1.1
aaaaa
*** h2.3
* h3
<<<<= /div>

I would expect both output rows to be identical. B= ut it seems that=C2=A0(org-with-wide-buffer) has no effect=C2=A0on=C2=A0(or= g-element-parse-buffer) with VISIBLE-ONLY argument.

While I believe this is a bug, I would also appreciate hearing about poss= ible work-arounds.

thx
--000000000000493a3505f1f9e587--