unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: Dmitry Gutov <dgutov@yandex.ru>,
	"James N. V. Cash" <james.cash@occasionallycogent.com>,
	Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Add option COUNT argument to text-property-search functions
Date: Sat, 31 Jul 2021 09:56:11 +0300	[thread overview]
Message-ID: <87mtq30y5w.fsf@protesilaos.com> (raw)
In-Reply-To: <94e8df7f-3293-87c1-2172-d979cefda28a@yandex.ru>

On 2021-07-31, 00:56 +0300, Dmitry Gutov <dgutov@yandex.ru> 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



  reply	other threads:[~2021-07-31  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 19:20 [PATCH] Add option COUNT argument to text-property-search functions James N V Cash
2021-07-30 19:51 ` Lars Ingebrigtsen
2021-07-30 19:55   ` James N. V. Cash
2021-07-30 21:56     ` Dmitry Gutov
2021-07-31  6:56       ` Protesilaos Stavrou [this message]
2021-07-31 11:36         ` Lars Ingebrigtsen
2021-07-30 19:59 ` Eli Zaretskii
2021-07-30 20:49   ` James Cash

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtq30y5w.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=james.cash@occasionallycogent.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).