From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add option COUNT argument to text-property-search functions Date: Sat, 31 Jul 2021 09:56:11 +0300 Message-ID: <87mtq30y5w.fsf@protesilaos.com> References: <87im0rlias.fsf@gmail.com> <87fsvvk2bw.fsf@gnus.org> <87fsvvlgop.fsf@gmail.com> <94e8df7f-3293-87c1-2172-d979cefda28a@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36655"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Notmuch/0.32.2 (https://notmuchmail.org) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: emacs-devel@gnu.org To: Dmitry Gutov , "James N. V. Cash" , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 31 08:56:53 2021 Return-path: Envelope-to: ged-emacs-devel@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 1m9ivV-0009Kd-IS for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Jul 2021 08:56:53 +0200 Original-Received: from localhost ([::1]:45552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9ivT-0004jk-8k for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Jul 2021 02:56:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9iuz-00043v-1X for emacs-devel@gnu.org; Sat, 31 Jul 2021 02:56:21 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:52289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9iux-0008A2-2y for emacs-devel@gnu.org; Sat, 31 Jul 2021 02:56:20 -0400 Original-Received: (Authenticated sender: public@protesilaos.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 45245FF807; Sat, 31 Jul 2021 06:56:12 +0000 (UTC) In-Reply-To: <94e8df7f-3293-87c1-2172-d979cefda28a@yandex.ru> Received-SPF: none client-ip=217.70.183.199; envelope-from=info@protesilaos.com; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271888 Archived-At: On 2021-07-31, 00:56 +0300, Dmitry Gutov wrote: > On 30.07.2021 22:55, James N. V. Cash wrote: >> Hah, fair enough! I was discussing something with Protesilaos previously >> that would've been made easier by having this support a count (versus >> wrapping it in a dotimes), but I certainly can see why you'd want >> to avoid adding yet another optional argument. > > Could you describe that usage scenario here The idea is to have a command that moves point. So it could accept a numeric argument to go to the COUNTth match, like 're-search-forward'. This came about while experimenting with the new group headings in the Completions' buffer, where we would like to jump between different groups of matches in one go (see faces 'completions-group-title', 'completions-group-separator'). I don't have a ready-made recipe for you on 'emacs -Q', as I am not sure what built-in command makes use of those group headings. Though I can try to prepare one if you need it. -- Protesilaos Stavrou https://protesilaos.com