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 ms8.migadu.com with LMTPS id IOH7G64lwmXHPgAA62LTzQ:P1 (envelope-from ) for ; Tue, 06 Feb 2024 13:27:26 +0100 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 IOH7G64lwmXHPgAA62LTzQ (envelope-from ) for ; Tue, 06 Feb 2024 13:27:26 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=F+V1SqNu; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707222446; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Pxcs63NifmJO7EVdveig1lQIRLAya3G969mnwMLMhOw=; b=BYgDZKwode991DsjxZkSELL/2D8Gr0idU1r44geDW05CvATPqrpyiLXMHSf+bgwjP5kKR8 RIJ3nKA+jClbdX7LeM3ml/jMZiqJBKy7JoXRE9QAaMH+t8rwKkox+l9Y6ppcUDlSWYYPB3 Dk9zqXd9JqLEJjRty5fZggy2mH5n9ZJxwfpTknDQo1C1QiyOLrjqoO+QZZqf6PDifMSSJX h85o4Y8sgVD99GBGp8ooJVsVIeFSvJRlpRqZ+JwhNnWdtwZvWT9a4mRQb/CVhoUe9QAVB7 ZAAJLdFG4+E30Fn0k9lC5AgqznILScEmDO+jDljA04qJXJPFyhLfXFvtVcMSnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=F+V1SqNu; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707222446; a=rsa-sha256; cv=none; b=h7qzEhthNm8nw454wP9vcBowuT9Sjv/8ISLINXfDx5O3YT2JhbMq7Js0frbXGYXn1omRUY /VH+Imf+ztJ40nqYuCvTu+IlQw5lRKr+tC2tTbyD2LiaVpml+kXU5Ca9bWin6f1LmvaY/c ZyzWxc0xgHCX9JnDurIuakdQsyDi/hIgOLbFdFP+RDaaws9MCHNwDOY2ad+WUAKVWSh2lI zOkNaLJ7AxbrIXksHhW1QY1Xu5dDLwTcNaz93jTP5D6nBQ2Pe4xv9BL8eojSXa+bfFX5tJ BlMniN7zKF6yxj1jowRGoW1uANRsWNupmphALp2oND+D6ESjmH8gYWJqh3xHUA== 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 156D839139 for ; Tue, 6 Feb 2024 13:27:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXKXI-0005cg-C9; Tue, 06 Feb 2024 07:26:48 -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 1rXKXG-0005cQ-0O; Tue, 06 Feb 2024 07:26:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXKXE-0002u7-ME; Tue, 06 Feb 2024 07:26:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Pxcs63NifmJO7EVdveig1lQIRLAya3G969mnwMLMhOw=; b=F+V1SqNuAHKI zuaxvPGs2VeMwp8LZMMd0XNQUDpfZeRFuREo3+0l0zmQGvgNF/xHzy5Q/Iww2jJ0T6CMZJwyIQhBL qOrZeGt4dDxZJBYnyA7derRw3O6PleVSz7cdB6jbhtWjmQ4XP0nC3BCWd+d/n8cptQn4mPydQQjCa yNqEVQvknINhdtRhzToFpM+fdSXdH2FrBmKIuGMkHzKfpn4+Byu1rh4FVBSLZM51mgiTqXACNSq+K 20+NiQMFbOp3ZBaTaWfSuDVX/djttG3WxIpNMyAJMOJnqtmnsg9WxUl1gTvqnIm2WRf5UsUBbuFEt lGvPNl/owOVo1cr/gemvEw==; Date: Tue, 06 Feb 2024 14:26:41 +0200 Message-Id: <864jel22ym.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko Cc: jporterbugs@gmail.com, stefankangas@gmail.com, emacs-devel@gnu.org, emacs-orgmode@gnu.org In-Reply-To: <87mssebjwa.fsf@localhost> (message from Ihor Radchenko on Mon, 05 Feb 2024 22:56:05 +0000) Subject: Re: Adding custom providers for thingatpt.el (was: [PATCH] Add support for 'thing-at-point' to get URL at point) References: <87leba3ame.fsf@localhost> <88435424-afa3-d7a3-56ff-df9f0a2ca6ba@gmail.com> <875xz39cgp.fsf@localhost> <87mssebjwa.fsf@localhost> 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: -8.41 X-Migadu-Queue-Id: 156D839139 X-Spam-Score: -8.41 X-Migadu-Scanner: mx11.migadu.com X-TUID: 2KazNHFSCs1F > From: Ihor Radchenko > Cc: emacs-devel@gnu.org, emacs-orgmode@gnu.org > Date: Mon, 05 Feb 2024 22:56:05 +0000 > > Jim Porter writes: > > > On 2/5/2024 7:07 AM, Ihor Radchenko wrote: > >> It would make sense to add a number of alists: > >> - bounds-of-thing-at-point-provider-alist > >> - same for 'forward-op, 'beginning-op, 'end-op. > >> > >> After Emacs have those, we can add Org mode support. > > > > That sounds reasonable enough to me; does anyone else have opinions on > > this? Otherwise, I'll get to work on a patch (though probably not for a > > couple weeks). > > CCing Stefan and Eli. > Please, let us know if the above is something not wanted upstream. 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: (defun bounds-of-thing-at-point (thing) "Determine the start and end buffer locations for the THING at point. THING should be a symbol specifying a type of syntactic entity. Possibilities include `symbol', `list', `sexp', `defun', `number', `filename', `url', `email', `uuid', `word', `sentence', `whitespace', `line', and `page'. See the file `thingatpt.el' for documentation on how to define a valid THING. Return a cons cell (START . END) giving the start and end positions of the thing found." (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?