From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#42483: 26.1: thing-at-point doesn't recognize org-link urls Date: Wed, 22 Jul 2020 23:32:18 -0400 Message-ID: <20200723033218.deuamgvc74zskyz4@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40502"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 To: 42483@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 23 05:33:33 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyRzB-000AQ9-88 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Jul 2020 05:33:33 +0200 Original-Received: from localhost ([::1]:52262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyRz9-0002AF-Ca for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jul 2020 23:33:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyRyg-00029x-Fd for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 23:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jyRyg-0001XW-5Z for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 23:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jyRyg-0006yJ-1v for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 23:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jul 2020 03:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42483 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Reporting Original-Received: via spool by submit@debbugs.gnu.org id=B.159547515026748 (code B ref -1); Thu, 23 Jul 2020 03:33:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jul 2020 03:32:30 +0000 Original-Received: from localhost ([127.0.0.1]:43519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyRyA-0006xM-G0 for submit@debbugs.gnu.org; Wed, 22 Jul 2020 23:32:30 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:39706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyRy6-0006xD-VX for submit@debbugs.gnu.org; Wed, 22 Jul 2020 23:32:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyRy6-00027s-Kw for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 23:32:26 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:43089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyRy4-0001Ua-IC for bug-gnu-emacs@gnu.org; Wed, 22 Jul 2020 23:32:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595475141; bh=dzaAl8q3DvgRperr6ZiBZGnFja7AfAUolQzYEm6nsiU=; h=X-UI-Sender-Class:Date:From:To:Subject; b=SDnVfL1UhYYrSG0Hd6yxDaGFVcOxGuH7Yb1RNq5jj2TJL1HWzFY2YOBFtXKhGY4Ql WcYP2cvTd3XJJ8DuLFZrN4xvf3kPCtzvZhgZQg/zjc2Go7PiLm763EUDs2qudbV4rv eKz+EflQ1sUeEr1IcbHvamM6Hr06DQn1kaQHR/IY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MFKKh-1k0R7V47sf-00FmnR for ; Thu, 23 Jul 2020 05:32:21 +0200 Content-Disposition: inline X-Provags-ID: V03:K1:NbNePPgpAeYIIGd1Z3wAtwmqTwxWVA5eEUzOUipt1+e7ScXVKdg 7zwWh7CSEp4olSa87caPKgqlZP8KRIBnui2A+xiosNf20SxL8cX5H3aefdvr2WjhB9PNyD/ aYSGx1zqF32Ld4gqFQDovTcPJzoaRCxabj9yIp3PS3uirlx1lKKQwxHKTIRGVC3b3pVU/Xw JctOa4qf66KI7kZYmX/Pw== X-UI-Out-Filterresults: notjunk:1;V03:K0:40JmdtmhGP8=:R5gbwIwEmhPj3wx+aRoCmU 6jIp9IRBXAf6nH+42KhNS3oAw8V0M44u5sN71fltOp03WsNaPEQp5hzeG9P3WNaEb7N55eADw irfIKiPZcbzNGhAk/XaDjUgkAX6HgE58RjDvLOfWRdAbrFTagCcQOEyVx2d6/M5AKbS5MzQoP 231X7XyZ7quxpGynIVHsbMcx5khPF34mq7Tkr8l50PyBeBvDYyog4aaTxI8ZDviUUbNGXTC98 vOz4Fjmu7YAQzL4/mNFvorpgi4MrITgCcpHBFHAMMA50cwIZxVpO96ORP61KpAvmqdP82mDZW 5ZOrezfKNN7Qrc0ZKxL7zpcU6UpK+7WrpR/U0mbwuP4ok65AKofA2ER0r1E/Ygh24bdxzUM/l qlTwtr1Yk7ceEwrbe+zaRVHilRfWVIdDUJoYi9iqszfvmg7jB6ldc538WcDGZyHPF4XG+dA9K hASJ3dvM3gZTDTj1DPbl6QsC7EeK2goaEmcC1ZgeFb8aAUVRgGCK0XLOHfE49s7qOS3kiQnp0 XfW5pGRpdO6LhbZk1hum43Wa6rzD3e+rVPsMAOJKIcWzcrjjozJ1pYaFjFaFpoJREJ6WG5b1v t2hYvgGkMqHJ7s0Rnn3m8fCigl4xmzBePPghoRb+mekofE4kqKI/bLvp/58ZrSGVVw5EYKQuk +D62D4tcvI28WFKw2JkTS3wisJQBfe9iyLa8feknPIwVFbOx9FeSsYjUGY6JI+/Uyt3bmCo0x jOOurgNaA1cwLI6mjpnYKLj13YCqtpdjH+Os9L4il5JNDz4HAI2usyQ8RJkfGhinemq089fA Received-SPF: pass client-ip=212.227.15.18; envelope-from=boruch_baum@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 23:32:21 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:183395 Archived-At: One of the features of function `thing-at-point' is recognition of urls, so I expected it to be able to recognize org-link urls, but that isn't the case. Here's an example that when yanked into an org-mode buffer will display the underlined text 'SageMathCell', and when performing `C-c C-o' (M-x org-open-at-point) will correctly open the url link. However, `(thing-at-point 'url)' and `(thing-at-point-url-at-point)' evaluate to NIL. [[https://sagecell.sagemath.org/][SageMathCell]] I was expecting function `thing-at-point-url-at-point' to check if the mode was org-mode, and if so, to try something like the following (defun shamelessly-plagiarized-from-org-open-at-point () (interactive) (let* ((context (org-element-lineage (org-element-context) '(link) t)) (value (org-element-property :value context)) (type (org-element-property :type context)) (path (org-link-unescape (org-element-property :path context)))) (message (concat type ":" path)))) =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0