From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KJVjFkMuYGGoEAEAgWs5BA (envelope-from ) for ; Fri, 08 Oct 2021 13:40:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yCpIEEMuYGFWcgAAB5/wlQ (envelope-from ) for ; Fri, 08 Oct 2021 11:40:51 +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 D1F0317F6C for ; Fri, 8 Oct 2021 13:40:50 +0200 (CEST) Received: from localhost ([::1]:42494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYoF7-0002fh-SV for larch@yhetil.org; Fri, 08 Oct 2021 07:40:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYoCg-0002eg-6s for emacs-orgmode@gnu.org; Fri, 08 Oct 2021 07:38:18 -0400 Received: from mout.gmx.net ([212.227.17.21]:44227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYoCd-0007lC-00 for emacs-orgmode@gnu.org; Fri, 08 Oct 2021 07:38:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1633693091; bh=36bMlvKEKosfmatgg3/2xvaSciMz9qR21iwI29tuZzA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=EsJtLyx8Q1cmvlLUl835ehzarz8L75lgLd6TY3fl8BCWj0fhRzkSM4OZB1xyehaOy EV0t+RMoQuBb7hDj9iDAbH7MxkyQSfEnXQXc7yASNdrvnifTSdoOhlr6ntfcZenU0C yFfZsui0q/z5WXnWIatJPQFDpXjOaF2SkujSNTgM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [131.130.103.176] ([131.130.103.176]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUrx-1mxUnS0rnd-00xpCr; Fri, 08 Oct 2021 13:38:11 +0200 Subject: Re: [BUG] org-context called from link in org-agenda entry returns wrong values [9.5 (9.5-g0a86ad @ /home/.emacs.d/elpa/org-9.5/)] To: Ihor Radchenko References: <97c31832-9dce-c52f-038e-ccc80157b62e@gmx.at> <877depxyo9.fsf@localhost> From: Harald Judt Autocrypt: addr=h.judt@gmx.at; keydata= xjMEWz9DYxYJKwYBBAHaRw8BAQdAKS36MI1JSuMxtk7tkZ2/NK1C9te1XJ8bBlB9qF4blEbN G0hhcmFsZCBKdWR0IDxoLmp1ZHRAZ214LmF0PsKWBBMWCAA+AhsDBQsJCAcCBhUKCQgLAgQW AgMBAh4BAheAFiEE4HNt2P9AnPIGZRHUT/+rIbhYCr0FAls/RTgFCQlmA1UACgkQT/+rIbhY Cr2FBgD/aQuftIr3IhsbGsOYF1aLLfX8Cu5yD6jQYPSQwwHNx2MA/3mYV677aYsNcRkVDYsh ZsITDsxVok2LBb40ppvxGUUKzjgEWz9DYxIKKwYBBAGXVQEFAQEHQA7/uzYBE88LdCm19AaX q46nMKkhxM5CZ2YAa1uC5l97AwEIB8J+BBgWCAAmAhsMFiEE4HNt2P9AnPIGZRHUT/+rIbhY Cr0FAls/RZIFCQlmA68ACgkQT/+rIbhYCr2YCgEA687yICGLmDkxWKlD140L5Od6auV3NiXg 8Frz3DL2DsgA+QFrqXh4RtJYJ22s69REG+3tCWJy/BJZYJCQYpN4tIAG Message-ID: <5a1cb629-8437-41f5-fd75-674c949eaf5e@gmx.at> Date: Fri, 8 Oct 2021 13:38:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <877depxyo9.fsf@localhost> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jdps1aBudjWaYu966huNsRXMJnW3JSJkp" X-Provags-ID: V03:K1:leyisEcafO1iYev0sSyGuw0ibyypA6uHjYSUruQ7EP1usu+n0Ty 30BLqCs+CT+vcMGfkxMN7M9HlRnAfWh9kKJYL22CS/PxX0q+geZNjq93RxFIhhtTc7sZXcb Qy8LJqqNT+hwJuzGaD97ChOTF6lbC66Fsbh+0KnBzwIFqBxY2sNI2wqsSgsHby1TGK+qKOb ZtLDHuEUaxLXkP8fa3Z7A== X-UI-Out-Filterresults: notjunk:1;V03:K0:cOAiiebtItQ=:sHVCRyeubT8vFizV4D9T5b L1dh3T+/GZBdYWuMJUIIs4Me3auWdVb9PuqYc2AxcLggdF5FSVdJhZoYJxSqB2wGZCvifbjHl 0yRsDmTZ775BrOD6DWz5J1Pxr3V+G0Mbs3SaVa5SNalT6xFZSMjvy2byQxwWgjAH5vIoyzp6D wrF8wTSRt5jxIOMxhNb0n9hJx1X3spa4FEw4iXbiBPiwu1y5beeH0ia7FW198Yt1rkFo1XdBH g3g6UQ6WPPEptsy5wcgIvBG4tmz/NPhQEcgVUsDwX85daXO4IuyarZXDQ38AMJUEvwTw8HQ9H 2bdmwTJeiDHJBIn1grk79oTVwrGWx3nOdbxU50xpzx0fWwKsBPZ4osp4/FOIQP4EW7a0ebALm zNl08rQGXWoM7xCXKuiASITRmEGuyfAO9b2Iu5XPQ+iPwTFHy40wBp3QXa7J2OtkMFkzrJ7a/ 3rd/neJzBXeSnqi0xCU1m3TnrJsWwnYb16rEMYGcJUNQqPT8Va1247u2S3V34b3JwkHEXfv8U 48LuIlt2LjTG4PumGDZqguFVjE/7/ar0qmBHeaghANJPJfjmVV7EunzilUct1fRRcfeETaDSq igh685legIO0AOrgTEhBMEpBEbeI21m7lOTXVNlKHdJgjeouG7t5rO1EQuFf/D1IHqjGIuaDD ZE5QlhjZPeD8x1S8uXZKkjBZ/tleCSC/yAAcpW74ecyQjCHcVC1vAxPXsKeYMwBFVVgCF6n5U 540+6Zz8qk5wf8pqDM/Ny+3PLlBa2YFtmJvm3GGb4TVF/AyaGU354g/tFHJOazifNra8t6yVJ 1J79IToUOZnlnT64sKCAB/tcFle5Zks6gA/3Q4+8JlUa4h6TJaoT4kFOVQLP8aWjFJQJSewmF ZEDp0prsycpUAaXIYT8WRwSNTWSCKwc9O8yvU/eQGTUdPJrnO7HE1F383kt5dyU3m9/gUNtaY YWFhvhi7tgE7WSMgU9Dr0y0wNgtkAxrakIsiVxK2f6auiaoWEzYbKQCxAr4RidTbd0fpFWq8v U3Mj0RHyndIufgMrLYqVdJ6MQEkzh2mbtU15hAgEyjtHTv/AmfvmS8vz9P2qN0I/hRQR8tmvc e/DiOcrFlGUk84= Received-SPF: pass client-ip=212.227.17.21; envelope-from=h.judt@gmx.at; helo=mout.gmx.net 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-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=1633693251; 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:dkim-signature:autocrypt:autocrypt; bh=uQLseAh1kaneBksRUGqc50P9sadtfFhD5AsQpjF4a3Q=; b=qyQzJUnPWoQ5LRAxNcms0fHdkd9Gjty5L4+TYkSjwI0gSfuhFfuouxsbt/4Me7N/tbpnC3 s6f7xQ1R+QbwXY5BcbQNYBRXQQ2iKWlm5Zk9F+xeBUJrmRuO1n1PXG7kGNjhWAlo99Ziuz 3oDGIt9m0YESWU2id0XHu83ml5O28cv7Zk0FMtAt6EKpBosxGVaVQcLd9kH5ka2cEe8yhh 8MQEbzfma8wnQzGyEkFaRw6IUmGyvt5I46b0cGhjjwgLAbCtf9BtfU+QlFFpn8ODf+GVuE me/lCxptXwc0s3bjJ+VVPxs6NrQKd8F+cbZLHVx72/qgJX6m78V29YZtwQx8lA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633693251; a=rsa-sha256; cv=none; b=deJtQqfz1GW8Uh6JzwV4uoiC8pTvMO0qOgu3Yqcmsn9vrRyz9p5WK8NTk+YAHFOeA0kDDS Akrm9EXcnhD5qIMiJQ1KC8cRRmAeSlngAUTaEuIZ7Ok4+FtOfBmj15JB6d6Grbx9Kxzuaa M60CuRkP+Ge4QblxMRB25WUn0HPorAl1weVbbR+e7yFNrcdv7ULUaZVKQGkpndgVwzVuhq G/K2jVodYBZ6FOuD7JosPYcRA4P9rAFEohpg+KU7E8hpFNnXPTG1GMF/y2hzWZR3/eP8XR M3xeuo4vBDRCZqet3FNr7/PLw06b9JveISNbbAL83jjM8JMz8KpQ5yveI5nFOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=EsJtLyx8; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmx.at (policy=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: -4.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=EsJtLyx8; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmx.at (policy=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: D1F0317F6C X-Spam-Score: -4.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: UwHBXrIeqZu4 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jdps1aBudjWaYu966huNsRXMJnW3JSJkp Content-Type: multipart/mixed; boundary="Wf7V8Oi9xlU4TjyWfisU3CwWi8kEOkZ16"; protected-headers="v1" From: Harald Judt To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Message-ID: <5a1cb629-8437-41f5-fd75-674c949eaf5e@gmx.at> Subject: Re: [BUG] org-context called from link in org-agenda entry returns wrong values [9.5 (9.5-g0a86ad @ /home/.emacs.d/elpa/org-9.5/)] References: <97c31832-9dce-c52f-038e-ccc80157b62e@gmx.at> <877depxyo9.fsf@localhost> In-Reply-To: <877depxyo9.fsf@localhost> --Wf7V8Oi9xlU4TjyWfisU3CwWi8kEOkZ16 Content-Type: multipart/mixed; boundary="------------396564D8BBE1DC8541EF24A1" Content-Language: de-CH This is a multi-part message in MIME format. --------------396564D8BBE1DC8541EF24A1 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Am 07.10.21 um 06:10 schrieb Ihor Radchenko: > Harald Judt writes: >=20 >> Hi, >> >> I am using this function to copy links from the agenda to the clipboar= d: >> >> (defun my-copy-org-url () >> (interactive) >> (let* ((link-info (assoc :link (org-context))) >> ... >=20 > org-context is ancient. It relies on org-links being fontified using > 'org-link face and would fail for any non-standard link with :face link= > parameter. Moreover, the return value will be different depending on > org-link-descriptive setting. >=20 > We should probably deprecate this function and encourage using > org-element-context. So, I recommend rewriting your code with > org-element-context. Thank you, that helped me updating the function, which works fine with=20 org-element-context: (defun my-copy-org-url () (interactive) (let* ((raw-link (plist-get (nth 1 (org-element-context)) :raw-link)= )) (if (not raw-link) (error "Point not in an org link.") (kill-new raw-link) (message "Org link URL copied to clipboard.")))) Regards, Harald --=20 `Experience is the best teacher.' PGP Key ID: 4FFFAB21B8580ABD Fingerprint: E073 6DD8 FF40 9CF2 0665 11D4 4FFF AB21 B858 0ABD --------------396564D8BBE1DC8541EF24A1 Content-Type: application/pgp-keys; name="OpenPGP_0x4FFFAB21B8580ABD.asc" Content-Transfer-Encoding: quoted-printable Content-Description: OpenPGP public key Content-Disposition: attachment; filename="OpenPGP_0x4FFFAB21B8580ABD.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- xjMEWz9DYxYJKwYBBAHaRw8BAQdAKS36MI1JSuMxtk7tkZ2/NK1C9te1XJ8bBlB9qF4blEbNG= 0hh cmFsZCBKdWR0IDxoLmp1ZHRAZ214LmF0PsKWBBMWCAA+AhsDBQsJCAcCBhUKCQgLAgQWAgMBA= h4B AheAFiEE4HNt2P9AnPIGZRHUT/+rIbhYCr0FAls/RTgFCQlmA1UACgkQT/+rIbhYCr2FBgD/a= Quf tIr3IhsbGsOYF1aLLfX8Cu5yD6jQYPSQwwHNx2MA/3mYV677aYsNcRkVDYshZsITDsxVok2LB= b40 ppvxGUUKzjgEWz9DYxIKKwYBBAGXVQEFAQEHQA7/uzYBE88LdCm19AaXq46nMKkhxM5CZ2YAa= 1uC 5l97AwEIB8J+BBgWCAAmAhsMFiEE4HNt2P9AnPIGZRHUT/+rIbhYCr0FAls/RZIFCQlmA68AC= gkQ T/+rIbhYCr2YCgEA687yICGLmDkxWKlD140L5Od6auV3NiXg8Frz3DL2DsgA+QFrqXh4RtJYJ= 22s 69REG+3tCWJy/BJZYJCQYpN4tIAG =3DGnN1 -----END PGP PUBLIC KEY BLOCK----- --------------396564D8BBE1DC8541EF24A1-- --Wf7V8Oi9xlU4TjyWfisU3CwWi8kEOkZ16-- --jdps1aBudjWaYu966huNsRXMJnW3JSJkp Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQTgc23Y/0Cc8gZlEdRP/6shuFgKvQUCYWAtogUDAAAAAAAKCRBP/6shuFgKvQpG AQD+TzufDBp/DMNzaEpciCRtKNQ93urBmOSoWOwiJEK96gEA0HUlbxS8o3HYqSRpC2EUOjt0P6i6 DkMT9Ts0YJ4hYwo= =fdrb -----END PGP SIGNATURE----- --jdps1aBudjWaYu966huNsRXMJnW3JSJkp--