unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* problems with easy-menu-add on --without-x emacs
@ 2004-04-10  3:20 Miles Bader
  2004-04-10 15:33 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Miles Bader @ 2004-04-10  3:20 UTC (permalink / raw)


I notice several cases where things fail on an emacs compiled without X
support, because they call `easy-menu-add', and it calls `x-popup-menu'
which isn't defined when X support is disabled.  I don't recall such
failures the last time I tried to make a no-X emacs, so maybe something
has changed recently.

Specifically:

  (1) If I try to compose mail with `mail-user-agent' set to
      message-user-agent, I get the following backtrace:

        Debugger entered--Lisp error: (void-function x-popup-menu)
          x-popup-menu(nil (keymap "Message" (sort\ headers menu-item "Sort ...
          easy-menu-add((keymap "Message" (sort\ headers menu-item "Sort He ...
          message-mode()
          message-pop-to-buffer("*mail*")
          message-mail(nil nil nil nil nil nil nil)
          compose-mail(nil nil nil nil)
        * call-interactively(compose-mail)

      I'd think `easy-menu-add' should work regardless of X or no X,
      but it indeed calls x-popup-menu.

  (2) _Compiling_ `progmodes/ada-prj.el' fails, because it does (require
      'ada-mode), and progmodes/ada-mode.el contains a top-level call to

         (ada-create-menu)

      and `ada-create-menu' calls easy-menu-add.

Oddly, `easy-menu-add' contains the comment that "This is a nop on
emacs", but obviously it isn't!

Thanks,

-Miles
-- 
Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-10  3:20 problems with easy-menu-add on --without-x emacs Miles Bader
@ 2004-04-10 15:33 ` Stefan Monnier
  2004-04-12  3:52   ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2004-04-10 15:33 UTC (permalink / raw)
  Cc: emacs-devel

> I notice several cases where things fail on an emacs compiled without X
> support, because they call `easy-menu-add', and it calls `x-popup-menu'
> which isn't defined when X support is disabled.  I don't recall such
> failures the last time I tried to make a no-X emacs, so maybe something
> has changed recently.

I've just removed the unnecessary call to x-popup-menu yesterday, as
a matter of fact, so things should work again.


        Stefan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-10 15:33 ` Stefan Monnier
@ 2004-04-12  3:52   ` Richard Stallman
  2004-04-12  4:41     ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2004-04-12  3:52 UTC (permalink / raw)
  Cc: emacs-devel, miles

    > I notice several cases where things fail on an emacs compiled without X
    > support, because they call `easy-menu-add', and it calls `x-popup-menu'
    > which isn't defined when X support is disabled.  I don't recall such
    > failures the last time I tried to make a no-X emacs, so maybe something
    > has changed recently.

    I've just removed the unnecessary call to x-popup-menu yesterday, as
    a matter of fact, so things should work again.

The call to x-popup-menu was intended to precompute info cached in the
menu, so that the menu would display more quickly.

Why do you think it was unnecessary?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-12  3:52   ` Richard Stallman
@ 2004-04-12  4:41     ` Stefan Monnier
  2004-04-13 17:44       ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2004-04-12  4:41 UTC (permalink / raw)
  Cc: emacs-devel, miles

>> I notice several cases where things fail on an emacs compiled without X
>> support, because they call `easy-menu-add', and it calls `x-popup-menu'
>> which isn't defined when X support is disabled.  I don't recall such
>> failures the last time I tried to make a no-X emacs, so maybe something
>> has changed recently.

>     I've just removed the unnecessary call to x-popup-menu yesterday, as
>     a matter of fact, so things should work again.

> The call to x-popup-menu was intended to precompute info cached in the
> menu, so that the menu would display more quickly.

> Why do you think it was unnecessary?

I haven't been able to measure any actual speed difference on any machine
I have access to.  Maybe some years ago it made a difference, but it's lost
in the noise now.


        Stefan


PS: I also remember of a case where the precomputation was wrong because it
did not know that the menu was always going to be used when some other minor
mode was ON, and all the keybindings for the menu were provided by the minor
mode's map.  I can't remember the details, but my conclusion at that time
was that this specific optimization was not worth the trouble any more.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-12  4:41     ` Stefan Monnier
@ 2004-04-13 17:44       ` Richard Stallman
  2004-04-13 18:14         ` Stefan Monnier
  2004-04-14  0:18         ` Alex Schroeder
  0 siblings, 2 replies; 12+ messages in thread
From: Richard Stallman @ 2004-04-13 17:44 UTC (permalink / raw)
  Cc: emacs-devel, miles

    I haven't been able to measure any actual speed difference on any machine
    I have access to.  Maybe some years ago it made a difference, but it's lost
    in the noise now.

You may be right.  If so, we might want to undocument that use
of x-popup-menu and remove all such calls.

But we should not be hasty in deciding this.  First let's verify that
this is generally true.  Did the machines you tested this on include
some that were rather slow by today's standards?  For instance,
machines of standard power for 5 years ago?

If the precomputation is still useful on 5% of machines in use, it is
worth keeping.  If it is still useful on 3% of machines in use, maybe
it is worth keeping.  If it is only 1%, then I think it is not worth
keeping.  I would think that 5-year-old PCs are several percent of the
PCs in use now, at least; that statistic ought to be available from
some sort of commercial statistics source.  Could someone please look
for this?

Until we determine what's right to do about menu precomputation,
please don't remove calls to x-popup-menu one by one.  The right fix
for this is to make that kind of call to x-popup-menu a no-op when not
using a window system, and put the call back where it was for the time
being.  Ok?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-13 17:44       ` Richard Stallman
@ 2004-04-13 18:14         ` Stefan Monnier
  2004-04-14 22:53           ` Richard Stallman
  2004-04-14  0:18         ` Alex Schroeder
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2004-04-13 18:14 UTC (permalink / raw)
  Cc: emacs-devel, miles

> this is generally true.  Did the machines you tested this on include
> some that were rather slow by today's standards?  For instance,
> machines of standard power for 5 years ago?

I originally tested it on my trusty biprocessor 266Mhz Pentium II GNU/Linux
machine, which was pretty powerful 7 years ago.


        Stefan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-13 17:44       ` Richard Stallman
  2004-04-13 18:14         ` Stefan Monnier
@ 2004-04-14  0:18         ` Alex Schroeder
  1 sibling, 0 replies; 12+ messages in thread
From: Alex Schroeder @ 2004-04-14  0:18 UTC (permalink / raw)
  Cc: miles, Stefan Monnier, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> If the precomputation is still useful on 5% of machines in use, it is
> worth keeping.  If it is still useful on 3% of machines in use, maybe
> it is worth keeping.  If it is only 1%, then I think it is not worth
> keeping.  I would think that 5-year-old PCs are several percent of the
> PCs in use now, at least; that statistic ought to be available from
> some sort of commercial statistics source.  Could someone please look
> for this?

I don't have information from a commercial statistics source.
However:  One college I taught at two years ago here in Switzerland
*had* to use computers for at least five years.  This was some
government decision.  Therefore, you would expect a significant
percentage of five year old computers in some Swiss schools.  They
made significant efforts to extend the lifespan of their hardware.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fourth law:
OOO  None of your friends and coworkers share your taste in music.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-13 18:14         ` Stefan Monnier
@ 2004-04-14 22:53           ` Richard Stallman
  2004-04-14 23:25             ` David Kastrup
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2004-04-14 22:53 UTC (permalink / raw)
  Cc: emacs-devel, miles

    I originally tested it on my trusty biprocessor 266Mhz Pentium II GNU/Linux
    machine, which was pretty powerful 7 years ago.

Does anyone have access to info about what fraction of machines
in use today are less powerful than that?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-14 22:53           ` Richard Stallman
@ 2004-04-14 23:25             ` David Kastrup
  2004-04-16 18:08               ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: David Kastrup @ 2004-04-14 23:25 UTC (permalink / raw)
  Cc: miles, Stefan Monnier, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     I originally tested it on my trusty biprocessor 266Mhz Pentium
>     II GNU/Linux machine, which was pretty powerful 7 years ago.
> 
> Does anyone have access to info about what fraction of machines
> in use today are less powerful than that?

Well, my desktop machine is a 133MHz Pentium.  My notebook is a
600MHz processor, but I doubt it would be faster in things like
kernel compilation that a dual 266MHz machine.

But "fraction of machines in use today" would be a totally misleading
number: probably most of today's machines are used for "simple text
processing under Windows", meaning that they have awful processing
requirements for tolerable updates.  I know that in most shops I've
been working, the most powerful machines were used by the secretaries.

In short: I think that the average processing power of machines
typically running Emacs might be severely below the average of "in use
today".

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-14 23:25             ` David Kastrup
@ 2004-04-16 18:08               ` Richard Stallman
  2004-04-16 18:27                 ` David Kastrup
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2004-04-16 18:08 UTC (permalink / raw)
  Cc: miles, monnier, emacs-devel

    Well, my desktop machine is a 133MHz Pentium.

It would be useful for you to try nulling out menu bar precomputation,
and see if you notice any slowdown on that machine.

    In short: I think that the average processing power of machines
    typically running Emacs might be severely below the average of "in use
    today".

It could well be true.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-16 18:08               ` Richard Stallman
@ 2004-04-16 18:27                 ` David Kastrup
  2004-04-17 19:46                   ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: David Kastrup @ 2004-04-16 18:27 UTC (permalink / raw)
  Cc: miles, monnier, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     Well, my desktop machine is a 133MHz Pentium.
> 
> It would be useful for you to try nulling out menu bar
> precomputation, and see if you notice any slowdown on that machine.

I almost never used the menu-bar, and yes, when I did, clicking on it
for the first time always caused a significant delay.  Quite enough to
make you realize "uh, that's the first time in that session".  That's
with 21.3 IIRC (the machine is currently down).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: problems with easy-menu-add on --without-x emacs
  2004-04-16 18:27                 ` David Kastrup
@ 2004-04-17 19:46                   ` Richard Stallman
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 2004-04-17 19:46 UTC (permalink / raw)
  Cc: miles, monnier, emacs-devel

    I almost never used the menu-bar, and yes, when I did, clicking on it
    for the first time always caused a significant delay.

The idea of the precomputation is to avoid most of that delay (to
cause it to happen before Emacs is dumped, in fact).  So I wonder
whether precomputation is really operating properly for you.  It
sounds like maybe it is not.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-04-17 19:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-10  3:20 problems with easy-menu-add on --without-x emacs Miles Bader
2004-04-10 15:33 ` Stefan Monnier
2004-04-12  3:52   ` Richard Stallman
2004-04-12  4:41     ` Stefan Monnier
2004-04-13 17:44       ` Richard Stallman
2004-04-13 18:14         ` Stefan Monnier
2004-04-14 22:53           ` Richard Stallman
2004-04-14 23:25             ` David Kastrup
2004-04-16 18:08               ` Richard Stallman
2004-04-16 18:27                 ` David Kastrup
2004-04-17 19:46                   ` Richard Stallman
2004-04-14  0:18         ` Alex Schroeder

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).