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: Some further ideas for Isearch Date: Mon, 26 Apr 2021 07:32:27 +0200 Message-ID: <87czuh1uhg.fsf@gmail.com> References: <87pmyisrlw.fsf@gmail.com> <87h7jul2va.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="36857"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 26 13:27:27 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 1lazOg-0009H9-48 for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Apr 2021 13:27:26 +0200 Original-Received: from localhost ([::1]:36256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lazOf-0000tL-6Y for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Apr 2021 07:27:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1latrF-0005s6-5e for emacs-devel@gnu.org; Mon, 26 Apr 2021 01:32:33 -0400 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:40577) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1latrD-0006uN-Ds for emacs-devel@gnu.org; Mon, 26 Apr 2021 01:32:32 -0400 Original-Received: by mail-ej1-x62e.google.com with SMTP id n2so82503592ejy.7 for ; Sun, 25 Apr 2021 22:32:30 -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=I+keQQKoamqNn9V8OpOdycZ7DQ/hvEateDfIyQrFe6M=; b=m7ScvcEDDvp5FuM1YLqdzVDmQlcmOArC2R07CLSvlRxQaXcmfclpLGyXDDGznZXOxd hWLe90q1IpvPFTeApNJCIoa4eMPI+FWtpRKjHOeVzGvfBHvjySpG9V5HVDDhZjYvwadE FaeWnMBmOCmOJpZOi07PAQmSy4ErGTq3iz8g8/iumFsnamnbdpIc5dy/dATpJh1aVt/d WrKY3SOKkVHDJiO+/uwZJ+9M+ziWpjE9CBKgyegrK5ngATori96ab7SWCo7BeWFmROzf m5AT1VdZMEBKkf73XnmB+X450p9Q44csP3IAs40m/4sdQudDHgt87dar3ekwkB4o5mca SoPg== 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=I+keQQKoamqNn9V8OpOdycZ7DQ/hvEateDfIyQrFe6M=; b=CYhK++TmuPRdmkEJEANTBcQ2dg9LgUF3iAPMqiuVnN80yM0hSJHokxBcHZBHrVumcL dN04lx0suYh/SZ9Kbl0MY3D4ZrE14nyhF1zdGxsvu9gRvsXjwIFTCQ7wMh6DCnnlW2qi xZvESUI/z+7QsGWoj3QyzmTc65nglqdn27NyEm6EOkf8uWaY+Xpw0J5PZHnkzIr4xUk5 eUrOfLCafdWC2Z9yn6CMQp+qPpWePbSiiSlYZWHbd0hR57lBqcaN4vKhK1Bag5gZ3qEF 4VeqtLKL6OK+vaUhGmIuyyCI33W7LhyoC+71kdg4oKk8ymRy4s0RKIv3f6AxSmKIWd5P 0Orw== X-Gm-Message-State: AOAM531s2Uor+SQYngoeovyPkyXarpAO0cVqpYrXaqDJWvr3HXdBPOYy u8/zncDU/pDhTsHBaURJ2MuPYbk6DzI= X-Google-Smtp-Source: ABdhPJwHJD8dcta3HHu8u3YdYOjHGR9WrsWxyRaofarc5eIYrlJNwGRaFy5wkaOYkbji6Zbig39MRg== X-Received: by 2002:a17:906:7206:: with SMTP id m6mr16788038ejk.281.1619415149447; Sun, 25 Apr 2021 22:32:29 -0700 (PDT) Original-Received: from ars3 ([2a02:908:2211:8540::68a]) by smtp.gmail.com with ESMTPSA id p18sm5422810ejb.19.2021.04.25.22.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Apr 2021 22:32:28 -0700 (PDT) In-Reply-To: <87h7jul2va.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 25 Apr 2021 20:36:25 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=arstoffel@gmail.com; helo=mail-ej1-x62e.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-Mailman-Approved-At: Mon, 26 Apr 2021 07:25:27 -0400 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:268452 Archived-At: On Sun, 25 Apr 2021 at 20:36, Juri Linkov wrote: >> Here are some further ideas for Isearch, partially inspired by the >> alternative buffer search packages out there: > > Thanks for more ideas that hopefully will find a path to isearch. > >> Future history >> -------------- >> >> Pressing `C-s M-n M-n ...' could present a few useful search >> candidates, controlled for instance by the >> `isearch-forward-thing-at-point' variable. This would be more >> flexible and more mnemonic than the recently introduced >> `isearch-forward-thing-at-point' command. > > The problem is that the isearch history is a ring, > so maybe the users already expect that typing 'C-s M-n' > should get the top element of the isearch ring. > > This is what 'M-n' bound to 'isearch-ring-advance' currently does > to search for the next item in the search ring. But the top element is the oldest, the next one to be forgotten, right? Why would this be remotely as interesting than first seeing the region, word, symbol, sexp at point? Speaking of the search ring(s): Now that the search mode is saved as properties in the history elements, can we get rid of separate histories for regexp and regular searches? I see at least two reasons for this: - If you use regexp search by default, it's very annoying to resume a previous symbol-at-point search. - Given one regexp and one literal history item, you can't know which is oldest. Now, of course you are going to say this needs to be a defcustom, so I'm already going to ask: can it be on by default? > >> Resume canceled searches >> ------------------------ >> >> `C-s C-s' recovers the last history element, so it's more or less >> equivalent to `C-s M-p'. It would be nice to have the ability to >> resume a canceled search, i.e., make `C-s C-s' look into >> `isearch-cmds' instead. > > This feature was proposed in https://debbugs.gnu.org/11378#71 Should be easy to do. But please, let's let `C-s C-s' resume the last search, period, not the last search of the same mode as `C-s' normally does.