From xemacs-m  Tue Jul 29 12:22:19 1997
Received: from dolphin.automatrix.com (dolphin.automatrix.com [198.69.29.254])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id MAA01653
	for <xemacs-beta@xemacs.org>; Tue, 29 Jul 1997 12:22:17 -0500 (CDT)
Received: (from skip@localhost) by dolphin.automatrix.com (8.8.5/8.8.3) id NAA20483; Tue, 29 Jul 1997 13:22:20 -0400 (EDT)
Date: Tue, 29 Jul 1997 13:22:20 -0400 (EDT)
Message-Id: <199707291722.NAA20483@dolphin.automatrix.com>
From: Skip Montanaro <skip@automatrix.com>
To: xemacs-beta@xemacs.org
Subject: option saves fail if ~/.xemacs doesn't exist?

In XEmacs 20.3 "Berlin" [Lucid] (i386-pc-bsdi2.1) of Tue Jul 29 1997 on dolphin.automatrix.com

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

When I tried to send my previous bug report just now about forms-mode
I was trying to execute in a "barren" environment.  Consequently, I
didn't have a ~/.xemacs directory.  When I hit C-c C-c to send, it
prompted me for my email address, then asked if I wanted to save it.
I replied with "y".  It then churned for a moment and complained that
/home/dolphin/skip/.xemacs was not a directory and generated a
*Backtrace* buffer.  Seems to me it should check for ~/.xemacs and
create it if necessary in (custom-save-all) before trying to write out 
the options.el file.

-- 
Skip Montanaro     | Musi-Cal Express - get your own private Musi-Cal
skip@calendar.com  | domain name! http://concerts.calendar.com/express.shtml
(518)372-5583      | WebFast - http://www.webfast.com/



Recent input:
C-c C-f C-t C-c C-c M-f M-f M-b M-d C-d RET y C-x 1 
C-c C-c q C-x k RET C-x m x e C-x k RET ESC x r e p 
o r t - x e m TAB RET M a i l SPC s e n d i n M-DEL 
M-DEL o p t i o n SPC s a v e s SPC f a i l SPC i f 
SPC ~ / . x e m a c s SPC d o e s n ' t SPC e x i s 
t ? RET

Recent messages:
Sending...
Save address for future sessions? (y or n) 
Save address for future sessions? (y or n) Yes
Loading disp-table...
Loading disp-table...done
Use M-x make-dir RET RET to create the directory
/home/dolphin/skip/.xemacs/ is not a directory
Sending...
Sending...done
Buffer is read-only: #<buffer "forms-d2.el">

Stack trace:

  # bind (standard-output stack-trace-on-signal debug-on-signal stack-trace-on-error debug-on-error)
  signal(error ("/home/dolphin/skip/.xemacs/ is not a directory"))
  # bind (args)
  cerror("%s is not a directory" "/home/dolphin/skip/.xemacs/")
  apply(cerror ("%s is not a directory" "/home/dolphin/skip/.xemacs/"))
  # bind (args)
  error("%s is not a directory" "/home/dolphin/skip/.xemacs/")
  # bind (dir setmodes tempsetmodes)
  basic-save-buffer-1()
  # bind (hooks after-save-hook local-write-file-hooks write-contents-hooks write-file-hooks done)
  # (unwind-protect ...)
  # bind (recent-save)
  # (unwind-protect ...)
  basic-save-buffer()
  # bind (modp large make-backup-files args)
  save-buffer()
  # (unwind-protect ...)
  (save-excursion (set-buffer (find-file-noselect custom-file)) (save-buffer))
)
  # bind (inhibit-read-only)
  (let ((inhibit-read-only t)) (custom-save-variables) (custom-save-faces) (save-excursion (set-buffer ...) (save-buffer)))
)
  custom-save-all()
  (progn (put (quote user-mail-address) (quote saved-value) (list user-mail-address)) (put (quote query-user-mail-address) (quote saved-value) (quote ...)) (require (quote cus-edit)) (custom-save-all))
)
  (if (y-or-n-p "Save address for future sessions? ") (progn (put ... ... ...) (put ... ... ...) (require ...) (custom-save-all)))
)
  (when (y-or-n-p "Save address for future sessions? ") (put (quote user-mail-address) (quote saved-value) (list user-mail-address)) (put (quote query-user-mail-address) (quote saved-value) (quote ...)) (require (quote cus-edit)) (custom-save-all))
)
  # bind (addr)
  (let ((addr ...)) (setq user-mail-address (read-string "Your mail address? " ...)) (setq query-user-mail-address nil) (when (y-or-n-p "Save address for future sessions? ") (put ... ... ...) (put ... ... ...) (require ...) (custom-save-all)))
)
  (progn (let (...) (setq user-mail-address ...) (setq query-user-mail-address nil) (when ... ... ... ... ...)))
)
  (if (and (not noninteractive) query-user-mail-address) (progn (let ... ... ... ...)))
)
  (when (and (not noninteractive) query-user-mail-address) (let (...) (setq user-mail-address ...) (setq query-user-mail-address nil) (when ... ... ... ... ...)))
)
  user-mail-address()
  (let* ((login ...) (fullname ...)) (cond (... ... ... ...) (... ... ... ...) (... ...)))
)
  (if (not (re-search-forward "^From:" delimline t)) (let* (... ...) (cond ... ... ...)))
)
  # bind (case-fold-search)
  (let ((case-fold-search t)) (goto-char (point-min)) (while (re-search-forward "^Resent-to:" delimline t) (setq resend-to-addresses ...)) (goto-char (point-min)) (if (re-search-forward "^Subject:\\([ 	]*\n\\)+\\b" delimline t) (replace-match "")) (goto-char (point-min)) (if (not ...) (let* ... ...)) (goto-char (1+ delimline)) (if (eval mail-mailer-swallows-blank-line) (newline)) (goto-char (point-min)) (if (re-search-forward "^FCC:" delimline t) (mail-do-fcc delimline)) (if mail-interactive (save-excursion ... ...)))
)
  # (unwind-protect ...)
  (save-excursion (set-buffer tembuf) (erase-buffer) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= ... ?\n) (insert ?\n)) (goto-char (point-min)) (re-search-forward (concat "^" ... "\n")) (replace-match "\n") (backward-char 1) (setq delimline (point-marker)) (while (and ... ...) (replace-match "\n")) (let (...) (goto-char ...) (while ... ...) (goto-char ...) (if ... ...) (goto-char ...) (if ... ...) (goto-char ...) (if ... ...) (goto-char ...) (if ... ...) (if mail-interactive ...)) (let (...) (apply ... ...)) (if mail-interactive (save-excursion ... ... ... ...)))
)
  # (unwind-protect ...)
  (unwind-protect (save-excursion (set-buffer tembuf) (erase-buffer) (insert-buffer-substring mailbuf) (goto-char ...) (or ... ...) (goto-char ...) (re-search-forward ...) (replace-match "\n") (backward-char 1) (setq delimline ...) (while ... ...) (let ... ... ... ... ... ... ... ... ... ... ... ...) (let ... ...) (if mail-interactive ...)) (kill-buffer tembuf) (if (bufferp errbuf) (kill-buffer errbuf)))
)
  # bind (mailbuf delimline resend-to-addresses case-fold-search tembuf errbuf)
  (let ((errbuf ...) (tembuf ...) (case-fold-search nil) resend-to-addresses delimline (mailbuf ...)) (unwind-protect (save-excursion ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (kill-buffer tembuf) (if ... ...)))
)
  sendmail-send-it()
  funcall(sendmail-send-it)
  (progn (expand-abbrev) (run-hooks (quote mail-send-hook)) (message "Sending...") (funcall send-mail-function) (while mail-send-actions (condition-case nil ... ...) (setq mail-send-actions ...)) (message "Sending...done") (cond (... ... ...) (... ...)))
)
  (if (if buffer-file-name (y-or-n-p "Send buffer contents as mail message? ") (or ... ...)) (progn (expand-abbrev) (run-hooks ...) (message "Sending...") (funcall send-mail-function) (while mail-send-actions ... ...) (message "Sending...done") (cond ... ...)))
)
  mail-send()
  # bind (arg)
  mail-send-and-exit(nil)
  # bind (command-debug-status)
  call-interactively(mail-send-and-exit)
  # (condition-case ... . error)
  # (catch top-level ...)

