The following message is a courtesy copy of an article
that has been posted to comp.emacs.xemacs as well.
chengiz(a)my-deja.com writes:
On Jul 11, 12:32 pm, "Adrian Aichner"
<adr...(a)xemacs.org> wrote:
> Hmmh, perhaps your version of sendmail.el is not honoring auto-save-default?
>
> Do you also have following lines in
>
> (defun mail (&optional noerase to subject in-reply-to cc replybuffer actions)
>
> (setq default-directory (expand-file-name "~/"))
> (auto-save-mode auto-save-default)
> (mail-mode)
> (mail-setup to subject in-reply-to cc replybuffer actions)
>
> Either
> M-x find-function RET mail RET
> or
> M-x find-library RET sendmail RET
> should get you to the source code.
>
> Also check for warnings that sendmail.el is newer than sendmail.elc.
>
> In that case what gets executed might not be what you see in sendmail.el
>
> Also try
>
> M-x list-load-path-shadows
> to see where you get your sendmail library from.
Adrian,
Thanks. I found the following lines in sendmail.el.
;; put mail auto-save files in home dir instead of
;; scattering them around the file system.
(setq default-directory (or mail-dir (expand-file-name "~/")))
(auto-save-mode auto-save-default)
(mail-mode)
(mail-setup to subject in-reply-to cc replybuffer actions)
(if (and buffer-auto-save-file-name
(file-exists-p buffer-auto-save-file-name))
(message "Auto save file for draft message exists; consider M-x
mail-recover"))
t)))
I dont get any warnings about sendmail. The shadow command says:
No Emacs Lisp load-path shadowings were found
Now auto-save-mode apropos says "Toggle auto-saving of contents of
current buffer. With prefix argument ARG, turn auto-saving on if
positive, else off." So wouldnt that point to that auto-save-mode line
in there as the culprit? In fact in another file buffer, I tried these
lines (hitting C-u C-x C-e after each one) which suggests the same
thing.
buffer-auto-save-file-name
nil
(auto-save-mode auto-save-default)
buffer-auto-save-file-name
"/home/chengiz/tmp/#temp#"
Seems like a bug in sendmail.el.
Hi again, chengiz!
My analysis indicates that both, function auto-save-mode and variable
auto-save-default are overloaded and under-documented.
Furthermore sendmail.el in GNU Emacs has different code to handle
auto-save-mode more defensively:
;; Only call auto-save-mode if necessary, to avoid changing auto-save file.
(if (or (and auto-save-default (not buffer-auto-save-file-name))
(and (not auto-save-default) buffer-auto-save-file-name))
(auto-save-mode auto-save-default))
The XEmacs lisp packages code base shows that different idioms are
being used by various authors.
As a workaround for now, chengiz, you can try using
(setq auto-save-default 0)
on a mail-mode hook to turn it off in *mail* buffers, if that is what
you want.
I'm copying xemacs-beta(a)xemacs.org, where better ideas may come from.
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta