Subject: bug#16884: 24.3.50; desktop-read should not die on non-existing directories

From: Sam Steingold <[email-masked]>
Date: Tue, 25 Feb 2014 14:06:22 -0500

In GNU Emacs 24.3.50.6 (x86_64-apple-darwin13.1.0, NS apple-appkit-1265.19)
 of 2014-02-25 on sds-MacBook-Pro.local
Windowing system distributor `Apple', version 10.3.1265
Configured using:
 `configure --with-ns'

when restarting emacs I just got this:

Debugger entered--Lisp error: (file-error "Reading directory" "no such file or directory" "/Users/sds/.emacs.d/auto-saves/*")
  access-file("/Users/sds/.emacs.d/auto-saves/*" "Reading directory")
  insert-directory("/Users/sds/.emacs.d/auto-saves/*" "-als" t nil)
  dired-insert-directory("/Users/sds/.emacs.d/auto-saves/*" "-als" nil t t)
  dired-readin-insert()
  dired-readin()
  dired-internal-noselect("/Users/sds/.emacs.d/auto-saves/*" nil)
  dired-noselect("/Users/sds/.emacs.d/auto-saves/*" nil)
  dired("/Users/sds/.emacs.d/auto-saves/*")
  dired-restore-desktop-buffer(nil "*" ("/Users/sds/.emacs.d/auto-saves/*"))
  #[0 "\f\236A\206\305\300\301\302#\207" [nil "*" ("/Users/sds/.emacs.d/auto-saves/*") desktop-buffer-major-mode desktop-buffer-mode-handlers desktop-restore-file-buffer] 4 "\n\n(fn)"]()
  funcall(#[0 "\f\236A\206\305\300\301\302#\207" [nil "*" ("/Users/sds/.emacs.d/auto-saves/*") desktop-buffer-major-mode desktop-buffer-mode-handlers desktop-restore-file-buffer] 4 "\n\n(fn)"])
  desktop-create-buffer(206 nil "*" dired-mode (rcirc-track-minor-mode) 288 (nil nil) t ("/Users/sds/.emacs.d/auto-saves/*") nil)
  eval-buffer(#<buffer  *load*> nil "/Users/sds/.emacs.d/.emacs.desktop" nil t)  ; Reading at buffer position 8688
  load-with-code-conversion("/Users/sds/.emacs.d/.emacs.desktop" "/Users/sds/.emacs.d/.emacs.desktop" t t)
  load("/Users/sds/.emacs.d/.emacs.desktop" t t t)
  desktop-read()
  #[0 "\303\211\235\203\304\"\301\305!\210\210	\205\306 \210\307\211\207" [command-line-args desktop-save-mode inhibit-startup-screen "--no-desktop" delete 0 desktop-read t] 4 "\n\n(fn)"]()
  run-hooks(after-init-hook)
  command-line()
  normal-top-level()

because I did M-x recover-session RET in the previous incarnation.
I think this error should be caught and either ignored or reported as a message.

Important settings:
  value of $LANG: C
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  rcirc-track-minor-mode: t
  which-function-mode: t
  url-handler-mode: t
  show-paren-mode: t
  desktop-save-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  abbrev-mode: t

Recent messages:
Running git --no-pager update-index --refresh . in background...
ls does not support --dired; see `dired-use-ls-dired' for more details.
Mark set [12 times]
Desktop: File "/Users/sds/Magnetic/lifespan24/2014-Feb/search-freq-hist.png" no longer exists.
Entering debugger...
Running git --no-pager update-index --refresh . in background... done
Running git --no-pager diff-index --relative -z -M HEAD -- . in background... done
Running git --no-pager ls-files -z -o --directory --no-empty-directory --exclude-standard -- . in background... done
<wheel-right> is undefined
Scanning for dabbrevs...done

Load-path shadows:
None found.

Features:
(shadow sort bbdb-message mailalias cookie1 mail-extr gnus-msg gnus-art
mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap gnus-sum
nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec
gnus-int gnus-range gnus-win dabbrev emacsbug message cl-macs gv rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums help-mode debug
image-mode goto-addr vc-hg dired-aux dired vc-dir ewoc vc vc-dispatcher
sql view vc-git edit-server-autoloads package midnight warnings gnus
gnus-ems nnheader mail-utils wid-edit bbdb-mua bbdb-com crm mailabbrev
bbdb-loaddefs bbdb bbdb-site timezone rcirc server which-func imenu
url-handlers url-parse auth-source eieio byte-opt bytecomp byte-compile
cconv eieio-core gnus-util mm-util mail-prsvr password-cache url-vars
paren help-at-pt desktop frameset cus-start cus-load ido ess-toolbar
ess-mouse mouseme thingatpt browse-url ess-menu ess-swv ess-noweb
ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d ess-sas-l
ess-sas-a shell pcomplete ess-sta-d ess-sta-l cc-vars cc-defs
make-regexp ess-sp6-d ess-sp3-d ess-julia ess-r-d compile ess-tracebug
format-spec ess-roxy advice hideshow ess-help ess-developer ess-r-args
eldoc help-fns ess-s-l ess ess-inf comint ansi-color ring ess-mode
ess-noweb-mode ess-utils ess-custom executable easymenu ess-compat
ess-site cl cl-loaddefs cl-lib time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode
register page menu-bar rfn-eshadow timer select scroll-bar 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
cocoa ns multi-tty emacs)

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1265
http://www.childpsy.net/ http://dhimmi.com http://pmw.org.il
http://think-israel.org http://honestreporting.com http://ffii.org
(let ((a "(let ((a %c%s%c)) (format a 34 a 34))")) (format a 34 a 34))