================================================================
Dear Bug Team!
desktop.el, supplied as part of edit-utils package has a bug when
trying to save and restore dired buffers. When you exit XEmacs and
then restart it loading .emacs will fail in loading desktop
complaining with the following stack. See below the stack for more
details:
--
(1) (initialization/error) An error has occurred while loading
/home/kaarthik/.xemacs/init.el:
Wrong type argument: stringp, nil
Backtrace follows:
file-name-absolute-p(nil)
# bind (locals desktop-buffer-misc ro mk pt mim desktop-buffer-major-mode
desktop-buffer-name desktop-buffer-file-name ver)
desktop-create-buffer(205 nil "gnus" dired-mode (line-number-mode
column-number-mode pending-delete-mode filladapt-mode eldoc-mode dired-sort-mode) 217 (nil
nil) t ("/home/kaarthik/.xemacs/gnus/") ((case-fold-search)))
# bind (current-load-list)
# (unwind-protect ...)
# bind (load-file-name)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
(load-internal "[internal]")
load-internal("/home/kaarthik/.emacs.desktop" t t t raw-text)
# bind (path handler filename nosuffix nomessage noerror file)
load("/home/kaarthik/.emacs.desktop" t t t)
# bind (desktop-last-buffer dirs)
desktop-read()
# bind (current-load-list)
# (unwind-protect ...)
# bind (load-file-name)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
# (unwind-protect ...)
(load-internal "[internal]")
load-internal("/home/kaarthik/.xemacs/init.el" t t t raw-text)
# bind (path handler filename nosuffix nomessage noerror file)
load("/home/kaarthik/.xemacs/init.el" t t t)
load-user-init-file()
#<compiled-function nil "...(10)" [init-file-had-error
load-user-init-file-p load-user-init-file nil] 2>()
# (unwind-protect ...)
call-with-condition-handler(#<compiled-function (__load_init_file_arg__)
"...(26)" [init-file-had-error user-init-file __load_init_file_arg__ errstr
error-message-string message "Error in init file: %s" lwarn initialization error
"An error has occurred while loading %s:\n\n%s\n\nBacktrace follows:\n\n%s\n\nTo
ensure normal operation, you should investigate the cause of the error\nin your
initialization file and remove it. Use the `-debug-init' option\nto XEmacs to enter
the debugger when the error occurs and investigate the\nexact problem."
backtrace-in-condition-handler-eliminating-handler t] 8> #<compiled-function nil
"...(10)" [init-file-had-error load-user-init-file-p load-user-init-file nil]
2>)
# (condition-case ... . ((error)))
# bind (debug-on-error debug-on-error-from-init-file debug-on-error-should-be-set
debug-on-error-initial)
load-init-file()
# bind (command-line-args-left)
command-line()
# (condition-case ... . ((t (byte-code " Â" [error-data data nil] 1))))
# bind (error-data)
normal-top-level()
# (condition-case ... . error)
# (catch top-level ...)
--
A dired buffer stores itself in .emacs.desktop as:
,----[ .emacs.desktop ]
| (desktop-create-buffer 205
| nil
| "gnus"
| 'dired-mode
| '(line-number-mode column-number-mode pending-delete-mode filladapt-mode
eldoc-mode dired-sort-mode)
| 217
| '(nil nil)
| t
| '("/home/kaarthik/.xemacs/gnus/")
| '((case-fold-search)))
`----
Note the second argument is 'nil'. The second argument to
desktop-create-buffer is buffer-file-name, which for dired buffers is
nil. In desktop-create-buffer this happens at the top:
,----[ desktop.el:lines 705-708 ]
| (if (not (file-name-absolute-p desktop-buffer-file-name))
| (setq desktop-buffer-file-name
| (expand-file-name desktop-buffer-file-name desktop-dirname)))
`----
'nil' is passed to file-name-absolute-p, which complains. desktop-save
does this to get that value:
,----[ desktop.el:lines 500-504 ]
| (let ((bn (buffer-file-name)))
| (if bn
| (if desktop-relative-file-names
| (file-relative-name bn dirname)
| bn)))
`----
The correct solution would be to make desktop-save write out the
entire path of the directory that the buffer is looking at. I am not
sure if a function exists for this purpose.
Thanks..
================================================================
System Info to help track down your bug:
---------------------------------------
uname -a: FreeBSD the-saint 4.7-STABLE FreeBSD 4.7-STABLE #0: Wed May 7 22:47:54 EDT 2003
kaarthik@the-saint:/usr/src/sys/compile/THE-SAINT i386
./configure '--site-includes=/usr/local/include'
'--site-libraries=/usr/local/lib' '--with-database=no'
'--with-dialogs=athena' '--with-widgets=athena' '--with-athena=3d'
'--pdump' '--with-pop' '--with-xface'
XEmacs 21.5-b14 "cassava" (+CVS-20030713) configured for
`i386-unknown-freebsd4.7'.
Compilation / Installation:
Source code location: /usr/home/programs/xemacs/xemacs-21.5
Installation prefix: /usr/local
Additional header files: /usr/local/include
Additional libraries: /usr/local/lib
Runtime library search path: /usr/local/lib:/usr/X11R6/lib
Operating system description file: `s/freebsd.h'
Machine description file: `m/intel386.h'
Compiler: gcc -Wall -Wno-switch -Winline -Wmissing-prototypes
-Wsign-compare -Wundef -Wstrict-prototypes -Wshadow -Wmissing-declarations -Wpointer-arith
-g -O3
Relocating allocator for buffers: yes
GNU version of malloc: yes
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Compiling in support for the Athena widget set:
- Athena headers location: X11/Xaw3d
- Athena library to link: Xaw3d
Using Lucid menubars.
Using Lucid scrollbars.
Using Athena dialog boxes.
Using Athena native widgets.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Compiling in support for X-Face message headers.
Sound:
Compiling in support for sound (native).
Databases:
Internationalization:
Mail:
Compiling in support for POP mail retrieval.
Compiling in support for "flock" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Using the new portable dumper.
Compiling in support for extra debugging code.
WARNING: ---------------------------------------------------------
WARNING: Compiling in support for runtime error checking.
WARNING: XEmacs will run noticeably more slowly as a result.
WARNING: Error checking is on by default for XEmacs beta releases.
WARNING: ---------------------------------------------------------
Load-Path Lisp Shadows:
----------------------
(/home/kaarthik/.xemacs/elisp/ps-print/lisp/ps-print
/usr/local/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print
/home/kaarthik/.xemacs/elisp/ps-print/lisp/ps-mule
/usr/local/lib/xemacs/xemacs-packages/lisp/ps-print/ps-mule
/home/kaarthik/.xemacs/elisp/ps-print/lisp/ps-bdf
/usr/local/lib/xemacs/xemacs-packages/lisp/ps-print/ps-bdf
/home/kaarthik/.xemacs/elisp/cparse/sformat
/usr/local/lib/xemacs/xemacs-packages/lisp/semantic/sformat
/home/kaarthik/.xemacs/elisp/newcomment
/home/programs/xemacs/xemacs-21.5/lisp/newcomment
/usr/local/lib/xemacs/xemacs-packages/lisp/build/build-report
/home/programs/xemacs/xemacs-21.5/lisp/build-report)
Installed XEmacs Packages:
-------------------------
((zenirc:version 1.13 :type regular)
(xslt-process :version 1.11 :type regular)
(xslide :version 1.07 :type regular)
(xemacs-devel :version 1.55 :type single-file)
(xemacs-base :version 1.78 :type regular)
(x-symbol :version 1.05 :type regular)
(w3 :version 1.28 :type regular)
(vm :version 7.14 :type regular)
(viper :version 1.36 :type regular)
(view-process :version 1.12 :type regular)
(vhdl :version 1.17 :type regular)
(vc-cc :version 1.21 :type regular)
(vc :version 1.37 :type regular)
(tramp :version 1.15 :type regular)
(tpu :version 1.12 :type regular)
(tooltalk :version 1.13 :type regular)
(tm :version 1.36 :type regular)
(time :version 1.13 :type regular)
(textools :version 1.14 :type regular)
(text-modes :version 1.61 :type single-file)
(texinfo :version 1.24 :type regular)
(supercite :version 1.19 :type regular)
(strokes :version 1.08 :type regular)
(speedbar :version 1.26 :type regular)
(sounds-wav :version 1.1 :type regular)
(sounds-au :version 1.1 :type regular)
(sml-mode :version 0.09 :type regular)
(slider :version 1.13 :type regular)
(sieve :version 1.13 :type regular)
(sh-script :version 1.17 :type regular)
(sgml :version 1.08 :type regular)
(semantic :version 1.17 :type regular)
(scheme :version 1.13 :type regular)
(sasl :version 1.13 :type regular)
(ruby-modes :version 1.01 :type regular)
(rmail :version 1.13 :type regular)
(reftex :version 1.28 :type regular)
(python-modes :version 1.02 :type single-file)
(psgml-dtds :version 1.02 :type regular)
(psgml :version 1.4 :type regular)
(ps-print :version 1.08 :type regular)
(prog-modes
:version
1
.79
:type
single-file)
(pgg :version 1.03 :type regular)
(perl-modes :version 1.04 :type single-file)
(pcomplete :version 1.02 :type regular)
(pcl-cvs :version 1.64 :type regular)
(pc :version 1.25 :type single-file)
(os-utils :version 1.31 :type single-file)
(ocaml :version 0.04 :type regular)
(net-utils :version 1.32 :type single-file)
(mmm-mode :version 1.0 :type regular)
(misc-games :version 1.16 :type single-file)
(mine :version 1.14 :type regular)
(mh-e :version 1.23 :type regular)
(mew :version 1.17 :type regular)
(mailcrypt :version 2.12 :type regular)
(mail-lib :version 1.59 :type regular)
(liece :version 1.12 :type regular)
(jde :version 1.45 :type regular)
(ispell :version 1.24 :type regular)
(ilisp :version 1.32 :type regular)
(igrep :version 1.1 :type regular)
(idlwave :version 1.28 :type regular)
(ibuffer :version 1.08 :type regular)
(hm--html-menus :version 1.21 :type regular)
(haskell-mode :version 1.05 :type regular)
(gnus :version 1.71 :type regular)
(gnats :version 1.15 :type regular)
(games :version 1.14 :type regular)
(fsf-compat :version 1.12 :type single-file)
(frame-icon :version 1.09 :type regular)
(fortran-modes :version 1.02 :type single-file)
(forms :version 1.14 :type regular)
(footnote :version 1.15 :type regular)
(eudc :version 1.38 :type regular)
(eterm :version 1.13 :type regular)
(ess :version 1.04 :type regular)
(eshell :version 1.05 :type regular)
(emerge :version 1.09 :type regular)
(elib :version 1.1 :type single-file)
(eieio :version 1.04 :type regular)
(efs :version 1.29 :type regular)
(edt :version 1.12 :type regular)
(edit-utils :version 2.02 :type single-file)
(ediff :version 1.47 :type regular)
(edebug :version 1.18 :type regular)
(ecrypto :version 0.13 :type regular)
(ecb :version 1.08 :type regular)
(docbookide :version 0.06 :type regular)
(dired :version 1.13 :type regular)
(dictionary :version 1.12 :type regular)
(debug :version 1.16 :type regular)
(crisp :version 1.12 :type regular)
(cookie :version 1.14 :type regular)
(clearcase :version 1.06 :type regular)
(cc-mode :version 1.33 :type regular)
(calendar :version 1.19 :type regular)
(calc :version 1.23 :type regular)
(c-support :version 1.16 :type single-file)
(build :version 1.1 :type regular)
(bbdb :version 1.23 :type regular)
(auctex :version 1.35 :type regular)
(apel :version 1.26 :type regular)
(ada :version 1.13 :type regular))
Installed Modules:
-----------------
Features:
--------
(xemacsbug shadow time-stamp bbdb-gui gnus-uu gnus-fun bbdb-hooks sort
gnus-cite smiley annotations gnus-async gnus-bcklg gnus-dup gnus-ml
mailcrypt disp-table gnus-topic pop3 byte-optimize bytecomp
byte-compile nndraft nnmh bbdb-gnus bbdb-snarf mail-extr nnagent nnml
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 pgg pgg-parse pgg-def mm-view gnus-sum gnus-group
gnus-undo nntp nnoo nnmail mail-source format-spec gnus-cache
gnus-start gnus-spec gnus-int gnus-range message mml mml-sec mml-smime
smime dig mm-decode mm-bodies mm-encode mailcap lpr mail-parse rfc2045
rfc2231 rfc2047 qp ietf-drums mailheader canlock balloon-help
blink-cursor lazy-lock blink-paren eldoc hide-copyleft efs-cu desktop
compile browse-kill-ring infobook info twiddle find-func eval-expr
ffap facemenu vc-hooks ishl flyspell ispell filladapt pending-del
crypt crypt++ gnus-win gnus gnus-ems gnus-xmas messagexmas nnheader
nnheaderxm gnus-util netrc time-date parse-time mail-utils mm-util
mail-prsvr wid-edit footnote term ehelp electric bufcomp light
folding-isearch folding overlay power-macros edmacro advice
advice-preload uniquify savehist redo recent-files paren mic-paren
timer icomplete func-menu detached-minibuf backup-dir gdb
debug-toolbar shell comint ring cal-desk-calendar lunar solar cal-dst
cal-persia cal-julian diary-lib calendar xcscope ctypes font-lock
xemacs-font-lock-fix cus-face bbdb-w3 browse-url bbdb-com mail-abbrevs
sendmail rfc822 bbdb timezone tex-toolbar tex-site mwheel gnuserv
zenirc-autoloads xslt-process-autoloads xslide-autoloads
xemacs-devel-autoloads xemacs-base-autoloads x-symbol-autoloads
w3-autoloads vm-autoloads viper-autoloads view-process-autoloads
vhdl-autoloads vc-cc-autoloads vc-autoloads tramp-autoloads
tpu-autoloads tooltalk-autoloads tm-autoloads time-autoloads
textools-autoloads text-modes-autoloads texinfo-autoloads
supercite-autoloads strokes-autoloads speedbar-autoloads
sounds-wav-autoloads sounds-au-autoloads sml-mode-autoloads
slider-autoloads sieve-autoloads sh-script-autoloads sgml-autoloads
semantic-autoloads scheme-autoloads sasl-autoloads
ruby-modes-autoloads rmail-autoloads reftex-autoloads
python-modes-autoloads psgml-dtds-autoloads psgml-autoloads
ps-print-autoloads prog-modes-autoloads pgg-autoloads
perl-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads ocaml-autoloads net-utils-autoloads
mmm-mode-autoloads misc-games-autoloads mine-autoloads mh-e-autoloads
mew-autoloads mailcrypt-autoloads mail-lib-autoloads liece-autoloads
jde-autoloads ispell-autoloads ilisp-autoloads igrep-autoloads
idlwave-autoloads ibuffer-autoloads hm--html-menus-autoloads
haskell-mode-autoloads gnus-autoloads gnats-autoloads games-autoloads
fsf-compat-autoloads frame-icon-autoloads fortran-modes-autoloads
forms-autoloads footnote-autoloads eudc-autoloads eterm-autoloads
ess-autoloads eshell-autoloads emerge-autoloads elib-autoloads
eieio-autoloads efs-autoloads edt-autoloads edit-utils-autoloads
ediff-autoloads edebug-autoloads ecrypto-autoloads ecb-autoloads
docbookide-autoloads dired-autoloads dictionary-autoloads
debug-autoloads crisp-autoloads cookie-autoloads clearcase-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads ada-autoloads modules-autoloads auto-autoloads loadhist
rsz-minibuf auto-show fontl-hooks x-iso8859-1 code-cmds gutter-items
menubar-items x-menubar mode-motion mouse behavior itimer auto-save
lisp-mode easymenu iso8859-1 page buff-menu lib-complete cus-file
derived newcomment env text-props frame obsolete cus-start custom
widget cl-extra mini-cl cl cl-19 packages backquote unicode
lucid-scrollbars cut-buffer lucid-menubars athena-dialogs x
c-balloon-help tty-frames tty toolbar native-sound scrollbar
unix-processes multicast network-streams subprocesses modules
menu-accelerator-support menubar md5 xemacs gutter tiff png gif jpeg
xface xpm xbm lisp-float-type file-coding berkeley-unix dialog devices
window-system base64)
Recent keystrokes:
-----------------
f3 y SPC n SPC n SPC SPC SPC SPC SPC SPC SPC SPC SPC
E q n SPC n SPC n n n n n q s M-x r e p o r t - x e
m TAB RET
Recent messages (most recent first):
-----------------------------------
Starting new Ispell process...
Fontifying *mail to XEmacs Beta*... done.
Parsing /home/kaarthik/.mailrc... done
Fontifying *mail to XEmacs Beta*...
Parsing /home/kaarthik/.mail_aliases... done
Parsing /home/kaarthik/.mail_aliases...
Parsing /home/kaarthik/.mailrc...
Loading xemacsbug...done
Loading xemacsbug...
Saving /home/kaarthik/.newsrc.eld...done
Wrote /home/kaarthik/.newsrc.eld
Loading time-stamp...done
Loading time-stamp...
Saving /home/kaarthik/.newsrc.eld...
Your contact with the exterior world is gone
Deleting article /home/kaarthik/MyMail/list/kde-freebsd/166 in list.kde-freebsd...
Deleting article /home/kaarthik/MyMail/list/kde-freebsd/165 in list.kde-freebsd...
Deleting article /home/kaarthik/MyMail/list/kde-freebsd/164 in list.kde-freebsd...
Deleting article /home/kaarthik/MyMail/list/kde-freebsd/163 in list.kde-freebsd...
Deleting article /home/kaarthik/MyMail/list/kde-freebsd/162 in list.kde-freebsd...