From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Simple isearch concerns Date: Fri, 09 Apr 2021 11:48:36 +0000 Message-ID: <940751cee594ef1cf8a4@heytings.org> References: <20210403001539.x4rb55dvh46rmhb3.ref@Ergus> <20210403001539.x4rb55dvh46rmhb3@Ergus> <878s5wmsjp.fsf@mail.linkov.net> <87mtubz4ls.fsf@mail.linkov.net> <8735w22s9b.fsf@mail.linkov.net> <3ec7e2e58a3733a48ae9@heytings.org> <878s5tc0rn.fsf@mail.linkov.net> <3ec7e2e58a49d4f0ec99@heytings.org> <878s5t9p1i.fsf@mail.linkov.net> <9ff81b52fad2911cc740@heytings.org> <87im4w1tgw.fsf@mail.linkov.net> <9ff81b52fa878cb35a86@heytings.org> <87pmz4zgn5.fsf@mail.linkov.net> <83eefk802u.fsf@gnu.org> <871rbjdea4.fsf@mail.linkov.net> <8335vz91en.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3538"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, emacs-devel@gnu.org, Juri Linkov To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 09 13:53:07 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 1lUphC-0000n6-IQ for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Apr 2021 13:53:06 +0200 Original-Received: from localhost ([::1]:49430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUphB-0002Ju-LA for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Apr 2021 07:53:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUpcu-0000WS-Tv for emacs-devel@gnu.org; Fri, 09 Apr 2021 07:48:40 -0400 Original-Received: from heytings.org ([95.142.160.155]:35288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUpcs-00074E-QB; Fri, 09 Apr 2021 07:48:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1617968916; bh=NiCte45lwIVm9tiq8Q1iDnWXluQvKrnV0XwhfnlQ1C8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=hBeysXfR+HezYEU0HJ7GOGuOGx45xkGihL1rp/ABEHi3zjVYSs8N+ks95QQEGKFjH 076FGvSsD4ajmJWuEiqWnVyUQ+jA3m6LalqYfYiP/r8jCmKgnZtDi4X1FVs78a0AUr ReSTKtUjDdg6a73vNcB5bc5uaG5IIujN7rx9J9nLP3EZUmeregA4HGGqzHL2hVFFwP W3gNYvjjQc7+PYcnzjbYC7H7Sw/jJ39i0pncEbP9Gw64wC/tOCCeZmaECB5d1ejnRt hZPs24mDJGa/1k59limL2YLATqoxa6ptvwAAowt7gVuEbpQrSg33GWuCHoOlMg83b7 2xp0SShSlO96g== In-Reply-To: <8335vz91en.fsf@gnu.org> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-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:267709 Archived-At: >>>> isearch-beginning-of-buffer changes the direction to 'forward' >>>> because it makes no sense to keep it 'backward' - there are no >>>> matches before the first match. >>> >>> Are you excluding the wrapped-isearch use case? >> >> I replied to Gregory about this use case that it's less useful than to >> get ready to go forward with the next C-s. > > That might be your personal opinion, but it doesn't have to be everyone > else's. > I don't understand what the point is here. If isearch-beginning-of-buffer is called, point moves to BOB, and isearch is restarted forward, which jumps to the first match. That's what the docstring says: "Go to the first occurrence of the current search string." That doesn't mean that wrapping isn't possible anymore, C-r C-r C-r (or just C-r C-r with isearch-wrap-pause 'no) works as usual. If you do not change the search direction after moving to BOB, the result is not what you would expect. For example, after C-r: - with isearch-wrap-pause t, M-< tells you "failing I-search backward" even if there are in fact occurrences of the search string between point and BOB, and a second M-< will jump to the last occurrence in the buffer; - with isearch-wrap-pause 'no, M-< jumps immediate to the last occurrence in the buffer.