I use emacs in daemon mode and I also have a initial-buffer-choice
variable. Sometimes emacs breaks when I edit the file that I use for initial-buffer-choice. In this case, when I start emacs with --daemon, it will hang with a message:
"todo.org has auto save data; consider M-x recover-this-file"
Since I basically run the daemon from the init script, I cannot confirm or deny this dialog, so the daemon hangs forever. How can I bypass the notification about automatic data saving in this case? I do not mind losing automatically save data if necessary.
Here is my attempt to do this:
(defadvice command-line
(around my-command-line-advice)
"Be non-interactive while starting a daemon."
(if (and (daemonp)
(not server-process))
(let ((noninteractive t))
ad-do-it)
ad-do-it))
(ad-activate 'command-line)
. - .
, "" ,
.
: emacs-daemon, . initial-buffer-choice. -, , , , command-line, , , , desktop.el.