From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Damien Terrier Newsgroups: gmane.emacs.devel Subject: [LONG] Some thougths and a patch for the search menu-bar functions Date: Tue, 10 Sep 2002 01:42:03 -0700 (PDT) Sender: emacs-devel-admin@gnu.org Message-ID: <20020910084203.80798.qmail@web11508.mail.yahoo.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031647498 13090 127.0.0.1 (10 Sep 2002 08:44:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2002 08:44:58 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17ogdk-0003Oz-00 for ; Tue, 10 Sep 2002 10:44:56 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17ohE5-00059H-00 for ; Tue, 10 Sep 2002 11:22:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17ogdm-0003HS-00; Tue, 10 Sep 2002 04:44:58 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17ogb5-0003Dm-00 for emacs-devel@gnu.org; Tue, 10 Sep 2002 04:42:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17ogaz-00037d-00 for emacs-devel@gnu.org; Tue, 10 Sep 2002 04:42:10 -0400 Original-Received: from web11508.mail.yahoo.com ([216.136.172.40]) by monty-python.gnu.org with smtp (Exim 4.10) id 17ogay-00037N-00 for emacs-devel@gnu.org; Tue, 10 Sep 2002 04:42:04 -0400 Original-Received: from [212.198.0.96] by web11508.mail.yahoo.com via HTTP; Tue, 10 Sep 2002 01:42:03 PDT Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7794 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7794 Hi, (sorry it's going to be a bit long -- about 110 lines. I want to be precise.) I'm currently writing a serie of six to seven tutorials for Emacs aimed at the new to average user. They are still on my hard drive and I don't have all the tutorials yet. The fourth tutorial is dedicated to the search functions in Emacs. Since I want to be understood by a new user I started writing that "in this article, we'll start by looking at the graphical menu provided. In the menu there is a basic search, you can do forward, backwards, with regexp or not " Most of them will not have an Emacs version with the new isearch menu, so I don't even talk about it. My article again : "But, Ladies and Gentlemen, there is a second search function, even better, very spectacular, very fun to use but you can only reach it with the keyboard. and in this great search function, you will be able to use the 'old' search with a weird key sequence". It's not very easy to understand. I would prefer a very clear menu with a nice layout.There are "only" sixteen search functions (incremental/regexp/repeat/direction/ -> 2^4) and every search function have a very precise meaning and a very precise task. There's must be a way to display them in a very clear menu. Then, I thought : "The menu-bar for for the search tools is only for the new user. The average to good user has to use the key sequences. The new user is learning so he loses time but he will save some later. It's the Emacs and the UNIX philosophy. So, if the menu-bar is just a bit slower for a search, but, in the same time, is much easier to understand, and affects in a good way the new user, then it's a win." I was stuck because put that way, a new search menu would never happened. So I decided to do it myself (I love making my own changes to a software). I never learned elisp and at first sight, it looks really awkward. So I did "C-h k" to see what was behind, managed to make my way inside the source, asked myself "What if I change this to that ?", I started cutting and pasting things over, made some new functions, etc. A few minutes later (a few hours actually), I had something that I liked. By the way, thinking in elisp is quite pleasant. After a few minutes^w hours, I enjoyed it just like PHP or Perl. The patch is 13K long. I wanted to join it to this mail, but it might be a bit too long and it's a bit boring (when rereading myself, I wonder if this mail is not already a bit too long and a bit boring :), so I made a small webpage located here (http://www.diabolus-ex-machina.com/emacs/menu-bar/index.html).This page has a link to the diff (http://www.diabolus-ex-machina.com/emacs/menu-bar/menu-bar.diff), a link to my last CVS file and a link to my menu-bar.el already patched. I also put four screenshots to show what I've done. Each of them is a PNG file and is about 15K. [half mail] Basically I did the following changes : First I changed "Incremental Search" to "Interactive Search" (in the display only). It won't change anything to the long Emacs' user but maybe the meaning of "Interactive" will have more sense than "Incremental" to the new user. In the source, I kept "incremental" and "isearch", it's only for the display that it's called "Interactive". Maybe the manual would have to change but a sentence like "For historical reasons, 'Incrementenal Search', was used before 'Interactive Search'. The old term is used in the manual. But it's really the same thing.". Or "Incremental" could stay. Anyway, it's not very long to change. I also renamed the old "Search" to "Non Interactive Search" because this way a new user understand why there are two search functions in Emacs and what are their real difference. The most significant change was in the organisation of the search functions. Four items in the last sub-menu is enough and it is much easier to click on the right one. That's what I don't like in the old menu, it starts to be a bit populated. Then, I divided in two and then, in two again. That's why the new version asks "Interactive Search or Non Interactive Search ?", then "forward or backwards ?" then, the choice for one of four item "Search/Repeat Search // Search Regepx/Repeat Search Regexp". It very consistent between "Interactive Search" and "Non Interactive search". There are eight new functions (for my version, only six for the last CVS version) in the same menu and it doesn't take a lot more space. The new user also has a chance to quickly understand very precisely the true differences between all the sixteen different search functions. The old "Replace" and "Tagged files" are still there at the same level than "Interactive/ Non Interactive". The menu entry for search is called "Search and Replace" because anyone now expects to find the search functions "near" the replace functions. It was already the case with my Emacs's version except that the "search and replace area" was just called "Search...". I think that's it for the menu-bar changes. I would like to add I'm a student in (French) linguistics. That's why I may seems picky "just about" computer language (I also love problems involving HIC). I don't know if you will accept my patch, and I have no idea of the Emacs GUI policy (where I can find it ?). it's not some very big programming, its long and boring, but it works and I think the the new search menu is really better than the old one. I noticed that you had added I-search in the menu bar since the release date of my Emacs' version (21.1.1 I think). My patch is made with the last CVS version. I looked at the new menu, I still prefer mine: it is easier to understand and is much more complete. I clearly understand you may not want the accept this patch because of my crappy patch (I just don't know elisp) or because of something I may not know. Coming back to my tutorials I've almost finished the search one and I wrote "I really wish Emacs had a more convenient way to use with the mouse the search facilities". Instead, I would looove writing to the readers : "I sent a mail to the Emacs developing team, they replied 'the search tools in the menu-bar would change'". So, could you check my patch and, _please_, update Emacs to reflect what I want to write? ;) Ok, now you know everything relevant to that patch. I hope this wasn't too long, I hope you didn't waste your time. I tried to make something entertaining and interesting, but English is not my mother tongue, and I just described something that is finally only just basic hacking. Thank you for reading me. Damien Terrier __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute