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, 29 Apr 2021 19:50:11 +0200 Message-ID: <87r1it7zfw.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31739"; 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 , Manuel Uberti , Ergus , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 29 19:51:17 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 1lcAon-00088z-4n for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Apr 2021 19:51:17 +0200 Original-Received: from localhost ([::1]:47272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcAom-0002bU-7k for ged-emacs-devel@m.gmane-mx.org; Thu, 29 Apr 2021 13:51:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcAnp-0001jt-6x for emacs-devel@gnu.org; Thu, 29 Apr 2021 13:50:17 -0400 Original-Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:37451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcAnn-00036E-BC for emacs-devel@gnu.org; Thu, 29 Apr 2021 13:50:16 -0400 Original-Received: by mail-ed1-x535.google.com with SMTP id s15so79652060edd.4 for ; Thu, 29 Apr 2021 10:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=TvwFGEv54VMKcM6dvygvTe4pRipVWLk7xKtAR+O73wQ=; b=f5H4+ShZUxwrfWvQoCEL6D0zW69FOT2Anb8Tt7xuiMTFtwhUmA56JXF/IPIra6c/ZB wrD5w66+y2GaqDddzoMJwiUMCeyx/RfhEHSD0txwvVrTyR5Z6EI81Kl6P6dN6v8IkrVc nT8YI8oS7PZn0piP/4DhYDLzUsXskG1+rm1K0viU1xrzmA89ghD/3PQCKRi+qWXbg6RW vO4YveyHMUD3FPUWIW9HU3lh7kSFBEqHXfxVcuYLk30S96CU57WaZr/nYlBYpD+/BSTF AcT9FCWj9IT8hHE3/xI0rP1FP5IukotS5CK8DeXaAQtIykf4e+OA3gGBVc7gVMr57uN8 m5RQ== 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:in-reply-to :message-id:user-agent:mime-version; bh=TvwFGEv54VMKcM6dvygvTe4pRipVWLk7xKtAR+O73wQ=; b=QZtXAAdy2Z9/8Be5pvLmZoV8VFtZ4h82PxkgF0oII9UTaNoQhQ5K1IR4XZJyJ5Md3B grmHu9V5uIRlXl8wdXNUVskBK0fEvH9ScE3ERkucx8HT8e0wgpGhaIZHqONwlC7dQy8e Lmm4aHYCioga6rgn/ZV6dSJL1UTTAiWU1PMaZXz1f1Wq93I7tF98pLXIavX8Jmajci0q NVQAD1Ju3yhWviomdjRfGx1ArDNjyiimLZf2sSTyAvv6XZ+kVmtxT/dapFNaF4s5dJLc 4YkhdJiF7ph7EtzrElXE4Kppum0H4Y4bKydegJeVd+HIB7DYWWE0wgN4VO7JfXfjA5qk njhQ== X-Gm-Message-State: AOAM531XVvin3lU77I0+gONoxyokFNnYN2d3gxAxf9JplAWvBnSjEVgF Ondu2HFfyLIR85aoXsnNzsQtWGWL3K3meQ== X-Google-Smtp-Source: ABdhPJwGQ7MNay5c6FR3WoptPue+xZIVntpFn4JZVGZmweIPu3XO+7bZdOCc4B2k4NZOww4+vNQnVQ== X-Received: by 2002:aa7:d6d9:: with SMTP id x25mr939423edr.305.1619718613543; Thu, 29 Apr 2021 10:50:13 -0700 (PDT) Original-Received: from ars3 ([2a02:908:2211:8540::68a]) by smtp.gmail.com with ESMTPSA id w6sm344742eje.107.2021.04.29.10.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 10:50:13 -0700 (PDT) In-Reply-To: <87y2d1ksga.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 29 Apr 2021 19:29:45 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x535.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:268630 Archived-At: On Thu, 29 Apr 2021 at 19:29, Juri Linkov wrote: >>> Is this overriding map there just so that `isearch-mode-map' takes >>> precedence over other minor mode maps? If so, couldn't this be achieved >>> by manipulating minor-mode-map-alist to put Isearch's map at the top? >>> Maybe that can be done buffer-locally. >> >> According to (info "(elisp) Searching Keymaps") the next keymap to try is >> `overriding-local-map`. It can be set buffer-locally. > > Actually, overriding-local-map can't be used, because it prioritizes > global-map over local maps, so e.g. in Dired typing C-o exits isearch > and calls open-line instead of dired-display-file. > > According to (info "(elisp) Searching Keymaps"), the next available keymap is > emulation-mode-map-alists. The following patch added a single line: > > (add-to-list 'emulation-mode-map-alists `((isearch-mode . ,isearch-mode-map))) > > then removed all mentions of overriding-terminal-local-map, > removed all 156 lines of the monstrous macro with-isearch-suspended, > added a single line to the end of isearch-edit-string: > > (isearch-search-and-update) > > and then M-e edits the search string without exiting isearch. And it's > trivial to use isearch commands without exiting the minibuffer with e.g. > > (with-minibuffer-selected-window (isearch-repeat-forward)) > > And everything works fine. It's too good to be true, > but I don't see where's the catch. > This seems promising, and actually not too different from the experiment I mentioned a few messages back: https://github.com/astoff/isearch-mb/ I've been using it for some time without problems.