emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[LONG] Some thougths and a patch for the search menu-bar functions


From: Damien Terrier
Subject: [LONG] Some thougths and a patch for the search menu-bar functions
Date: Tue, 10 Sep 2002 01:42:03 -0700 (PDT)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]