GNU bug report logs - #18813
25.0.50; gnus start fails unless image.el is loaded in advance.

Previous Next

Packages: emacs, gnus;

Reported by: enami tsugutomo <tsugutomo.enami <at> jp.sony.com>

Date: Fri, 24 Oct 2014 06:44:01 UTC

Severity: normal

Merged with 18980

Found in versions 24.4, 25.0.50

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18813 in the body.
You can then email your comments to 18813 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18813; Package emacs. (Fri, 24 Oct 2014 06:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to enami tsugutomo <tsugutomo.enami <at> jp.sony.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 24 Oct 2014 06:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: enami tsugutomo <tsugutomo.enami <at> jp.sony.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; gnus start fails unless image.el is loaded in advance.
Date: Fri, 24 Oct 2014 15:32:23 +0900
Hi,

gnus start (i.e. M-x gnus) fails unless image.el is loaded in advance.
Here is a backtrace (with through cat -v and some sensitive data is
replaced with `...').  It looks like
gnus-mode-line-buffer-identification shadows load-path.

Debugger entered--Lisp error: (file-error "Cannot open load file" "No such file or directory" "image")
  find-image(((:type xpm :file "gnus-pointer.xpm" :ascent center) (:type xbm :file "gnus-pointer.xbm" :ascent center)))
  gnus-mode-line-buffer-identification(("Gnus: %b {nntp:news}"))
  gnus-group-set-mode-line()
  gnus-dribble-enter("")
  gnus-dribble-touch()
  gnus-read-active-for-groups((nnimap "rplaca.sm.sony.co.jp" (nnimap-inbox "INBOX") (nnimap-split-methods (quote nnmail-split-fancy))) ... ((546 qresync nil "mail-lists.nsd-asunaro-sw" qresync)))
  gnus-get-unread-articles(nil nil)
  gnus-setup-news(nil nil nil)
  byte-code("^H\204^N^@	\204^N^@\306 \210\202L^@\307\310!\210\311\n!^S\f\204^^^@^M\203!^@\312 \210\313\314^N^X^H#\210\307\315!\210^N^Y\2036^@\316\317\320\"\210\321 \210\322^N^X!\210\323 \210\324\325!\210\326 \210\307\327!\210\314\207" [dont-connect did-connect gnus-startup-file gnus-current-startup-file gnus-slave gnus-use-dribble-file gnus-group-quit gnus-run-hooks gnus-startup-hook gnus-make-newsrc-file gnus-dribble-read-file gnus-setup-news nil gnus-setup-news-hook gnus-request-create-group "queue" (nndraft "") 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 level gnus-agent] 4)
  gnus-1(nil nil nil)
  gnus(nil)
  funcall-interactively(gnus nil)
  call-interactively(gnus record nil)
  command-execute(gnus record)
  execute-extended-command(nil "gnus")
  funcall-interactively(execute-extended-command nil "gnus")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)




In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu)
 of 2014-10-24 on sigabrt
Repository revision: 118187 monnier <at> iro.umontreal.ca-20141023214436-ejbbgqri83hnqnmf
System Description:	Ubuntu 14.04.1 LTS

Configured using:
 `configure --with-x=no'

Configured features:
SOUND NOTIFY ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: nil

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  file-name-shadow-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Recent input:
RET n ESC x l o a d SPC l i RET d e b u g TAB RET ESC 
x s e t SPC v a TAB RET d e b u g - o n SPC e r TAB 
RET t RET ESC x g n u s RET y ESC x l o a d SPC l i 
b TAB RET h e l p - m o d e RET ESC x g n u s RET y 
C-x h ESC w ESC x e DEL r e p o SPC r TAB RET ESC w 
q ESC x r e p o TAB r TAB RET

Recent messages:
Opening connection to rplaca.sm.sony.co.jp...done
nnimap rplaca.sm.sony.co.jp splitting mail...
nnimap read 0k from rplaca.sm.sony.co.jp
nnimap rplaca.sm.sony.co.jp splitting mail...done
Entering debugger...
Mark set [2 times]
Making completion list...
command-execute: Cannot open load file: No such file or directory, emacsbug
Back to top level
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail help-mode cus-edit cus-start
cus-load debug regexp-opt utf-7 nndraft nnmh rfc2104 network-stream
auth-source cl-macs gv eieio byte-opt bytecomp byte-compile cconv
eieio-core starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime
password-cache dig mailcap nntp gnus-cache gnus-sum gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source tls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range message dired format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader
gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util help-fns
mail-prsvr wid-edit cl-loaddefs cl-lib time-date japan-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process inotify multi-tty emacs)

Memory information:
((conses 16 302720 43408)
 (symbols 48 26593 0)
 (miscs 40 91 113)
 (strings 32 39793 4599)
 (string-bytes 1 1274215)
 (vectors 16 18590)
 (vector-slots 8 535542 7646)
 (floats 8 225 313)
 (intervals 56 242 51)
 (buffers 976 23)
 (heap 1024 33799 4482))




Reply sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
You have taken responsibility. (Fri, 24 Oct 2014 08:36:02 GMT) Full text and rfc822 format available.

Notification sent to enami tsugutomo <tsugutomo.enami <at> jp.sony.com>:
bug acknowledged by developer. (Fri, 24 Oct 2014 08:36:03 GMT) Full text and rfc822 format available.

Message #10 received at 18813-done <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: tsugutomo.enami <at> jp.sony.com
Cc: 18813-done <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Fri, 24 Oct 2014 17:35:43 +0900
On Fri, 24 Oct 2014 15:32:23 +0900, enami tsugutomo wrote:
> gnus start (i.e. M-x gnus) fails unless image.el is loaded in advance.
> Here is a backtrace (with through cat -v and some sensitive data is
> replaced with `...').  It looks like
> gnus-mode-line-buffer-identification shadows load-path.

Enami-san, thanks for tracking it down.  I've changed the function
in question as follows:

--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -326,7 +326,7 @@ be set in `.emacs' instead."
   (if (fboundp 'find-image)
       (defun gnus-mode-line-buffer-identification (line)
 	(let ((str (car-safe line))
-	      (load-path (mm-image-load-path)))
+	      (load-path (append (mm-image-load-path) load-path)))
 	  (if (and (stringp str)
 		   (string-match "^Gnus:" str))
 	      (progn (add-text-properties

I think it would not be a matter even if it causes finding another
gnus-pointer.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Sun, 26 Oct 2014 23:14:02 GMT) Full text and rfc822 format available.

Message #13 received at 18813-done <at> debbugs.gnu.org (full text, mbox):

From: tsugutomo.enami <at> jp.sony.com
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 18813-done <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 08:03:15 +0900
Hi,

I wonder why it works for other people for a while and found
gnus-group-startup-message forces find-image to be loaded when
necessary.

Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> Enami-san, thanks for tracking it down.  I've changed the function
> in question as follows:
>
> --- a/lisp/gnus.el
> +++ b/lisp/gnus.el
> @@ -326,7 +326,7 @@ be set in `.emacs' instead."
>    (if (fboundp 'find-image)

So, I guess alternative way is changing the above test to (and (fboundp
'find-image) (display-graphic-p)) like gnus-group-startup-message does.

I'm not sure which one is better.

enami.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Mon, 27 Oct 2014 00:29:01 GMT) Full text and rfc822 format available.

Message #16 received at 18813-done <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: tsugutomo.enami <at> jp.sony.com
Cc: 18813-done <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 09:28:03 +0900
On Mon, 27 Oct 2014 08:03:15 +0900, tsugutomo.enami <at> jp.sony.com wrote:
> I wonder why it works for other people for a while and found
> gnus-group-startup-message forces find-image to be loaded when
> necessary.
[...]
> So, I guess alternative way is changing the above test to (and (fboundp
> 'find-image) (display-graphic-p)) like gnus-group-startup-message does.

> I'm not sure which one is better.

Well, I have another doubt.  Did you mean image.elc is not loaded
only if the display type is not graphical?  Does the error happen
in both 24.0.50 (you seem to use) and 25.0.50 (labeled in the bug
subject)?
Currently I can test it with only 24.3 and 25.0.50, and find-image
is fully available in both the versions with the -Q option no
matter what the display type is, and even in the batch mode.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Mon, 27 Oct 2014 02:09:02 GMT) Full text and rfc822 format available.

Message #19 received at 18813-done <at> debbugs.gnu.org (full text, mbox):

From: tsugutomo.enami <at> jp.sony.com
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 18813-done <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 10:57:54 +0900
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> Well, I have another doubt.  Did you mean image.elc is not loaded
> only if the display type is not graphical?

Loading image.el won't fail and it works.  I wonder if it is really
necessary to setup image when display is not capable of displaying it.

> Does the error happen in both 24.0.50 (you seem to use) and 25.0.50
> (labeled in the bug subject)?

# 24.0.50 is currentl my main mail environment.  As I was asked to
# prepare patch against emacs trunk in bug#18728, I've prepared 25.0.50
# on temporary machine and found this bug#18813 while testing on it.

This bug#18813 doesn't occur on 24.0.50, since image.el is loaded while
gnus-art.el is loaded (gnus-image-type-available-p defined in
gnus-ems.el calls image-type-available-p).

On 25.0.50, tests in gnus-image-type-available-p are reordered and now
control returns before calling image-type-available-p when
display-images-p returns nil (it is in my case).  So, image.el is not
loaded.

Hmm, why are they reordered?  I guess it is to avoid loading unnecessary
library.

enami.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Mon, 27 Oct 2014 03:32:01 GMT) Full text and rfc822 format available.

Message #22 received at 18813 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: tsugutomo.enami <at> jp.sony.com
Cc: 18813 <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 12:31:01 +0900
On Mon, 27 Oct 2014 10:57:54 +0900, tsugutomo.enami <at> jp.sony.com wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

>> Well, I have another doubt.  Did you mean image.elc is not loaded
>> only if the display type is not graphical?

> Loading image.el won't fail and it works.  I wonder if it is really
> necessary to setup image when display is not capable of displaying it.

I see.  The image data are definitely unnecessary for a non-graphic
display, so I'll add (display-graphic-p) to the tests.

> This bug#18813 doesn't occur on 24.0.50, since image.el is loaded while
> gnus-art.el is loaded (gnus-image-type-available-p defined in
> gnus-ems.el calls image-type-available-p).

Thank you for clarifying this.

> On 25.0.50, tests in gnus-image-type-available-p are reordered and now
> control returns before calling image-type-available-p when
> display-images-p returns nil (it is in my case).  So, image.el is not
> loaded.

> Hmm, why are they reordered?  I guess it is to avoid loading unnecessary
> library.

2013-06-06  Teodor Zlatanov  <tzz <at> lifelogs.com>

	* gnus-ems.el (gnus-image-type-available-p): Test `display-images-p'
	before `image-type-available-p' to avoid loading the image libraries
	needlessly.

This is just the cause of your problem (it does not mean Ted's
change was wrong, of course).

In addition, my doubt about loading image.elc was cleared.

,---- loadup.el
| (if (fboundp 'x-create-frame)
|     (progn
|       (load "fringe")
|       ;; Needed by `imagemagick-register-types'
|       (load "emacs-lisp/regexp-opt")
|       (load "image")
|       (load "international/fontset")
|       (load "dnd")
|       (load "tool-bar")))
`----

This is why find-image is always available in my system.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Mon, 27 Oct 2014 03:42:01 GMT) Full text and rfc822 format available.

Message #25 received at 18813 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: tsugutomo.enami <at> jp.sony.com, 18813 <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 05:41:02 +0200
> Date: Mon, 27 Oct 2014 09:28:03 +0900
> From: Katsumi Yamaoka <yamaoka <at> jpl.org>
> Cc: 18813-done <at> debbugs.gnu.org
> 
> Currently I can test it with only 24.3 and 25.0.50, and find-image
> is fully available in both the versions with the -Q option no
> matter what the display type is, and even in the batch mode.

The OP built Emacs --without-x, in which case image.el is not
preloaded, and the support code is missing.

Try configuring --without-x.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Mon, 27 Oct 2014 03:53:02 GMT) Full text and rfc822 format available.

Message #28 received at 18813 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: tsugutomo.enami <at> jp.sony.com
Cc: 18813 <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 12:52:25 +0900
On Mon, 27 Oct 2014 12:31:01 +0900, Katsumi Yamaoka wrote:
> I see.  The image data are definitely unnecessary for a non-graphic
> display, so I'll add (display-graphic-p) to the tests.

I've added it within the gnus-mode-line-buffer-identification
function, since it should return image data when it is called in
a graphic display even if Gnus starts in a non-graphic display.

--- a/lisp/gnus.el
+++ b/lisp/gnus.el
@@ -327,7 +327,8 @@ be set in `.emacs' instead."
       (defun gnus-mode-line-buffer-identification (line)
 	(let ((str (car-safe line))
 	      (load-path (append (mm-image-load-path) load-path)))
-	  (if (and (stringp str)
+	  (if (and (display-graphic-p)
+		   (stringp str)
 		   (string-match "^Gnus:" str))
 	      (progn (add-text-properties
 		      0 5




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#18813; Package emacs,gnus. (Mon, 27 Oct 2014 03:57:02 GMT) Full text and rfc822 format available.

Message #31 received at 18813 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tsugutomo.enami <at> jp.sony.com, 18813 <at> debbugs.gnu.org
Subject: Re: bug#18813: 25.0.50;
 gnus start fails unless image.el is loaded in advance.
Date: Mon, 27 Oct 2014 12:56:36 +0900
On Mon, 27 Oct 2014 05:41:02 +0200, Eli Zaretskii wrote:
>> Currently I can test it with only 24.3 and 25.0.50, and find-image
>> is fully available in both the versions with the -Q option no
>> matter what the display type is, and even in the batch mode.

> The OP built Emacs --without-x, in which case image.el is not
> preloaded, and the support code is missing.

> Try configuring --without-x.

Thanks.  It's been already cleared.




Merged 18813 18980. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 08 Nov 2014 18:00:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 07 Dec 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.