From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +DZ6FVPgDWUAYgAAauVa8A:P1 (envelope-from ) for ; Fri, 22 Sep 2023 20:43:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +DZ6FVPgDWUAYgAAauVa8A (envelope-from ) for ; Fri, 22 Sep 2023 20:43:31 +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 159373D0D4 for ; Fri, 22 Sep 2023 20:43:31 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Cdl8Mnl4; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695408211; 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=n033tiHhu4j8/WwZ+JORle3cj4PP9199nigTllnCAMk=; b=B/nDcGYbgxM5A0xJ4MyH79+vgGcbZxuO3vGoAI9gCF/ITcEajqd8mu4S8VYz043V2iRXq6 4HgMQue3NHtg/QCOvsiuE7EnLeROOBF/n1xDL4uky3a5oFvZxDFuKo/sQPzUbTa/B8dvtm bpiHD1nhwRZJ7v5X/M5uq7bSpeWxxc6JmELkOggw2FoSMPr5oFbJaRJJrcP84IXvzNd86W JZv71KevDgOySZ2JK5j0WAt8GG0WCsY/yhAgRTlzP9YOhZZWHWlSxW9YBd6CgAdU236Czx 7u17MJgRCMURNQJJ7LL9yoT5Niiv1UCQTW28d98GTDzJA3hGnplyYZclOfhwjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Cdl8Mnl4; 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=1695408211; a=rsa-sha256; cv=none; b=u1QevQoI2+3mNrRSqWq75BptdOVP/c/RgrOpPiK4dK9cQFdsys3M6HZyuabrfkXR0H4VaE EpWWfCiPJrF2Me/aB4ThGGEB7oxmQuePv0y76zHqdxyrn9WHbOJ3zACKOj/WMPIUuPIZ4V AHRRLjEUQtu++xqr1K+v4SHIwhwWilCzTgX+zSzpu9lLrk256zIovpYzNBjNzArbKTLFPD 0gnzL52UBPt2nD0mWgdQXWGjBA4DYc30Rj8Bo7ymH5PtHKLMFnseiWgUn1RYRO2/KeLHul iuhS/23oVhJYudiIO4rkaorN0RfX0kmVsw69MQq6hm+tEayUrp66VqmvAg3aww== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjkcv-0007DY-UK; Fri, 22 Sep 2023 14:11:41 -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 1qjkcu-0007DP-UY for emacs-orgmode@gnu.org; Fri, 22 Sep 2023 14:11:41 -0400 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjkcs-0007HY-1D for emacs-orgmode@gnu.org; Fri, 22 Sep 2023 14:11:40 -0400 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6c0a3a2cc20so1446409a34.0 for ; Fri, 22 Sep 2023 11:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695406296; x=1696011096; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=n033tiHhu4j8/WwZ+JORle3cj4PP9199nigTllnCAMk=; b=Cdl8Mnl4T9/HIcH8J99Y6hD9tkIOJMo+1AdJzK51nJqQSUVfMoOrCgETSJp6NBTOrv Rr2nkg9JmJE1YTWQmelk7NM14Zd2BoFXz2u1grq7aavqKN+/8I/dSAKcP2iCwmOtR4nT vKAF2QJ/E+ZbyeL1f5DXYlBHUkP4rkUMuTMcm0NS7IN86UOwggXXqkyxKBsxzeG81Vnc 9wXNUFNiMuZL+8DQIcPEE8uv3E0gwjUb5f1g/NbLylbQJrncLKj8GKQ771YvMpKj0St3 G/pFTF1zMt+f4fj8Xn8ztoe7NONhXKaSSVdIzI0GiwldWiN/mnhhai7pdSJoLJZgDA2z MSZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695406296; x=1696011096; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=n033tiHhu4j8/WwZ+JORle3cj4PP9199nigTllnCAMk=; b=hW9f3KNolD2Bff3A/a5jbrIenDRGgas5vyNnn7ZCAtayN8i2H3XZyY8x8PNRDrxqnL pLnPs27fXOaR26z+HYrVMIL5G5ItM41pvwS8srFsqT8wjIVEs6j+mej040LlsH41Q1yk VDdu4hOF0hfh6pVKy/wh+d5Qnvz8cXVpiGR3wHGz2F3RujeagGUpx1Grrg9h1BGiVIH3 jGFLtsrE/ebWnn1FxS56JPwpIz44bZoSD/hxQ2VaHKWewWYrgIJddeOm2oBwOOz/4s4Q JVIMeKdkBdmQuC+g5PVpxYHNeZHWOd5psZCei6IgGTUgt47b1WWsfkYozpObSrGPTlsg BjlA== X-Gm-Message-State: AOJu0Yyc6Pinc5KCkvI5TVgOKKVtT8WxF4Bbl9ApAY/kSLC3EBqHOzr0 +KyjY84d6LZSiOGKdMR0Afkr0U6TwSdirtdvcP7Ch6cSN/VJ9A== X-Google-Smtp-Source: AGHT+IHjgkNx6bUFQEAZufb77llwJmZ9QwEO4Up3SR/Pr7R4w1305uYnFIPJtiO0nl5q/VHwqZ3XqJYH9CJ/iDcCh2U= X-Received: by 2002:a05:6830:ed5:b0:6c4:a65c:f7bb with SMTP id dq21-20020a0568300ed500b006c4a65cf7bbmr424366otb.33.1695406295746; Fri, 22 Sep 2023 11:11:35 -0700 (PDT) MIME-Version: 1.0 From: Gustavo Barros Date: Fri, 22 Sep 2023 15:11:24 -0300 Message-ID: Subject: [BUG] org-element-context doesn't recognize link inside property drawer [9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.1/lisp/org/)] To: org-mode list Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::32a; envelope-from=gtvbrs@gmail.com; helo=mail-ot1-x32a.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, HK_RANDOM_ENVFROM=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.52 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 159373D0D4 X-Spam-Score: -6.52 X-TUID: 8+RC2fGyypG0 Hi All, When a link is placed as a property value, `org-element-context' does not recognize it as a link. (Setting `eval-expression-print-level' and `eval-expression-print-length' to nil). Consider the following document: #+begin_src org ,* Heading :PROPERTIES: :LINK: [[https://orgmode.org/][Org mode for Emacs]] :END: #+end_src Placing point on the link and calling `(org-element-context)' returns: #+begin_src emacs-lisp (node-property (:key "LINK" :value "[[https://orgmode.org/][Org mode for Emacs]]" :begin 24 :end 76 :post-blank 0 :post-affiliated 24 :mode node-property :granularity element :cached t :parent (property-drawer (:begin 11 :end 82 :contents-begin 24 :contents-end 76 :post-blank 0 :post-affiliated 11 :mode planning :granularity element :cached t :parent (section (:begin 11 :end 82 :contents-begin 11 :contents-end 82 :robust-begin 11 :robust-end 80 :post-blank 0 :post-affiliated 11 :mode section :granularity element :cached t :parent (headline (:raw-value "Heading" :begin 1 :end 82 :pre-blank 0 :contents-begin 11 :contents-end 82 :robust-begin nil :robust-end nil :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :LINK "[[https://orgmode.org/][Org mode for Emacs]]" :title "Heading" :mode first-section :granularity element :cached t :parent (org-data (:begin 1 :contents-begin 1 :contents-end 82 :end 82 :robust-begin 3 :robust-end 80 :post-blank 0 :post-affiliated 1 :path "~/test.org" :mode org-data :CATEGORY "test" :cached t)))))))))) #+end_src In particular, the "link" element is not present, as would be the case if the exact same link were not inside the property drawer. On the other hand, the link is active (fontified, works, etc.). Thus, `org-element.el` and `ol.el` seem to disagree as to what that part of the buffer actually is. Best regards, Gustavo. Emacs : GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-07-30 Package: Org mode version 9.6.6 (release_9.6.6 @ /usr/local/share/emacs/29.1/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-persist-directory "/tmp/org-persist-DRjSU9" org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) )