From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Re: [External] : Re: [WIP PATCH] Controlling Isearch from the minibuffer Date: Thu, 13 May 2021 17:12:50 +0200 Message-ID: <87eeeazmz1.fsf@gmail.com> References: <87zgx5cz33.fsf@gmail.com> <878s4n4wn8.fsf@gmail.com> <87y2clve4m.fsf@gmail.com> <87fsyswiv1.fsf@gmail.com> <87lf8jppfi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25900"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Alan Mackenzie , Augusto Stoffel , Stefan Monnier , "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 13 17:13:59 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 1lhD2D-0006Y6-78 for ged-emacs-devel@m.gmane-mx.org; Thu, 13 May 2021 17:13:57 +0200 Original-Received: from localhost ([::1]:53654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhD2C-0002ev-9o for ged-emacs-devel@m.gmane-mx.org; Thu, 13 May 2021 11:13:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhD1N-0001xt-R8 for emacs-devel@gnu.org; Thu, 13 May 2021 11:13:05 -0400 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:39716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhD1L-0007N6-Sq for emacs-devel@gnu.org; Thu, 13 May 2021 11:13:05 -0400 Original-Received: by mail-ed1-x52e.google.com with SMTP id g14so31397175edy.6 for ; Thu, 13 May 2021 08:13:02 -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:content-transfer-encoding; bh=Z/6RtH2lIK0LwWviRPcg9VoVYN0hvAgcijW6Pv/QaXY=; b=FBG4zDwkh3g9B2NwqNnclFrWDUP6ir5gsSBaH8PpfMCPx84aj3W2wJsYYcX5Snczj9 ilCPSU4NAf/4Rvxcz9y1v/rU9eEIQh/Aw7wkmMaJojON5sjUowOlnKhLBcQWKtOigRmY RtXSlM8b6ffBvD4k7g1IxHl/FLCqm/qQUnYNXZR+TmjQ7mCkOyAjQmVcsncjZClB2Y2N OQsx95MvtTys+MR47drUx6QtTsoOC1Ylke4RgSKtK032OwxS/APqSGLKN2TOcl21Nb4o FMhcIlii9LipAYeSoTcmfdsGSVQorKk9PySk6ADgjPC3wlupJGaqi3c5tbpe6OQain11 vLEQ== 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:content-transfer-encoding; bh=Z/6RtH2lIK0LwWviRPcg9VoVYN0hvAgcijW6Pv/QaXY=; b=rquBSEy+90RTcRvv5FW7I7uGUzH2QE9VxfpH/L7NfdPiMWx6qZoEMDOQVK65EyLnrY 6DUcXt22RTZph4h0COxYKLb/j8aEn3aUtALYFYqdWPp8SK7T65CQlP6q0tLTfvxJ4bCq 1hDbY1IqNm6Np0ifN1Uu/izoX0l79zdjBeLn0BwPvOFLUmElSJdjjSxFX7AJsQN8UPqm edKN6GZzsmpM51maGvSUcxfYj2qIIdjwifETrSN9i4+Z3SFIlak2/AqgeArhTcY7xU82 eRg3MA4ncQlwcwir+ZFKnj0V2bA2Bc9RtFDVYYDu1l5QrycBeZASwqcfPrhsrOcZoZvP L2pQ== X-Gm-Message-State: AOAM5313y1jaSLR7EHpbiAP8AahpWWISnL2I00zvjpiY0W0y1DDptw3R pQPLG51EIg7tB+F9nsQ3yMSAjAvMbOc= X-Google-Smtp-Source: ABdhPJzS9/N8rrxVFpf0iAcQ3mt6ebiqYX6qpBRJHbOq7oj7Mk3DystVNtwVUALN8/Cq8FCL2sWBNw== X-Received: by 2002:aa7:cd4a:: with SMTP id v10mr44397751edw.239.1620918780519; Thu, 13 May 2021 08:13:00 -0700 (PDT) Original-Received: from hirondell ([109.190.253.16]) by smtp.gmail.com with ESMTPSA id z7sm2726159edi.39.2021.05.13.08.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 08:13:00 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=kevin.legouguec@gmail.com; helo=mail-ed1-x52e.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:269244 Archived-At: Drew Adams writes: >> While isearching, I regularly find myself reaching for regular >> navigation/editing commands (C-a, C-b, M-b, M-DEL=E2=80=A6 even C-x o, on >> occasion),=20 > > You "regularly" want to move within the search-pattern, > to do some editing of it besides at the end. Is that it? > > But in that case, what about `C-x o'? I'll admit that I struggle to see why I would have needed C-x o; I only have the faintest impression that once in a blue moon I've wanted to use it during a search. Moving to a piece of text I was too lazy to retype in order to kill it? Do some light editing to the buffer before resuming the search? Surely nothing that I couldn't do by interrupting the search, doing the thing, then C-s M-p (which=E2=80=A6 brings up a minibuffer, AFAICT? Which means all the usual navigation/editing commands are available). >> This thread made me discover M-e, > > Really? In that case, I suggest you first try using > that to do your editing, before asking that Isearch > be rewritten to be minibuffer-based. It's really not > a big deal to use `M-e', IMO. Sure; again, I didn't read the thread thoroughly, but my takeaway is that the overarching tone of the proposal is indeed "it's not a big deal to get used to isearch's idiosyncrasies, /but/ bolting an incremental search on top of the minibuffer would [insert motivation]". > How would you feel about what I described as existing > in isearch+.el: > > Customize `isearchp-initiate-edit-commands' to include > `beginning-of-line' (`C-a'), `backward-kill-word' > (`M-DEL'),...? > > It already includes `C-b', `M-b', `C-M-b', `', > C-', and `M-'. Your wish is half granted, > even by default. I described the proposal under discussion as "bolting an incremental search on top of the minibuffer"; my reading of your description of isearch+.el is "bolting regular editing/navigation keys on top of isearch". I don't think the distinction would matter much to me as a user, so I'd probably be satisfied with isearch+.el (barring the manual curating of isearchp-initiate-edit-commands). As a theoretical greenfield implementer though, I'd probably start from the existing minibuffer UI, since I'd get all the editing/navigation commands "for free". > Yes, to tell Emacs you're done editing the pattern in > a non-trivial way you need to hit `C-s'. Worth it, IMO. I assume you have made this case elsewhere and I regret not taking the time to dig it up, so apologies for making you repeat yourself: what inherent qualities does the current, non-minibuffer-based, implementation of isearch possess, that would be lost by using a minibuffer? Off the top of my head, I'd say "being able to exit a search and proceed with my business using any key that is not bound in isearch-mode-map"; e.g. I regularly C-s a heading in org-mode and enjoy being able to C-c C-x C-i (org-clock-in) without having to exit isearch first. I suspect that would be implementable as a user option whose semantics would be "if a key is neither self-inserting nor part of isearch-mode-map, exit the minibuffer and run that key's binding". I'm sure there are other reasons why the current implementation is preferable though, hence my question.