Gnus development mailing list
 help / color / mirror / Atom feed
* Cannot open load file: tool-bar
@ 2002-11-03 16:15 Thomas Hungenberg
  2002-11-03 17:39 ` Simon Josefsson
  2002-11-03 18:47 ` Cannot open load file: tool-bar Kai Großjohann
  0 siblings, 2 replies; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-03 16:15 UTC (permalink / raw)


Hi!

I'm using Oort Gnus 0.06 with XEmacs 21.4 on Debian Linux which
normally works fine. Now I wanted to debug a configuration problem and
therefore added (setq debug-on-signal t) to my ~/.gnus.

When restarting Gnus, it stopped with a signal complaining about not
being able to load "tool-bar". So I tried to find the part of the
configuration responsible for this error and finally cut down my
~/.gnus until it only contained the following:

,----[ .gnus ]
| (setq debug-on-signal t)
| (setq gnus-select-method '(nntp "news"))
| (setq gnus-secondary-select-methods '((nnfolder "")))
`----

But even with this small configuration, Gnus still stops with the same
signal:

-----[begin of quoted message]------------------------------------------
Signaling: (file-error "Cannot open load file" "tool-bar")
  signal(file-error ("Cannot open load file" "tool-bar"))
  load("tool-bar" nil t nil)
  require(tool-bar)
  byte-code("..." [require tool-bar] 2)
  gnus-group-make-tool-bar()
  gnus-group-mode()
  gnus-group-setup-buffer()
  gnus-group-list-groups(nil)
  byte-code("..." [gnus-slave gnus-current-startup-file gnus-startup-file did-connect level dont-connect gnus-group-quit gnus-run-hooks gnus-startup-hook gnus-make-newsrc-file gnus-dribble-read-file bbb-login add-hook gnus-summary-mode-hook gnus-grouplens-mode gnus-setup-news nil gnus-setup-news-hook gnus-start-draft-setup gnus-group-list-groups gnus-group-first-unread-group gnus-configure-windows group gnus-group-set-mode-line gnus-started-hook gnus-use-dribble-file gnus-use-grouplens] 4)
  gnus-1(nil nil nil)
  gnus()
  #<compiled-function nil "...(49)" [toolbar-news-frame-plist toolbar-news-use-separate-frame toolbar-news-frame gnus frame-live-p make-frame add-hook gnus-exit-gnus-hook #<compiled-function nil "...(18)" ... 2> select-frame framep frame-iconified-p deiconify-frame raise-frame] 3 1083114 nil>()
  call-interactively(toolbar-gnus)
  #<compiled-function nil "...(27)" [toolbar-news-commands-alist toolbar-news-reader command error "Unkown news reader %s" call-interactively eval] 4 1083159 nil>()
  call-interactively(toolbar-news)
  release-and-activate-toolbar-button(#<buttonup-event button1up>)
  call-interactively(release-and-activate-toolbar-button)
-----[end of quoted message]--------------------------------------------

I tried Oort Gnus 0.07, but it has the same problems.

Why is "tool-bar" required in gnus-group.el missing?
Should it be part of the Gnus distribution?


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Cannot open load file: tool-bar
  2002-11-03 16:15 Cannot open load file: tool-bar Thomas Hungenberg
@ 2002-11-03 17:39 ` Simon Josefsson
  2002-11-04 14:30   ` John Paul Wallington
  2002-11-03 18:47 ` Cannot open load file: tool-bar Kai Großjohann
  1 sibling, 1 reply; 23+ messages in thread
From: Simon Josefsson @ 2002-11-03 17:39 UTC (permalink / raw)
  Cc: Gnus Mailing List

Thomas Hungenberg <th@demonium.de> writes:

> Hi!
>
> I'm using Oort Gnus 0.06 with XEmacs 21.4 on Debian Linux which
> normally works fine. Now I wanted to debug a configuration problem and
> therefore added (setq debug-on-signal t) to my ~/.gnus.
>
> When restarting Gnus, it stopped with a signal complaining about not
> being able to load "tool-bar". So I tried to find the part of the
> configuration responsible for this error and finally cut down my
> ~/.gnus until it only contained the following:
>
> ,----[ .gnus ]
> | (setq debug-on-signal t)
> | (setq gnus-select-method '(nntp "news"))
> | (setq gnus-secondary-select-methods '((nnfolder "")))
> `----
>
> But even with this small configuration, Gnus still stops with the same
> signal:
>
> -----[begin of quoted message]------------------------------------------
> Signaling: (file-error "Cannot open load file" "tool-bar")
>   signal(file-error ("Cannot open load file" "tool-bar"))

Gnus triggers lots of non-fatal signals (240 according to grep -e
unwind-protect -e condition-case *.el|wc -l).  If you really want to
have debug-on-signal enabled, you will have to press `c' to continue.




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

* Re: Cannot open load file: tool-bar
  2002-11-03 16:15 Cannot open load file: tool-bar Thomas Hungenberg
  2002-11-03 17:39 ` Simon Josefsson
@ 2002-11-03 18:47 ` Kai Großjohann
  2002-11-04  9:59   ` Thomas Hungenberg
  1 sibling, 1 reply; 23+ messages in thread
From: Kai Großjohann @ 2002-11-03 18:47 UTC (permalink / raw)


Thomas Hungenberg <th@demonium.de> writes:

> But even with this small configuration, Gnus still stops with the same
> signal:
>
> -----[begin of quoted message]------------------------------------------
> Signaling: (file-error "Cannot open load file" "tool-bar")
>   signal(file-error ("Cannot open load file" "tool-bar"))
>   load("tool-bar" nil t nil)

Were your *.elc files compiled with the same Emacs that you are using
to run this?

Since you are using the Debian package, maybe using "apt-get install
--reinstall" on it might help, though I'm not sure.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Cannot open load file: tool-bar
  2002-11-03 18:47 ` Cannot open load file: tool-bar Kai Großjohann
@ 2002-11-04  9:59   ` Thomas Hungenberg
  2002-11-04 13:44     ` Kai Großjohann
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-04  9:59 UTC (permalink / raw)


Kai Großjohann <kai.grossjohann@uni-duisburg.de> writes:

>> [unable to load "tool-bar"]
> Were your *.elc files compiled with the same Emacs that you are using
> to run this?

Yes.


> Since you are using the Debian package, maybe using "apt-get install
> --reinstall" on it might help, though I'm not sure.

I'm using the XEmacs Debian package, but Gnus is _not_ installed from
a Debian package.
I compiled Gnus with XEmacs 21.4 which does not include a file
tool-bar.el[c] (at least the Debian package does not). The only
package in the current stable Debian distribution which comes with a
tool-bar.elc is Emacs 21.2 which ist not installed here.


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Cannot open load file: tool-bar
  2002-11-04  9:59   ` Thomas Hungenberg
@ 2002-11-04 13:44     ` Kai Großjohann
  2002-11-04 16:52       ` Thomas Hungenberg
  0 siblings, 1 reply; 23+ messages in thread
From: Kai Großjohann @ 2002-11-04 13:44 UTC (permalink / raw)


Thomas Hungenberg <th@demonium.de> writes:

> Kai Großjohann <kai.grossjohann@uni-duisburg.de> writes:
>
>> Since you are using the Debian package, maybe using "apt-get install
>> --reinstall" on it might help, though I'm not sure.
>
> I'm using the XEmacs Debian package, but Gnus is _not_ installed from
> a Debian package.

Did you do "make EMACS=xemacs" when compiling Gnus?  The
"EMACS=xemacs" part is important.

Is Emacs finding the *.elc files that you produced?  M-x
locate-library RET will tell you.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Cannot open load file: tool-bar
  2002-11-03 17:39 ` Simon Josefsson
@ 2002-11-04 14:30   ` John Paul Wallington
  2002-11-04 17:03     ` Thomas Hungenberg
  0 siblings, 1 reply; 23+ messages in thread
From: John Paul Wallington @ 2002-11-04 14:30 UTC (permalink / raw)
  Cc: Thomas Hungenberg, ding

Simon Josefsson <jas@extundo.com> wrote:

> Thomas Hungenberg <th@demonium.de> writes:
[...]
>> But even with this small configuration, Gnus still stops with the same
>> signal:
>>
>> -----[begin of quoted message]------------------------------------------
>> Signaling: (file-error "Cannot open load file" "tool-bar")
>>   signal(file-error ("Cannot open load file" "tool-bar"))
>
> Gnus triggers lots of non-fatal signals (240 according to grep -e
> unwind-protect -e condition-case *.el|wc -l).  If you really want to
> have debug-on-signal enabled, you will have to press `c' to continue.

Simon is right.  Do you really want `debug-on-signal' enabled?
Wouldn't `debug-on-error' do?

If you do (require 'poe) or snarf XEmacs 21.5 from CVS then you should
get a third NOERROR argument to `require'.  If you use it, you
shouldn't cause a signal here (untested with poe).  Or you could just
comment out the (condition-case nil (require 'tool-bar) (error nil))
in `gnus-group-make-tool-bar' in lisp/gnus-group.el and recompile to
avoid it.

BTW, what was your initial configuration problem ?

-- 
John Paul Wallington



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

* Re: Cannot open load file: tool-bar
  2002-11-04 13:44     ` Kai Großjohann
@ 2002-11-04 16:52       ` Thomas Hungenberg
  2002-11-04 21:04         ` Kai Großjohann
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-04 16:52 UTC (permalink / raw)


Kai Großjohann <kai.grossjohann@uni-duisburg.de> writes:

> Did you do "make EMACS=xemacs" when compiling Gnus?  The
> "EMACS=xemacs" part is important.

Yes.


> Is Emacs finding the *.elc files that you produced?  M-x
> locate-library RET will tell you.

Yes, if I search e.g. for "gnus", it tells me the correct
path to the current Gnus version in my $HOME.


_But_ I just noticed that the wrong site-lisp directory is used in
the configure-script:

I have both Emacs and XEmacs installed and the lisp-files are in
/usr/share/emacs/site-lisp/ for Emacs and in
/usr/share/xemacs/site-lisp-21/ for XEmacs.

The Gnus configure script finds /usr/share/emacs/site-lisp/ and
creates the following in the Makefile:
prefix = /usr
datadir = ${prefix}/share
lispdir = $(datadir)/emacs/site-lisp

I don't know if this could cause a problem or if $lispdir is only
important when doing a "make install"? I use Gnus from my $HOME where
it was compiled.


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Cannot open load file: tool-bar
  2002-11-04 14:30   ` John Paul Wallington
@ 2002-11-04 17:03     ` Thomas Hungenberg
  2002-11-04 18:43       ` John Paul Wallington
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-04 17:03 UTC (permalink / raw)


John Paul Wallington <jpw@shootybangbang.com> writes:

> BTW, what was your initial configuration problem ?

At startup, Gnus beeps once and then stops for a part of a second
while initializing and I'd like to know why.


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Cannot open load file: tool-bar
  2002-11-04 17:03     ` Thomas Hungenberg
@ 2002-11-04 18:43       ` John Paul Wallington
  2002-11-04 20:21         ` Problems with bbdb and supercite (was: Re: Cannot open load file: tool-bar) Thomas Hungenberg
  0 siblings, 1 reply; 23+ messages in thread
From: John Paul Wallington @ 2002-11-04 18:43 UTC (permalink / raw)


Thomas Hungenberg <th@demonium.de> wrote:

> John Paul Wallington <jpw@shootybangbang.com> writes:
>
>> BTW, what was your initial configuration problem ?
>
> At startup, Gnus beeps once and then stops for a part of a second
> while initializing and I'd like to know why.

If you set `debug-on-error' instead of `signal-on-error' does
that produce a backtrace?  If so, you could post it here.


If not, you could keep `signal-on-error', comment out the

(condition-case nil (require 'tool-bar) (error nil))

line in `gnus-group-make-tool-bar' in gnus-group.el and recompile,
then see which of the ~200 bits of code in Gnus which might signal
will signal next 8-/ - that sounds tiresome!


Also, beeping and stopping is often done by `gnus-error'; does setting
`gnus-verbose' to 0 shut it up?

How about putting the following in your init-file:

(eval-after-load "gnus-util"
  '(defun gnus-error (level &rest args)
     (message "Gnus Error: %s %s\n" level args)
     (debug)))

-- 
John Paul Wallington





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

* Problems with bbdb and supercite (was: Re: Cannot open load file: tool-bar)
  2002-11-04 18:43       ` John Paul Wallington
@ 2002-11-04 20:21         ` Thomas Hungenberg
  2002-11-04 22:10           ` Problems with bbdb and supercite Jack Twilley
  2002-11-05  7:32           ` Kai Großjohann
  0 siblings, 2 replies; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-04 20:21 UTC (permalink / raw)


John Paul Wallington <jpw@shootybangbang.com> writes:

> If you set `debug-on-error' instead of `signal-on-error' does
> that produce a backtrace?  If so, you could post it here.

No, it doesn't.


> Also, beeping and stopping is often done by `gnus-error'; does setting
> `gnus-verbose' to 0 shut it up?

No.


I thought the problem has to do with BBDB and Supercite because I
already had problems with some functions like bbdb/sc-consult-attr.

So I cut down the BBDB and Supercite configuration in my ~/.gnus and
found out that the line (bbdb-initialize 'gnus 'message 'sc)
causes the "beep". If I remove the "'sc", Gnus starts without beeping.

How can I find out what's going wrong there?
Sorry, I don't know very much about Lisp and Emacs internals.


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Cannot open load file: tool-bar
  2002-11-04 16:52       ` Thomas Hungenberg
@ 2002-11-04 21:04         ` Kai Großjohann
  2002-11-04 22:11           ` Thomas Hungenberg
  0 siblings, 1 reply; 23+ messages in thread
From: Kai Großjohann @ 2002-11-04 21:04 UTC (permalink / raw)


Thomas Hungenberg <th@demonium.de> writes:

> _But_ I just noticed that the wrong site-lisp directory is used in
> the configure-script:
>
> I have both Emacs and XEmacs installed and the lisp-files are in
> /usr/share/emacs/site-lisp/ for Emacs and in
> /usr/share/xemacs/site-lisp-21/ for XEmacs.
>
> The Gnus configure script finds /usr/share/emacs/site-lisp/ and
> creates the following in the Makefile:
> prefix = /usr
> datadir = ${prefix}/share
> lispdir = $(datadir)/emacs/site-lisp
>
> I don't know if this could cause a problem or if $lispdir is only
> important when doing a "make install"? I use Gnus from my $HOME where
> it was compiled.

I think it's not actually USED, but your problem smells of using the
wrong Emacs to compile stuff.  And the above is another indicator.

I strongly suspect you're using Emacs to byte-compile, and XEmacs to
run, or vice versa.  Don't do that.

(The "make all" output should tell you what it is doing, so you can
see if everything is going right.)

And then, the configure script can also be told which Emacs to use, I
think.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Problems with bbdb and supercite
  2002-11-04 20:21         ` Problems with bbdb and supercite (was: Re: Cannot open load file: tool-bar) Thomas Hungenberg
@ 2002-11-04 22:10           ` Jack Twilley
  2002-11-05  7:32           ` Kai Großjohann
  1 sibling, 0 replies; 23+ messages in thread
From: Jack Twilley @ 2002-11-04 22:10 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Thomas" == Thomas Hungenberg <th+lists@demonium.de> writes:

[...]

Thomas> So I cut down the BBDB and Supercite configuration in my
Thomas> ~/.gnus and found out that the line (bbdb-initialize 'gnus
Thomas> 'message 'sc) causes the "beep". If I remove the "'sc", Gnus
Thomas> starts without beeping.

I've had this problem for a while.  I pursued it on bbdb-info a while
ago but nobody else had the problem.  You might want to ask there.

Thomas> How can I find out what's going wrong there?  Sorry, I don't
Thomas> know very much about Lisp and Emacs internals.

Jack.
- -- 
Jack Twilley
jmt at twilley dot org
http colon slash slash www dot twilley dot org slash tilde jmt slash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE9xvBMGPFSfAB/ezgRAoe1AKCF9ExQMUARvnlVDOFJ5lPt7lz7TQCgjypC
mazqREJIuiKZvNaZxWjJAXI=
=rn23
-----END PGP SIGNATURE-----



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

* Re: Cannot open load file: tool-bar
  2002-11-04 21:04         ` Kai Großjohann
@ 2002-11-04 22:11           ` Thomas Hungenberg
  2002-11-05  7:35             ` Kai Großjohann
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-04 22:11 UTC (permalink / raw)


Kai Großjohann <kai.grossjohann@uni-duisburg.de> writes:

> I strongly suspect you're using Emacs to byte-compile, and XEmacs to
> run, or vice versa.  Don't do that.

> (The "make all" output should tell you what it is doing, so you can
> see if everything is going right.)

The configure script says: "checking if emacs is really XEmacs... no"
and make also calls xemacs.


> And then, the configure script can also be told which Emacs to use, I
> think.

I tried "./configure --with-xemacs" and it reports:

checking if xemacs is really XEmacs... yes
checking prefix for your Emacs... /usr
checking where .elc files should go... $(prefix)/share/xemacs/site-packages/lisp/gnus

... but after rebuilding Gnus, it still tries to load "tool-bar". :-(


BTW: The path /usr/share/xemacs/site-packages/ does not exist on a standard
Debian system, it has to be /usr/share/xemacs21/site-packages/.
Maybe this can also be specified as an option to configure or make?


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Problems with bbdb and supercite
  2002-11-04 20:21         ` Problems with bbdb and supercite (was: Re: Cannot open load file: tool-bar) Thomas Hungenberg
  2002-11-04 22:10           ` Problems with bbdb and supercite Jack Twilley
@ 2002-11-05  7:32           ` Kai Großjohann
  1 sibling, 0 replies; 23+ messages in thread
From: Kai Großjohann @ 2002-11-05  7:32 UTC (permalink / raw)


Thomas Hungenberg <th+lists@demonium.de> writes:

> So I cut down the BBDB and Supercite configuration in my ~/.gnus and
> found out that the line (bbdb-initialize 'gnus 'message 'sc)
> causes the "beep". If I remove the "'sc", Gnus starts without beeping.
>
> How can I find out what's going wrong there?
> Sorry, I don't know very much about Lisp and Emacs internals.

It seems you don't really use SuperCite.  So why bother...

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Cannot open load file: tool-bar
  2002-11-04 22:11           ` Thomas Hungenberg
@ 2002-11-05  7:35             ` Kai Großjohann
  2002-11-05 11:23               ` Thomas Hungenberg
  0 siblings, 1 reply; 23+ messages in thread
From: Kai Großjohann @ 2002-11-05  7:35 UTC (permalink / raw)


Thomas Hungenberg <th+lists@demonium.de> writes:

> I tried "./configure --with-xemacs" and it reports:
>
> checking if xemacs is really XEmacs... yes
> checking prefix for your Emacs... /usr
> checking where .elc files should go... $(prefix)/share/xemacs/site-packages/lisp/gnus
>
> ... but after rebuilding Gnus, it still tries to load "tool-bar". :-(

Hm.  So how about you try the following?

    ./configure --with-xemacs
    make EMACS=xemacs

That's my last straw.

> BTW: The path /usr/share/xemacs/site-packages/ does not exist on a standard
> Debian system, it has to be /usr/share/xemacs21/site-packages/.
> Maybe this can also be specified as an option to configure or make?

Could be lispdir, but I'm not sure.  I always look at the configure
script and/or Makefile.in to find this out.

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Cannot open load file: tool-bar
  2002-11-05  7:35             ` Kai Großjohann
@ 2002-11-05 11:23               ` Thomas Hungenberg
  2002-11-05 17:26                 ` Kai Großjohann
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Hungenberg @ 2002-11-05 11:23 UTC (permalink / raw)


Kai Großjohann <kai.grossjohann@uni-duisburg.de> writes:

> Hm.  So how about you try the following?

>     ./configure --with-xemacs
>     make EMACS=xemacs

That's exactly the way I build Gnus.

So Gnus maybe always tries to load tool-bar and it doesn't depend
on if it was build for emacs or xemacs?


      - Thomas

-- 
PGP: 2047Bit RSA, ID 0x668E601D - Encrypted mail welcome!




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

* Re: Cannot open load file: tool-bar
  2002-11-05 11:23               ` Thomas Hungenberg
@ 2002-11-05 17:26                 ` Kai Großjohann
  2002-11-05 18:03                   ` Jesper Harder
  2002-11-05 20:49                   ` John Paul Wallington
  0 siblings, 2 replies; 23+ messages in thread
From: Kai Großjohann @ 2002-11-05 17:26 UTC (permalink / raw)


Thomas Hungenberg <th+lists@demonium.de> writes:

> That's exactly the way I build Gnus.
>
> So Gnus maybe always tries to load tool-bar and it doesn't depend
> on if it was build for emacs or xemacs?

Hm.  Now that you mention it...  See this code:

/----
| ;; Emacs 21 tool bar.  Should be no-op otherwise.
| (defun gnus-group-make-tool-bar ()
|   (if (and 
|        (condition-case nil (require 'tool-bar) (error nil))
|        (fboundp 'tool-bar-add-item-from-menu)
\----

It comes from gnus-group.el.  As you can see, it tries to load the
file, ignoring errors, and if that fails it skips the code that only
works for Emacs 21.

So, what can we do?

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Cannot open load file: tool-bar
  2002-11-05 17:26                 ` Kai Großjohann
@ 2002-11-05 18:03                   ` Jesper Harder
  2002-11-05 19:14                     ` Kai Großjohann
  2002-11-05 20:49                   ` John Paul Wallington
  1 sibling, 1 reply; 23+ messages in thread
From: Jesper Harder @ 2002-11-05 18:03 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> /----
> | ;; Emacs 21 tool bar.  Should be no-op otherwise.
> | (defun gnus-group-make-tool-bar ()
> |   (if (and 
> |        (condition-case nil (require 'tool-bar) (error nil))
> |        (fboundp 'tool-bar-add-item-from-menu)
> \----
>
> It comes from gnus-group.el.  As you can see, it tries to load the
> file, ignoring errors, and if that fails it skips the code that only
> works for Emacs 21.
>
> So, what can we do?

Couldn't we use (featurep 'tool-bar)?  This should only return t in
Emacs 21 versions with tool-bar support.




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

* Re: Cannot open load file: tool-bar
  2002-11-05 18:03                   ` Jesper Harder
@ 2002-11-05 19:14                     ` Kai Großjohann
  2002-11-05 22:50                       ` Jesper Harder
  0 siblings, 1 reply; 23+ messages in thread
From: Kai Großjohann @ 2002-11-05 19:14 UTC (permalink / raw)


Jesper Harder <harder@ifa.au.dk> writes:

> Couldn't we use (featurep 'tool-bar)?  This should only return t in
> Emacs 21 versions with tool-bar support.

What if tool-bar.el isn't loaded?

When it _is_ loaded, fboundp on some function in tool-bar.el should
be about as good as (featurep 'tool-bar).

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)



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

* Re: Cannot open load file: tool-bar
  2002-11-05 17:26                 ` Kai Großjohann
  2002-11-05 18:03                   ` Jesper Harder
@ 2002-11-05 20:49                   ` John Paul Wallington
  2002-11-06  7:27                     ` Simon Josefsson
  1 sibling, 1 reply; 23+ messages in thread
From: John Paul Wallington @ 2002-11-05 20:49 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:

> Hm.  Now that you mention it...  See this code:
>
> /----
> | ;; Emacs 21 tool bar.  Should be no-op otherwise.
> | (defun gnus-group-make-tool-bar ()
> |   (if (and 
> |        (condition-case nil (require 'tool-bar) (error nil))
> |        (fboundp 'tool-bar-add-item-from-menu)
> \----
>
> It comes from gnus-group.el.  As you can see, it tries to load the
> file, ignoring errors, and if that fails it skips the code that only
> works for Emacs 21.
>
> So, what can we do?

The (condition-case nil (require 'tool-bar) (error nil)) is unnecessary
because `tool-bar-add-item-from-menu' is autoloaded and therefore
fbound (at least in RC and HEAD, untested in 21.1/2).

-- 
John Paul Wallington





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

* Re: Cannot open load file: tool-bar
  2002-11-05 19:14                     ` Kai Großjohann
@ 2002-11-05 22:50                       ` Jesper Harder
  0 siblings, 0 replies; 23+ messages in thread
From: Jesper Harder @ 2002-11-05 22:50 UTC (permalink / raw)


kai.grossjohann@uni-duisburg.de (Kai Großjohann) writes:

> Jesper Harder <harder@ifa.au.dk> writes:
>
>> Couldn't we use (featurep 'tool-bar)?  This should only return t in
>> Emacs 21 versions with tool-bar support.
>
> What if tool-bar.el isn't loaded?
>
> When it _is_ loaded, fboundp on some function in tool-bar.el should
> be about as good as (featurep 'tool-bar).

Yeah, you're right.  I guess what I don't understand is why tool-bar.el
needs to be require'd explicitly.  I.e. why this isn't sufficient:

(if (and 
       (featurep 'tool-bar)
       (default-value 'tool-bar-mode)
       (not gnus-group-toolbar-map))

Hmm, ShengHuo probably knows the answer:

2002-04-02  ShengHuo ZHU  <zsh@cs.rochester.edu>

	* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.




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

* Re: Cannot open load file: tool-bar
  2002-11-05 20:49                   ` John Paul Wallington
@ 2002-11-06  7:27                     ` Simon Josefsson
  2002-11-06 12:39                       ` John Paul Wallington
  0 siblings, 1 reply; 23+ messages in thread
From: Simon Josefsson @ 2002-11-06  7:27 UTC (permalink / raw)
  Cc: ding

John Paul Wallington <jpw@shootybangbang.com> writes:

> kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:
>
>> Hm.  Now that you mention it...  See this code:
>>
>> /----
>> | ;; Emacs 21 tool bar.  Should be no-op otherwise.
>> | (defun gnus-group-make-tool-bar ()
>> |   (if (and 
>> |        (condition-case nil (require 'tool-bar) (error nil))
>> |        (fboundp 'tool-bar-add-item-from-menu)
>> \----
>>
>> It comes from gnus-group.el.  As you can see, it tries to load the
>> file, ignoring errors, and if that fails it skips the code that only
>> works for Emacs 21.
>>
>> So, what can we do?
>
> The (condition-case nil (require 'tool-bar) (error nil)) is unnecessary
> because `tool-bar-add-item-from-menu' is autoloaded and therefore
> fbound (at least in RC and HEAD, untested in 21.1/2).

XEmacs doesn't have tool-bar nor tool-bar-add-item-from-menu.




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

* Re: Cannot open load file: tool-bar
  2002-11-06  7:27                     ` Simon Josefsson
@ 2002-11-06 12:39                       ` John Paul Wallington
  0 siblings, 0 replies; 23+ messages in thread
From: John Paul Wallington @ 2002-11-06 12:39 UTC (permalink / raw)
  Cc: ding

> > The (condition-case nil (require 'tool-bar) (error nil)) is unnecessary
> > because `tool-bar-add-item-from-menu' is autoloaded and therefore
> > fbound (at least in RC and HEAD, untested in 21.1/2).
> 
> XEmacs doesn't have tool-bar nor tool-bar-add-item-from-menu.

Yes, in XEmacs (fboundp 'tool-bar-add-item-from-menu) returns nil.

-- 
John Paul Wallington




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

end of thread, other threads:[~2002-11-06 12:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-03 16:15 Cannot open load file: tool-bar Thomas Hungenberg
2002-11-03 17:39 ` Simon Josefsson
2002-11-04 14:30   ` John Paul Wallington
2002-11-04 17:03     ` Thomas Hungenberg
2002-11-04 18:43       ` John Paul Wallington
2002-11-04 20:21         ` Problems with bbdb and supercite (was: Re: Cannot open load file: tool-bar) Thomas Hungenberg
2002-11-04 22:10           ` Problems with bbdb and supercite Jack Twilley
2002-11-05  7:32           ` Kai Großjohann
2002-11-03 18:47 ` Cannot open load file: tool-bar Kai Großjohann
2002-11-04  9:59   ` Thomas Hungenberg
2002-11-04 13:44     ` Kai Großjohann
2002-11-04 16:52       ` Thomas Hungenberg
2002-11-04 21:04         ` Kai Großjohann
2002-11-04 22:11           ` Thomas Hungenberg
2002-11-05  7:35             ` Kai Großjohann
2002-11-05 11:23               ` Thomas Hungenberg
2002-11-05 17:26                 ` Kai Großjohann
2002-11-05 18:03                   ` Jesper Harder
2002-11-05 19:14                     ` Kai Großjohann
2002-11-05 22:50                       ` Jesper Harder
2002-11-05 20:49                   ` John Paul Wallington
2002-11-06  7:27                     ` Simon Josefsson
2002-11-06 12:39                       ` John Paul Wallington

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 NNTP newsgroup(s).