From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39512: 28.0.50; Add command isearch-yank-region Date: Thu, 15 Apr 2021 23:52:03 +0300 Message-ID: <8735vrgx8p.fsf@linkov.net> References: <87eev52bw6.fsf@calancha-pc.dy.bbexcite.jp> <877e0wiosp.fsf@mail.linkov.net> <87v9hst5wv.fsf@gnus.org> <87mu33zchk.fsf@mail.linkov.net> <20200810011954.ro4utplq3ohpob2d@Ergus> <87v9hqjb27.fsf@mail.linkov.net> <20200811011246.bcciofvpzjtuy3jb@Ergus> <87k0y4n5dk.fsf@mail.linkov.net> <20200812174125.gicbgyrz7nhsdjsi@Ergus> <87h7t7ieqe.fsf@mail.linkov.net> <20200813031420.7vq5bz7loeqiuntx@Ergus> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30361"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Tino Calancha , npostavs@gmail.com, 39512@debbugs.gnu.org, contovob@tcd.ie, Lars Ingebrigtsen To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 15 23:03:12 2021 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 1lX98n-0007mI-RB for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Apr 2021 23:03:09 +0200 Original-Received: from localhost ([::1]:47438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lX98m-0007Xj-PP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Apr 2021 17:03:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX98g-0007Xb-8n for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 17:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lX98g-0005N9-1G for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 17:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lX98f-00022O-Ti for bug-gnu-emacs@gnu.org; Thu, 15 Apr 2021 17:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Apr 2021 21:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39512 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39512-submit@debbugs.gnu.org id=B39512.16185205487792 (code B ref 39512); Thu, 15 Apr 2021 21:03:01 +0000 Original-Received: (at 39512) by debbugs.gnu.org; 15 Apr 2021 21:02:28 +0000 Original-Received: from localhost ([127.0.0.1]:39347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX988-00021b-Dn for submit@debbugs.gnu.org; Thu, 15 Apr 2021 17:02:28 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:43999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX986-00021O-5H for 39512@debbugs.gnu.org; Thu, 15 Apr 2021 17:02:28 -0400 X-Originating-IP: 91.129.111.204 Original-Received: from mail.gandi.net (m91-129-111-204.cust.tele2.ee [91.129.111.204]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 674C920003; Thu, 15 Apr 2021 21:02:16 +0000 (UTC) In-Reply-To: <20200813031420.7vq5bz7loeqiuntx@Ergus> (Ergus's message of "Thu, 13 Aug 2020 05:14:20 +0200") 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:204099 Archived-At: > So without any other alternative, `M-s M-.` will be good enough. In > general it would be better (for consistency) if we "reserve" `M-.` > "suffixes" for future thing-at-point-or-region commands right? > >> In the previous message you sent a link to `ivy-thing-at-point` that >> also uses (thing-at-point 'url) and also tries to get a filename at point. >> Do you think `thing-at-point-or-region` should do the same? > > With the interactive experience in mind I think this could make sense as > it does in `ivy-thing-at-point`. > > In my opinion from the api point of view, the important modification > could be the method to know the "kind the thing" detected after calling > the function (region, word, symbol, url) but also a function to get the > bounds instead of the text (like bounds-of-thing-at-point-or-region). I continued trying to do what you suggested some time ago and immediately stumbled upon a question what "thing" to use by default as an argument of '(thing-at-point thing)'? Trying these priorities: (or (thing-at-point 'region) (thing-at-point 'url) ;; (thing-at-point 'filename) ;; (thing-at-point 'list) (thing-at-point 'symbol)) has several problems: 1. There is no such "thing" as 'region'. Maybe could be added to thingatpt.el? 2. 'url' returns nil when there is no url at point, good. But 'filename' returns non-nil on any string, not only on real filenames. 3. It would be nice to use (thing-at-point 'list) only when point is on the open/close parens. This is how double-clicking by mouse selects the thing at point of mouse click. When clicked on a paren, the whole list is selected by 'mouse-start-end'. 'isearch-forward-thing-at-point' could be the same logic.