all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs
@ 2008-10-09 12:43 Tassilo Horn
  2008-10-09 17:12 ` Dan Nicolaescu
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2008-10-09 12:43 UTC (permalink / raw
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

When I start emacs it only evaluates about a half of my ~/.emacs.  I
could locate the line after which loading is stopped.  I tried emacs
--daemon three times in a row (always killing the former) and the
problem and the line where loading stops were always the same.

--8<---------------cut here---------------start------------->8---
(add-hook 'rcirc-print-hooks 'th-rcirc-notification)

;; save the logs when emacs exits
(add-hook 'kill-emacs-hook 'rcirc-log-write)  ;; <= This line is evaled

;; Colors for the nicks
(require 'rcirc-color)

;; THE FOLLOWING LINES AREN'T EVALED BY EMACS --DAEMON

(defun th-rcirc-mode-init ()
  (unless rcirc-omit-mode
    (rcirc-omit-mode)))

(add-hook 'rcirc-mode-hook 'th-rcirc-mode-init)

;; Fix corrected typos "s/foO/foo"
(require 'rcirc-late-fix)
--8<---------------cut here---------------end--------------->8---

So it seems that rcirc-color.el contains code that stops emacs --daemon
from processing any further.  So I visited that file, which starts with
the usual GPL copyright comment followed by

--8<---------------cut here---------------start------------->8---
;;; Code:

(require 'rcirc)

(defvar rcirc-colors
  (if (fboundp 'color-distance)
      (let ((min-distance (* 0.23 (color-distance "black" "white")))
	    (bg (face-background 'default))
	    (fg (face-foreground 'rcirc-my-nick))
	    candidates)
	(dolist (item color-name-rgb-alist)
	  (let ((color (car item)))
	    (when (and (not (color-gray-p color))
		       (> (color-distance color bg) min-distance)
		       (> (color-distance color fg) min-distance))
	      (setq candidates (cons color candidates)))))
	candidates)
    (delete (face-background 'default) (defined-colors)))
  "Colors to use for nicks in rcirc.
By default, all the non-grey colors that are very different from
the default background are candidates.  The minimum
color-distance is half the distance between black and red as
computed by `color-distance'.

To check out the list, evaluate (list-colors-display rcirc-colors).")
--8<---------------cut here---------------end--------------->8---

This first `defvar' is not evaluated.  The variable is unknown to my
emacs started with --daemon...

In my .emacs I required rcirc before requiring rcirc-color.  Can it be
that this double require breaks emacs --daemon?

If I start emacs with just "emacs", the whole .emacs is loaded.  My
emacs was updated this morning.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.14.3)
 of 2008-10-09 on baldur
Windowing system distributor `The X.Org Foundation', version 11.0.10501000
configured using `configure  '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-freetype' '--with-xft' '--with-libotf' '--with-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--with-gpm' '--with-dbus' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=i686 -mtune=prescott -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  rcirc-track-minor-mode: t
  partial-completion-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  iswitchb-mode: t
  window-number-meta-mode: t
  window-number-mode: t
  savehist-mode: t
  exec-abbrev-cmd-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-h k C-c ` C-h v r c <tab> t r <tab> c <tab> m <backspace> 
<tab> <tab> - m <tab> <return> M-x g <return> <return> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <up> <return> y SPC SPC SPC SPC SPC c <up> <up> 
<up> <up> <up> <return> B <backspace> y q M-x t b m 
<return> <return> M-x t b m <return> <return> <return> 
SPC c <return> c l s M-x r e b <return> <return>

Recent messages:
20081009T142857.748> No more unread articles
20081009T142857.859> Exiting summary buffer and applying spam rules
20081009T142857.880> No more unread newsgroups
Saving file /home/horn/repos/configs/dot-bbdb...
Wrote /home/horn/repos/configs/dot-bbdb
(No changes need to be saved)
20081009T142900.446> Saving /home/horn/.newsrc.eld...
Saving file /home/horn/.newsrc.eld...
Wrote /home/horn/.newsrc.eld
20081009T142900.494> Saving /home/horn/.newsrc.eld...done






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

* bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs
  2008-10-09 12:43 bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs Tassilo Horn
@ 2008-10-09 17:12 ` Dan Nicolaescu
  2008-10-09 19:29   ` Tassilo Horn
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Nicolaescu @ 2008-10-09 17:12 UTC (permalink / raw
  To: Tassilo Horn; +Cc: 1129

Tassilo Horn <thorn@fastmail.fm> writes:

  > ;;; Code:
  > 
  > (require 'rcirc)
  > 
  > (defvar rcirc-colors
  >   (if (fboundp 'color-distance)
  >       (let ((min-distance (* 0.23 (color-distance "black" "white")))
  > 	    (bg (face-background 'default))
  > 	    (fg (face-foreground 'rcirc-my-nick))
  > 	    candidates)
  > 	(dolist (item color-name-rgb-alist)
  > 	  (let ((color (car item)))
  > 	    (when (and (not (color-gray-p color))
  > 		       (> (color-distance color bg) min-distance)
  > 		       (> (color-distance color fg) min-distance))
  > 	      (setq candidates (cons color candidates)))))
  > 	candidates)
  >     (delete (face-background 'default) (defined-colors)))
  >   "Colors to use for nicks in rcirc.
  > By default, all the non-grey colors that are very different from
  > the default background are candidates.  The minimum
  > color-distance is half the distance between black and red as
  > computed by `color-distance'.
  > 
  > To check out the list, evaluate (list-colors-display rcirc-colors).")
  > 
  > This first `defvar' is not evaluated.  The variable is unknown to my
  > emacs started with --daemon...
  > 
  > In my .emacs I required rcirc before requiring rcirc-color.  Can it be
  > that this double require breaks emacs --daemon?

Doubtful.  Please look at the *Messages* buffer, it should have a
warning that loading .emacs failed.  Maybe that warning can help you pin
point what the problem is.






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

* bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs
  2008-10-09 17:12 ` Dan Nicolaescu
@ 2008-10-09 19:29   ` Tassilo Horn
  2008-10-09 20:06     ` Dan Nicolaescu
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2008-10-09 19:29 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: 1129

Dan Nicolaescu <dann@ics.uci.edu> writes:

Hi Dan,

>   > In my .emacs I required rcirc before requiring rcirc-color.  Can it be
>   > that this double require breaks emacs --daemon?
>
> Doubtful.  Please look at the *Messages* buffer, it should have a
> warning that loading .emacs failed.  Maybe that warning can help you
> pin point what the problem is.

No, too bad.  There's no warning and these are the only contents:

--8<---------------cut here---------------start------------->8---
("emacs")
Loading /usr/share/emacs/site-lisp/site-gentoo.el (source)...
"/usr/share/emacs/site-lisp/cedet/common/" added to `load-path'
Setting up cedet...
Source file `/usr/share/emacs/site-lisp/cedet/common/cedet-compat.el' newer than byte-compiled file
Setting up cedet...done
Setting up cogre...done
Setting up ede...
Source file `/usr/share/emacs/site-lisp/cedet/ede/ede-load.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/eieio/eieio-base.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/eieio/eieio-speedbar.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/eieio/eieio-custom.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/speedbar/speedbar.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/ede/ede-load.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/ede/ede-speedbar.el' newer than byte-compiled file
Setting up ede...done
Setting up eieio...done
Setting up semantic...
Source file `/usr/share/emacs/site-lisp/cedet/common/mode-local.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/semantic/semantic-ia-sb.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/common/working.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/semantic/semantic-sort.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/semantic/semanticdb.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/semantic/semanticdb-el.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/semantic/semantic-find.el' newer than byte-compiled file
Source file `/usr/share/emacs/site-lisp/cedet/semantic/semantic-scope.el' newer than byte-compiled file
Setting up semantic...done
Setting up speedbar...done
Setting up srecode...done
Setting up cedet-contrib...
Source file `/usr/share/emacs/site-lisp/cedet/contrib/cedet-contrib-load.el' newer than byte-compiled file
Setting up cedet-contrib...done
Loading /usr/share/emacs/site-lisp/site-gentoo.el (source)...done
Loading /home/horn/.emacs.d/filesets-cache.el (source)...done
Loading /home/horn/.recentf...done
Cleaning up the recentf list...done (0 removed)
OVERVIEW
Loading vc-git...done
OVERVIEW [3 times]
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Preparing diary...done
Source file `/usr/share/emacs/site-lisp/cedet/semantic/bovine/bovine-debug.el' newer than byte-compiled file
For information about GNU Emacs and the GNU system, type C-h C-a.
When done with this frame, type C-x 5 0
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo






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

* bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs
  2008-10-09 19:29   ` Tassilo Horn
@ 2008-10-09 20:06     ` Dan Nicolaescu
  2008-10-10  6:53       ` Tassilo Horn
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Nicolaescu @ 2008-10-09 20:06 UTC (permalink / raw
  To: Tassilo Horn; +Cc: 1129

Tassilo Horn <thorn@fastmail.fm> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > Hi Dan,
  > 
  > >   > In my .emacs I required rcirc before requiring rcirc-color.  Can it be
  > >   > that this double require breaks emacs --daemon?
  > >
  > > Doubtful.  Please look at the *Messages* buffer, it should have a
  > > warning that loading .emacs failed.  Maybe that warning can help you
  > > pin point what the problem is.
  > 
  > No, too bad.  There's no warning and these are the only contents:

Yeah, too bad.

The code you cited seems to have some issues:

(defvar rcirc-colors
  (if (fboundp 'color-distance)
      (let ((min-distance (* 0.23 (color-distance "black" "white")))
	    (bg (face-background 'default))
	    (fg (face-foreground 'rcirc-my-nick))
	    candidates)
	(dolist (item color-name-rgb-alist)
	  (let ((color (car item)))
	    (when (and (not (color-gray-p color))
		       (> (color-distance color bg) min-distance)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
                          This call uses the current frame when not
  passed one.  When this defvar is evaluated the current frame is not a
  frame that will ever be used for display, so this variable will not be
  initialized correctly.  This is also a problem for multi-tty. 
                       
		       (> (color-distance color fg) min-distance))
	      (setq candidates (cons color candidates)))))
	candidates)
    (delete (face-background 'default) (defined-colors)))
                                       ^^^^^^^^^^^^^^^^^^
                                       This has the same problem.

I am guessing that the above might be the cause of your problems. 






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

* bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs
  2008-10-09 20:06     ` Dan Nicolaescu
@ 2008-10-10  6:53       ` Tassilo Horn
  2008-10-10 10:09         ` Alex
  0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2008-10-10  6:53 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: kensanata, 1129

Dan Nicolaescu <dann@ics.uci.edu> writes:

Hi Dan, hi Alex!

@Alex: There's a problem with rcirc-color.el which makes it stop evaling
my ~/.emacs after (require 'rcirc-color).

> Yeah, too bad.
>
> The code you cited seems to have some issues:
>
> (defvar rcirc-colors
>   (if (fboundp 'color-distance)
>       (let ((min-distance (* 0.23 (color-distance "black" "white")))
> 	    (bg (face-background 'default))
> 	    (fg (face-foreground 'rcirc-my-nick))
> 	    candidates)
> 	(dolist (item color-name-rgb-alist)
> 	  (let ((color (car item)))
> 	    (when (and (not (color-gray-p color))
> 		       (> (color-distance color bg) min-distance)
>                           ^^^^^^^^^^^^^^^^^^^^^^^^^
>                           This call uses the current frame when not
>   passed one.  When this defvar is evaluated the current frame is not a
>   frame that will ever be used for display, so this variable will not be
>   initialized correctly.  This is also a problem for multi-tty. 
>                        
> 		       (> (color-distance color fg) min-distance))
> 	      (setq candidates (cons color candidates)))))
> 	candidates)
>     (delete (face-background 'default) (defined-colors)))
>                                        ^^^^^^^^^^^^^^^^^^
>                                        This has the same problem.
>
> I am guessing that the above might be the cause of your problems. 

Yes, you're right.  Commenting the (require 'rcirc-color) makes emacs
--daemon load all of my ~/.emacs.

Do you have an idea how the code above could be fixed for emacs
--daemon?

Bye,
Tassilo
-- 
Richard Stallman can touch MC Hammer






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

* bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs
  2008-10-10  6:53       ` Tassilo Horn
@ 2008-10-10 10:09         ` Alex
  0 siblings, 0 replies; 6+ messages in thread
From: Alex @ 2008-10-10 10:09 UTC (permalink / raw
  To: Tassilo Horn; +Cc: Dan Nicolaescu, 1129

This particular piece of code can be changed. For my Pink Bliss theme,
for example, I use the code below. All we need is a generic
implementation. :)

(defvar pink-bliss-foreground-colors
  (let ((candidates)
	;; (red-limit #xe000)
	(green-limit #xed00)
	(both-limit #xa000))
    (dolist (item color-name-rgb-alist)
      (destructuring-bind (color red green blue) item
	(when (and (not (color-gray-p color))
		   ;; (< red red-limit)
		   (< green green-limit)
		   (not (and (> red both-limit)
			     (> green both-limit))))
	  (setq candidates (cons color candidates)))))
    candidates)
  "Colors to use for nicks in rcirc, for example.

To check out the list, evaluate
\(list-colors-display pink-bliss-foreground-colors).")






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

end of thread, other threads:[~2008-10-10 10:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 12:43 bug#1129: 23.0.60; emacs --daemon loads only one half of my ~/.emacs Tassilo Horn
2008-10-09 17:12 ` Dan Nicolaescu
2008-10-09 19:29   ` Tassilo Horn
2008-10-09 20:06     ` Dan Nicolaescu
2008-10-10  6:53       ` Tassilo Horn
2008-10-10 10:09         ` Alex

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.