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: Thu, 03 Mar 2022 19:39:55 +0100 Message-ID: <87ee3idgn8.fsf@gmail.com> References: <878s5tc0rn.fsf@mail.linkov.net> <87v8wvc7sc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3784"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: gregory@heytings.org, emacs-devel@gnu.org, spacibba@aol.com, juri@linkov.net To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 03 19:43:22 2022 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 1nPqQ6-0000o7-Jr for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Mar 2022 19:43:22 +0100 Original-Received: from localhost ([::1]:43086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPqQ2-0002NJ-92 for ged-emacs-devel@m.gmane-mx.org; Thu, 03 Mar 2022 13:43:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPqMp-0000oH-Qv for emacs-devel@gnu.org; Thu, 03 Mar 2022 13:40:00 -0500 Original-Received: from [2a00:1450:4864:20::634] (port=42753 helo=mail-ej1-x634.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPqMo-0008Tu-AK for emacs-devel@gnu.org; Thu, 03 Mar 2022 13:39:59 -0500 Original-Received: by mail-ej1-x634.google.com with SMTP id hw13so12524074ejc.9 for ; Thu, 03 Mar 2022 10:39:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=P+8PkIH3Qptr6Z6BZYSsksUt3qpjWXqV9gpZqkq9Nhk=; b=DUpryFsUwUHlt7s4RLxni5g07+3pV55BRhZl1p/O9oc4T3gcTL7ul/P9tCJDLW4d+D SWvxJF0wUIFuDzZh+P22ccH8xbsgXSo98m2bdj7ibi0xN9uNMjwtB0/2YeGJrbu9yPp1 GG9r4uwI4WnzVRBAI0g/kXHIuo8Irvb0W33KQlrXH07QUJbm20MNJ+Rm7BsnuKKvcTBx SFV+Eld0ifJ83PrIpP6kT1wr3EGGNMVelOD2tJxMTVQnJXiGUfYU8T7Np3yx3HC5Ai5L RP0DLhcQQdLcOyEm4//DHlCbeQCEd37hY9lkhCSsuhwZvg45s/jctWttUmnHzuXUsTjy aEyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=P+8PkIH3Qptr6Z6BZYSsksUt3qpjWXqV9gpZqkq9Nhk=; b=uw0wTzrZX6Nkj65VBu6SqlPsE3C9H0GlZB/uuYHBuIxLgnU+8PTAMxl3oqA5L/CaN5 3Je5QC/O5WueYCHt8Hu1vaP3yLmJ6eycrVOgZ6XCNwT32ltOHkFFno/YkrV3XYl97XJe ku3aNy3QbsnB2/oI8Qj7TSnRIu9tZcsEL53y+CyQnCEHil8pfuDoHnLSNHFrOddfTa7p attsn4dCyA/G4G0igdfDo3CDvtMJY2yxQmFgYLPfkrfNe8+vT5e2t3cE/19UCYZ3gMkr ZU+swSZ9l4umj6B0hsXUcxt7cwAIgQKrnpV43nYJ1UjaKABDvn1gruXpIlqctXechC/Z m2eQ== X-Gm-Message-State: AOAM532IgKckgHXnc3PxwE4P8sp27tUyPS7ZQ/pZTSTFsMgx+3iF81oB pDMm6XVyBBcIvPZD/BDUx8B+tH2LRmcayQ== X-Google-Smtp-Source: ABdhPJw5ZEy8a0hQCV9JeuNhAncYsL+G3mAYb59LKiGxgJtPips14qWUZ5Mg79DHzNtTXs/jQ1m1Cg== X-Received: by 2002:a17:906:3e90:b0:6b6:829b:577c with SMTP id a16-20020a1709063e9000b006b6829b577cmr29402390ejj.711.1646332796706; Thu, 03 Mar 2022 10:39:56 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::758e]) by smtp.gmail.com with ESMTPSA id qp3-20020a170907206300b006da96b87e9csm687171ejb.181.2022.03.03.10.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 10:39:56 -0800 (PST) In-Reply-To: (Alan Mackenzie's message of "Thu, 3 Mar 2022 17:50:00 +0000") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::634 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:286795 Archived-At: On Thu, 3 Mar 2022 at 17:50, Alan Mackenzie wrote: > Hello, Augusto. > > On Thu, Mar 03, 2022 at 17:36:35 +0100, Augusto Stoffel wrote: >> The non-quitting scroll commands in isearch are an extremely useful >> addition. But I looked at the implementation now and I'm finding it >> problematic. > >> At some point it was decided that instead of just defining >> 'isearch-scroll-up' and 'isearch-scroll-down commands', some >> pre-command-hook trickery would be used. Presumably this is so that an >> user option, 'isearch-allow-scroll', could be provided (that's what I >> gather from the parent message of this email). > > This is not quite how the history of this facility was. (I wrote the > original version back in 2003.) isearch-allow-scroll was at the centre > of the mechanism right from the beginning. The idea was that users > could use the same keys for scrolling whilst inside an isearch as in > ordinary editing. Commands like isearch-scroll-up never came into > consideration. Originally, the pre-command- and post-command- hooks > weren't used. They were implemented as a code clean-up some while later > (I think, by Juri Linkov). Sorry, I meant to say the `isearch-allow-motion' option, which is new in Emacs 28. >> you can't put the (nonexistent) isearch-scroll-up/down commands in a >> repeat map; you can't activate the feature selectively, e.g. so that >> scrolling doesn't quit isearch but beginning/end of buffer does; > > For this, you can just set the isearch-allow-scroll property to nil for > the commands you want to quit isearch. Is `isearch-allow-scroll' as a property documented at all? > I think there are around 20 commands which have the > isearch-allow-scroll (or scroll-command) property set. I have a few > more personal commands, bringing my total to around 30. Okay, I understand the reasons to have `isearch-allow-scroll, but only 4 commands have `isearch-motion', and two (beginning/end-of-buffer) are redundant (they already had isearch variants). So this new property (and code path in the pre command hook) was essentially introduced for the sake of 2 command (scroll up and down). If the idea here was to leave space for even more motion commands (C-a, C-n, etc.) to be made non quitting, then perhaps it makes sense. But this framework is so special that it's impossible for anyone who didn't read isearch.el to suppose it exists. Normally you would try to changes things via customization variables, key bindings, and advices, in that order...