From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +FYVHh76l2bI1gAA62LTzQ:P1 (envelope-from ) for ; Wed, 17 Jul 2024 17:06:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id +FYVHh76l2bI1gAA62LTzQ (envelope-from ) for ; Wed, 17 Jul 2024 19:06:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=red-bean.com header.s=202005newsp header.b=lWie5hs3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=red-bean.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721235998; h=from:from:sender:sender:reply-to: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; bh=puKl6cdnPNpQJdcoVGC1WiinTg+R9EQPMrDE05rX3o8=; b=ZiFXIvsm3AzVFd+IWzOAYUAMJUNSr8lsTtkd+Qoi1UYud3+DUZlL1CzJte4Or1bth2IjP6 kaXxHiR3kOpYzraXOudPNbfS8S96V8nuGHIEJ0n9DiU/oO8DP0khf7adJ2nhbtwCv8H3ey uPQVul4Ppm4XZKtKHawV6HpO/vmOrFY1UkZsqwD73MCC3L+xrj4R3RgDN1pgUfNVPR5gXi JTwAI67hT8aC8BktuOgHndKPGPc9JDrd48Zbw1G5u1LFYZnsLBnxbhCrfK77bZl6jI1T/F UeJVmeghFlMIBSqfwll/DIyBD9z6Ra3QJplprmTBpppxZoZTGwrluw5bLHlVig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721235998; a=rsa-sha256; cv=none; b=vBe+YpLZj1hPfcP0x2tGCxOd0R2PpHGXb11gjMq4Lt8Lrab3sOL5l0iTeF+UMELFjISPUS bTnI5vScQnO7FEj9xzKGhgKtxRWU1ZaLCedkMgywyLsuW2IakC4K6J7lhrQF0aaphlMdHE 4ato89ZsZwji3EU9zjgKAuZ1sHJIrJYBAIwQSrxQQ984PUUM1bgWdpo3p5SmubQQ6Docfk Klu05mhLf1KUhD2arH1wBH2OeJw5rX95CAeiUICOf7vJw/k6byiGbijmTlQFrb9Y7eLTJ8 ux/RnX8yFlHHyMUszONlyL+xgcu1wXYzhVmnRUzlHCObGJz+gbwNxjg964hzGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=red-bean.com header.s=202005newsp header.b=lWie5hs3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=red-bean.com (policy=none); 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" 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 AC7F43C20F for ; Wed, 17 Jul 2024 19:06:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU865-0007q3-QD; Wed, 17 Jul 2024 13:05:45 -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 1sU862-0007pe-Uh for emacs-orgmode@gnu.org; Wed, 17 Jul 2024 13:05:43 -0400 Received: from sanpietro.red-bean.com ([45.79.25.59]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sU860-0000pq-8x for emacs-orgmode@gnu.org; Wed, 17 Jul 2024 13:05:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID:Date: Reply-To:References:In-Reply-To:Subject:Cc:To:From:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=puKl6cdnPNpQJdcoVGC1WiinTg+R9EQPMrDE05rX3o8=; t=1721235939; x=1722445539; b=lWie5hs3Y8vpPgxsniDCXxOxbWo5ZdxeRCv8J31Ju3J363+iDrn9ZA9QRjF2IiOxYRmREL9G1+4 85TFUl2hWEO/+TLCCDezyWBE2rbDd/Bh6YOY6ldIwcsaLO1f+Rkhwd6xlmlIwH4cUuv5+hIBwucsf HmYP21xFz8xaPqAXEGFYF0H6KRtVVaF4gW20KqUZYUzHJjmfKP2n6dJ8muN+FbujCrdhVtxNE1T4j f3mpgDkBDmc7FV4hk/xre83z2+xoF23/Z4CvnZnlOJh3rIoPpI6iqFXgEdNuhVYdF9JTrHCOmMydg 8xnfOapwf3EZftJ48ezC6cclw6dYIZ3E6rAA==; Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:51706 helo=floss) by sanpietro.red-bean.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sU85w-002gZS-1P; Wed, 17 Jul 2024 17:05:37 +0000 From: Karl Fogel To: Ihor Radchenko Cc: Org Mode Subject: Re: Possible bug getting bounds of URL at point? In-Reply-To: <87cync6q4g.fsf@localhost> (Ihor Radchenko's message of "Wed, 17 Jul 2024 14:37:51 +0000") References: <87h6cp9jyc.fsf@red-bean.com> <875xt5cclk.fsf@localhost> <875xt59iuq.fsf@red-bean.com> <87cync6q4g.fsf@localhost> Date: Wed, 17 Jul 2024 12:05:36 -0500 Message-ID: <87wmlk9cf3.fsf@red-bean.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=45.79.25.59; envelope-from=kfogel@red-bean.com; helo=sanpietro.red-bean.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, SPF_HELO_PASS=-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: , Reply-To: Karl Fogel 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: -1.31 X-Spam-Score: -1.31 X-Migadu-Queue-Id: AC7F43C20F X-Migadu-Scanner: mx11.migadu.com X-TUID: Q982vA+yuQN9 On 17 Jul 2024, Ihor Radchenko wrote: >The notion of "URL", and especially "URL at point" in Org mode >needs to >be special. Consider something like > >[[https://orgmode.org][this is a very long and /convoluted/ >description of this url; all the text here is clickable as a >link]]. > >Org mode will consider point anywhere inside the link as "at >URL". >That "URL" will be https://orgmode.org, and it is indeed what >(thing-at-point 'url) will return on that link in Org mode, even >when >point is on the link description. >Hope it makes sense. > >What does not make sense in such scenario is returning >(bounds-of-thing-at-point 'url) to not include point. So, we >instead >return the relevant syntax object - link object. And that object >includes description, brackets, and whitespace after. > >There is no reason to make plain links special in this regard, so >we >don't. Thank you for the explanation, Ihor. I'm sure there are people depending on the fact that the rest of the line, after a plain link, is still part of the same node. My code does a manipulation of just the link itself -- for example, in one keystroke, it turns https://example.org/ into [[https://example.org/][example.org]] In order for that to work, I needed the bounds to be the start and end of the link text itself. But that was easy to do: I just temporarily override `bounds-of-thing-at-point-provider-alist' in Org Mode, so that I get the default thingatpt handler instead. So: problem solved. Best regards, -Karl