From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aMdRFa8AQmPF8wAAbAwnHQ (envelope-from ) for ; Sun, 09 Oct 2022 00:58:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sGZ6FK8AQmMs4AAAG6o9tA (envelope-from ) for ; Sun, 09 Oct 2022 00:58:55 +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 0A5A7AF1C for ; Sun, 9 Oct 2022 00:58:55 +0200 (CEST) Received: from localhost ([::1]:43658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohImT-0002nP-Ni for larch@yhetil.org; Sat, 08 Oct 2022 18:58:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohIll-0002nE-50 for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 18:58:09 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:45764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohIlc-0000DN-BK for emacs-orgmode@gnu.org; Sat, 08 Oct 2022 18:58:05 -0400 Received: by mail-ej1-x62c.google.com with SMTP id sc25so12037364ejc.12 for ; Sat, 08 Oct 2022 15:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:reply-to:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=g/qFoMfHoPGjZHUIAvcwwcHSKUtQHPG+Di9Dar1yDK4=; b=XB3Be4CReCgj2V4YPTqIsZt1U3SPEZSezxWqHFUu2HgWdVdgHL9cixycq1uQanZ/9Z ukMKx3+OAJKDdSeLNLRYc+DaHCrs8VBiKAhkbKeTAdIgEATY04z5fYunTOLN0gPzb6tu nxmvzwfgzzTlENXeKFT4aj58mJ++3IneVKnRSXCXQs+WMwhs3vP49/DuQXtbJ1+9CZ55 WQyXkWvk7YAuxbEN0YzLilzeWePSbpHJfOFMXpSuDrup1svuCQnFXta8dpRA714z97yK w0eIvGEP6GGbR5UTyvTnBgsusJ4rinj9eO+TyszcVWf02yDHvHdPK8le7Ox1pBTq5Ak0 1nag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g/qFoMfHoPGjZHUIAvcwwcHSKUtQHPG+Di9Dar1yDK4=; b=x58CWsttw2m5XmFJ4WlGjT3eOFrpryYuVhH7IdidyIWhGTUey9h+eeQQctPy/JwHVW NTs82HcK5/qyfNMaMEn66d22nuf7yKpb4U7y0DtxkSy3EMo/JGfytUI+6rbP5NHsVhJz uZ6VEPGV2qk42bvHz1DgxHoKQDySRqTVvzdAS5I6+8L/mgjxcTJu4OMaMxhiiktb8cPE GmK4t8po3lyGz3bskJmya4gemxfAcKE85koOFna2a8QjNaJqAY1rqrMLeZ4837iWsxz1 hvLAYd9AZl8666KpOX4ZTDY3f9ZWaHrg/eFvf47taTla+fXe9GIWhZmaPVoK7qqTfuly Girw== X-Gm-Message-State: ACrzQf2eF0u2r+YhtpjS2Wbkqn5fv+4djzeUARqxfYAoLnYwjcdoi5lJ kh/JlUfODnaHA1iaxK0hbiyosnq8H075XEi8uKaH+ER6Q1Y= X-Google-Smtp-Source: AMsMyM6UY1RMd26QkBQcxaf1y8+f6KB9v0MFqwyEYWh04SPmRkKZet3W4pmJv7NpTcoCvga7tsfRnStPRXpalKoWFks= X-Received: by 2002:a17:907:724e:b0:783:5fba:4298 with SMTP id ds14-20020a170907724e00b007835fba4298mr9943424ejc.28.1665269875696; Sat, 08 Oct 2022 15:57:55 -0700 (PDT) MIME-Version: 1.0 From: George Mauer Date: Sat, 8 Oct 2022 17:57:43 -0500 Message-ID: Subject: Get the "closest" property value To: emacs-orgmode Content-Type: multipart/alternative; boundary="00000000000065667205ea8ddb0f" Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=gmauer@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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=no 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: , Reply-To: gmauer@gmail.com 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=1665269935; h=from:from:sender:sender:reply-to: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=g/qFoMfHoPGjZHUIAvcwwcHSKUtQHPG+Di9Dar1yDK4=; b=iTmsVWSza9Cb9ysJOFFR8RiXZRzIBZC6X9BgQhN9UOotqRMDYTs4RXBFxLoducsLDgKLrA 7GsZoMK/Zzpr3/NNdHlEAd5g1zfAs5VJaTN/c4d+RpaQTKypRS0iyYFXKFxotUwGPPolJ5 pHcZSk21AdYHlf7149mggPBWm6COYRYLwwv87+WntZM+TF441mkydjj1UAOTlMLEM2CEMv xRdE40T7MXktUNYbPRWFCFhw1iWnl0oxwzv6v5yz3Tf+hNZuZuYB+a5aAuqCN/lsn0BS8R pKpTGkZwFILmtDDhMAw42iMhEo+Jzm/YXSpA4P+QWPuMnaGzM72WWr70rXFXdg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665269935; a=rsa-sha256; cv=none; b=YJtTQcvZe5okfe5Tx4TuzzwLX7kaV6LgMi3Sn66AbEBK4GOVZ0LF3qAkA/gDuHEKvrGUZ9 cOc7jdaPGnd2VFAQpTGt2aBpZhhsoNCPi6PRoJQwXPDs0CVcN6SYc4jFON41r2xnEhOMy9 CdbwexGenK5kF2FRKzDA3c/sj4TONqiYlkbJYe1RUJkJcVw2YUyzzl1ffbla6q0LCJrYnU aZ0ky55uczH18ktcBs6bKZzj8sx4F6K2pt87mmmXw9kvBMLBgVMhMCLfp5S5hH323mEeDg /bVqq2UaM5rEm8WfnRzPloFMw5AsYlslft7sV7bxaiMuirkeU2Vf43qGtPqOCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XB3Be4CR; dmarc=pass (policy=none) header.from=gmail.com; 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: -2.39 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XB3Be4CR; dmarc=pass (policy=none) header.from=gmail.com; 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: 0A5A7AF1C X-Spam-Score: -2.39 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0X7EKgkWdwaq --00000000000065667205ea8ddb0f Content-Type: text/plain; charset="UTF-8" If I have a document what looks like the following. What code could I run for the ??? to get the property value for "workspace-directory" that is closest in the outline to the location running the code? * Top Level :PROPERTIES: :workspace-directory: /tmp :END: #+begin_src emacs-lisp (???) ; /tmp #+end_src ** L2 Heading :PROPERTIES: :workspace-directory: ~/whatever :END: #+begin_src emacs-lisp (???) ; "~/whatever" #+end_src ** Another L2 Heading #+begin_src emacs-lisp (???) ; /tmp #+end_src --00000000000065667205ea8ddb0f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If I have a document what=C2=A0looks like the=C2=A0followi= ng.=C2=A0What code could I run for the ??? to get the property value for &q= uot;workspace-directory" that is closest in the outline to the locatio= n running the code?

* Top Level
=C2=A0 :PROPERT= IES:
=C2=A0 :workspace-directory: /tmp
=C2=A0 :END:
=C2=A0
=C2= =A0 =C2=A0#+begin_src emacs-lisp
=C2=A0 =C2=A0 =C2=A0(???) ; /tmp
=C2= =A0 =C2=A0#+end_src
=C2=A0 =C2=A0
** L2 Heading
=C2=A0 =C2=A0:PROP= ERTIES:
=C2=A0 =C2=A0:workspace-directory: ~/whatever
=C2=A0 =C2=A0:E= ND:
=C2=A0 =C2=A0
=C2=A0 =C2=A0#+begin_src emacs-lisp
=C2=A0 =C2= =A0 =C2=A0(???) ; "~/whatever"
=C2=A0 =C2=A0#+end_src
=C2= =A0
** Another L2 Heading
=C2=A0 =C2=A0
=C2=A0 =C2=A0#+begin_src= emacs-lisp
=C2=A0 =C2=A0 =C2=A0(???) ; /tmp
=C2=A0 =C2=A0#+end_src
--00000000000065667205ea8ddb0f--