From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs Subject: bug#44550: 28.0.50; proposal for tabulated-list-mode to provide narrowing incremental search Date: Tue, 10 Nov 2020 13:36:03 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40781"; mail-complaints-to="usenet@ciao.gmane.io" To: 44550@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 10 11:37:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kcR1T-000AW7-J0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Nov 2020 11:37:11 +0100 Original-Received: from localhost ([::1]:33636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcR1S-0003X2-J2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Nov 2020 05:37:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcR1K-0003Uw-Cl for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 05:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcR1K-0000Xv-0t for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 05:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kcR1J-00005m-Uq for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 05:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Nov 2020 10:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44550 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1605004603325 (code B ref -1); Tue, 10 Nov 2020 10:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Nov 2020 10:36:43 +0000 Original-Received: from localhost ([127.0.0.1]:36494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcR11-000056-2k for submit@debbugs.gnu.org; Tue, 10 Nov 2020 05:36:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:49552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcR0z-00004y-Li for submit@debbugs.gnu.org; Tue, 10 Nov 2020 05:36:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcR0z-00034M-D5 for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 05:36:41 -0500 Original-Received: from static.rcdrun.com ([95.85.24.50]:51097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcR0x-00006G-B5 for bug-gnu-emacs@gnu.org; Tue, 10 Nov 2020 05:36:40 -0500 Original-Received: from localhost ([::ffff:197.157.34.177]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C0006.000000005FAA6D16.000028A9; Tue, 10 Nov 2020 10:36:05 +0000 Received-SPF: pass client-ip=95.85.24.50; envelope-from=support1@rcdrun.com; helo=static.rcdrun.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/10 05:35:57 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192999 Archived-At: I have asked author if narrowing incremental search feature could be included in tabulated-list-mode. He asked me to file bug report for that proposal and I include last part of conversation here: * Chong Yidong [2020-11-10 10:25]: > Hi Jean Louis, > > > But now when you gave me references on how to filter the view then I > > can make function for my particular case myself to enter one or more > > words to filter by words. That is workaround, not real solution. > > ... > > In my opinion the above is enough for me. You said how / k filtering > > is implemented, even I used it but I forgot it. You reminded me, so > > now I can filter in similar way myself. > > > > If it happens that you decide to improve it, I have idea how you could > > do it: simply concatenating all tabulated items with space between and > > then using matching words on that list. > > Glad the interim solution can be done. > > I think the incremental typing functionality is best implemented as its > own minor mode. It should not be tied to tabulated-list-mode. > > This could be modelled after Emacs' completion functions. In > completion, you start typing and Emacs draws in information from the > buffer to try and complete what you have in the minibuffer. In the new > incremental processing mode, you start typing and Emacs alters the > buffer to reflect what's in the minibuffer. Similar to completion, it > would not be mode-specific, but different modes would be able to > customize the effects in a way that makes sense for that mode. > > Could you file a feature request in the Emacs bug tracker, or send an > email to emacs-devel to open a discussion? It's possible there's > already related functionality that I'm not current aware of, e.g. in an > external package. I will also Cc: this email to emacs-devel. In general I am advising that every application with choices offers among others the narrowing incremental search. Be it by invoking a key binding first or directly by simply typing. Because there are various key bindings in almost every mode it is better to start narrowing incremental seach when user press special key like / or something. To come out of narrowed list one could press other key binding and see the original list. In my program I am using (setq tabulated-list-entries entries) and it is common in tabulated-list-mode. So I guess it could be implemented as you said in a derived mode invoked by programmer or program where: - user press some key to start a real-time narrowing incremental search - program remembers the original `tabulated-list-entries' as ORIGINAL-DATA - program can concatenate parts of each entry into strings (or maybe use other method) during the incremental narrowing search - user starts typing and lines shown in tabulated-list-mode get narrowed to selected lines - program obtains the ID numbers and displays only those ID numbers by using (setq tabulated-list-entries NARROWED-DATA) and redisplays - use could press ENTER and narrowing incremental search stops at that point, user is facing new tabulated list and can handle it in usual manner. - user may press a key to go back to go to original `tabulated-list-entries' and program does (setq tabulated-list-entries ORIGINAL-DATA) and re-displays -- Thanks, Jean Louis ⎔ λ 🄯 𝍄 𝌡 𝌚