From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.devel Subject: Re: Simple isearch concerns Date: Sun, 02 May 2021 08:09:04 +0200 Message-ID: <87bl9tmzun.fsf@gmail.com> References: <20210403001539.x4rb55dvh46rmhb3.ref@Ergus> <20210403001539.x4rb55dvh46rmhb3@Ergus> <2599ffef-4f70-025c-5f9c-61b9ac94faf8@inventati.org> <87eefrbo9k.fsf@posteo.net> <7473b27b2b479f5686af@heytings.org> <87tuon9vf1.fsf@posteo.net> <20210403174508.xwr5uc36dzityitn@Ergus> <87wnsurdr7.fsf@gmail.com> <87fszij6to.fsf@mail.linkov.net> <87v98asulc.fsf@gmail.com> <87pmyimiwd.fsf@mail.linkov.net> <87bla11u5q.fsf@gmail.com> <87lf937hgk.fsf@mail.linkov.net> <87y2d1ksga.fsf@mail.linkov.net> <87r1it7zfw.fsf@gmail.com> <87v98466it.fsf@mail.linkov.net> <87bl9wcksv.fsf@gmail.com> <87tunnzqci.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16100"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: Philip Kaludercic , Gregory Heytings , Ergus , Manuel Uberti , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 02 08:11:08 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 1ld5Jr-00044Y-Ay for ged-emacs-devel@m.gmane-mx.org; Sun, 02 May 2021 08:11:07 +0200 Original-Received: from localhost ([::1]:41376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ld5Jq-0004A3-Dp for ged-emacs-devel@m.gmane-mx.org; Sun, 02 May 2021 02:11:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ld5Hy-0003AB-RA for emacs-devel@gnu.org; Sun, 02 May 2021 02:09:10 -0400 Original-Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:42794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ld5Hw-0004qv-QS for emacs-devel@gnu.org; Sun, 02 May 2021 02:09:10 -0400 Original-Received: by mail-ej1-x62d.google.com with SMTP id y7so3135561ejj.9 for ; Sat, 01 May 2021 23:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=biC4FqCsW48volkPYfTQ/Gk+gy8ekmift5RSs/aaiDA=; b=XA7UhLUdlCnEza2N/z044vZ54wDMUkQSy09tsbZbGNVKHsw49YS4QYJfvgGJDzYQK6 d5btDPH2y1eOlrLnDDu/ma1CahYfJ6toiXr3zZRda5cK+PXugVDYGJRriPOv0PwDp2fB XY9N6uk21o79aoZnYgIIMnp7l6zJIdRJbpOuOyFiqVsfQYt8X9YYuGFJwZN/gzACTANz 8NmSQ1f7BTtUiUQX5XU2kLwWL283dymj7fx7pUqhGRq8BVi0tXWUu7JerBLAXmd9+9dx 6JTy9YjobfpMPYZt/z6+qow3rTBEnOYn2XJzBLw7lZ3XKJyk+TQ+DmH63Kfki45n6dzr GvJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version; bh=biC4FqCsW48volkPYfTQ/Gk+gy8ekmift5RSs/aaiDA=; b=l7hwp6nEE9G4JpdYkKEuQiNw4Rpgh5Wgjv7M3gQJ8U0Ow2jR51kFkFGR4T60y+BDVt k134wAm6VebLiuZUvBd2YEFMY2wLPE1xV1UO1yZ10gy2CCmQUdY1y4fBakIDlU10TZ1i NkJ8ktpJigkLEfFml6elgqdnv2NiFEZCtxyif8UJFGL0RcaXW30bqaThcPCzH7CMMERP QA9zBWO3xnXfRTqiEqb4/007ibIOkF46B9zKh7kJh1L8UTs4ntXtDG9FJncO985a6SNU +WVn/WX+KiqbDeYZtNUucQX1418XGcYUg/JQB/0VRTXSN7usZTUuOAH3aNxhuPbsGpQ7 OauA== X-Gm-Message-State: AOAM532l+b5QoWqEAPIHizFYSkk/gRYA/RAOQHHGxWcKr0mEJgogDlEH XipzTNKunjgzvMt29c2VIoQ= X-Google-Smtp-Source: ABdhPJzOUMqKpZOKz46OG5i/Ys+xq8iwsyI7MMYWi6XlCEUqWaeu81M5t1IUmg9eipDl5QNuvPff0Q== X-Received: by 2002:a17:906:33cd:: with SMTP id w13mr115601eja.283.1619935746107; Sat, 01 May 2021 23:09:06 -0700 (PDT) Original-Received: from ars3 ([2a02:908:2211:8540::68a]) by smtp.gmail.com with ESMTPSA id t22sm8826771edw.29.2021.05.01.23.09.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 23:09:05 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x62d.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:268744 Archived-At: Hi Juri, I tested your patch a bit and it seem to work well. I have a few comments below. 1. Since you probably want to remove the ugly `with-isearch-suspended' eventually, the local mode will not only be on by default, it will be the only alternative. Should then `isearch-buffer-local' be double-dashed, so it too can be removed? 2. In edit mode, when I delete a character, the search doesn't backtrack to the barrier. It's the same undesirable behavior described in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46469. In isearch-mb, the post-command-hook contains (goto-char isearch-barrier) (setq isearch-adjusted t isearch-success t) for to fix that. 3. The after change hook should call `isearch-update' instead of `isearch-search-and-update' after `previous-history-element' and few other commands. In isearch-mb I use a symbol property to keep track of this. 4. Every time one types a character in the minibuffer, there is a visible flicker in the cursor. In isearch-mb I've let-bound `inhibit-redisplay' to t in a couple of places and it solved this problem. I wonder if there's a better solution. 5. The command `isearch-forward-exit-minibuffer' should eventually be removed, and instead `isearch-repeat-forward' should work in both cases (this will probably be implemented with the help of a new macro). The reason for this is that there is at least a dozen other Isearch commands that make sense in the minibuffer map as well (toggling modes, quitting and entering query-replace, and so on), and it would be annoying to write a minibuffer variant for each of them. 6. Why is there the option to specify an `isearch-new-message' in `with-isearch-suspended'? I've never seen any valid value other than `(mapconcat 'isearch-text-char-description isearch-string "")', which, by the way, repeats at several places in isearch.el On Fri, 30 Apr 2021 at 19:41, Juri Linkov wrote: > And here is a patch for updating the search from the minibuffer. This allows > to implement https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00447.html > to control the search from the minibuffer. But I'm not sure if the same option > isearch-buffer-local should enable this mode: I still don't understand why Isearch has to be so stringent about backward compatibility of key sequences. But I don't care about the edit mode per se. I only care about an alternative mode where `C-s' immediately goes to the minibuffer, and exiting the minibuffer ends the search.