From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UJ2OGqwnwmWPGgAA62LTzQ:P1 (envelope-from ) for ; Tue, 06 Feb 2024 13:35:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id UJ2OGqwnwmWPGgAA62LTzQ (envelope-from ) for ; Tue, 06 Feb 2024 13:35:56 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gTXlWDgG; dmarc=pass (policy=none) header.from=posteo.net; 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=1707222956; 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; bh=99RaY4hipwqPPbi3n2cdf/BtV2fgqXS6vBpdGGfHPdY=; b=QA6GpgBYqh0DoV6DUZQfN361a3YKJxhFCEkUem2T2kms+/HuEH4ZFtyvaZJBhlMdEcv2CS SqqSaOQKNEC88197qbKiHrn3qtZ3V2xVKF3m5n7iG2ObfoBURzU3yPLsU9ScxgmeQ+14CX g5HHaru1XVI8UhYiFOsfNWMfrxwn01t7KvcQuhaytuBCGFNaftFc7k5OaFP74Z/F5s/o96 ADr4P3mT4NPHZv+5R3QNbNvbLpI9as9iKKX3zM5quiAyAjSOR+VFOiK7pbC1Z4pRUnONpv aaq3ExW6kS+nJgAQlbPniz9MZzCWgXEcwIZ4HdMmOZk+PEpBxgcnWbgevl1FcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gTXlWDgG; dmarc=pass (policy=none) header.from=posteo.net; 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-Seal: i=1; s=key1; d=yhetil.org; t=1707222956; a=rsa-sha256; cv=none; b=o7Ifuxd5pvXyusGJzR97cB9KQakyX23WhCKzL+nSiSiN3QmRFdPH4md228vyzs6PDLNDUi DNHfwxakiyZDl9NprIbD8Left8b+DxTFKyLkm1JvJVJbxGDCuN5lLs3o8z8fv1m/2ItVkv i5q+tHPJGO8L3clQ7ysx/p1YuPGpMDgiv1SJcSn4kUWNvLG/es8JVUjtMofJG8n9Q/PT1Q EETqf+qEZSI+vFD0LMmh7+gVseBxQ1NvR79I9a7w/JkcR9sbpWPr2OGDqDgXT80PAEQuoM VD4J69ussNgyea+XljZSLpoELYDOIRnkvCB+YxSMW93XUqjBO1F0Min07ZkwQA== 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 36B5D64FEB for ; Tue, 6 Feb 2024 13:35:56 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXKfI-0007fr-II; Tue, 06 Feb 2024 07:35:04 -0500 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 1rXKfG-0007fO-CB for emacs-orgmode@gnu.org; Tue, 06 Feb 2024 07:35:02 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXKf6-0004l7-OI for emacs-orgmode@gnu.org; Tue, 06 Feb 2024 07:35:02 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9A794240029 for ; Tue, 6 Feb 2024 13:34:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707222890; bh=/geAc0xOyL63rynImMwEAC0bQ2Gi9wQlCpJINTQU/14=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=gTXlWDgGpiUUSr/yQWW2fITIWR28Ce626KTKxaih1XhbTKCIL9iWPNoN+yCBey9Jg ET0BRRhhxf9hzcuwGYBDKv27ait7UnL/Ao5BITAxCkQi331H0Xi7FBREFZ94+ZJb9T 36msAwEGxJy5B8l+FR7uGXxPQvuwhr+/KRsIakf9goYBtToeaDHOTm3XBE0s4nEW3y Wkey8Dhsb65ZYVd1LsL6PBGaK4EyOxivgvs405tbqcdSxjth8RIDF6GQ1b48M7jXpA ZKQFSQ2a9d+OLsJq1GiCahkBrHWqGV3pjHD6kvBp6kkdPM/2rl+nviGP6gGr1hR0Mb i8jt5qh5hhfHg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TTjPP3zr2z9rxM; Tue, 6 Feb 2024 13:34:49 +0100 (CET) From: Ihor Radchenko To: Eli Zaretskii Cc: jporterbugs@gmail.com, stefankangas@gmail.com, emacs-devel@gnu.org, emacs-orgmode@gnu.org Subject: Re: Adding custom providers for thingatpt.el (was: [PATCH] Add support for 'thing-at-point' to get URL at point) In-Reply-To: <864jel22ym.fsf@gnu.org> References: <87leba3ame.fsf@localhost> <88435424-afa3-d7a3-56ff-df9f0a2ca6ba@gmail.com> <875xz39cgp.fsf@localhost> <87mssebjwa.fsf@localhost> <864jel22ym.fsf@gnu.org> Date: Tue, 06 Feb 2024 12:38:19 +0000 Message-ID: <87mssdlqdg.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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.90 X-Spam-Score: -6.90 X-Migadu-Queue-Id: 36B5D64FEB X-Migadu-Scanner: mx12.migadu.com X-TUID: lpgGaqo6JVeU Eli Zaretskii writes: > I think we do want to allow extending of this, but doesn't > thingatpt.el already provide such capabilities? For example, I see > this in bounds-of-thing-at-point: > ... > (cond > ((get thing 'bounds-of-thing-at-point) <<<<<<<<<<<<<<<<<<<<<<<< > (funcall (get thing 'bounds-of-thing-at-point))) > > Doesn't this provide the extension capabilities you are looking for? > If not, why not? Unlike `thing-at-point-provider-alist', which can be buffer-local, symbol property is always global and setting it would override other thing providers. Note how `thing-at-point' uses (cond ((let ((alist thing-at-point-provider-alist) elt result) (while (and alist (null result)) (setq elt (car alist) alist (cdr alist)) (and (eq (car elt) thing) (setq result (funcall (cdr elt))))) result)) ((get thing 'thing-at-point) (funcall (get thing 'thing-at-point))) checking `thing-at-point-provider-alist' and only then falling back to `get'. What I am proposing is to add the equivalent alists for other operators used by thingatpt.el. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at