all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Banks <amoebae@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Prevent emacs daemon from hanging on auto-save data with initial-buffer-choice
Date: Mon, 18 Mar 2013 19:46:27 +0000	[thread overview]
Message-ID: <ki7qug$nd7$1@ger.gmane.org> (raw)

Hi there,

I use emacs in daemon mode and I also have an 'initial-buffer-choice'
variable set.  Sometimes emacs will crash when I am editing the file
that I use for 'initial-buffer-choice'.  In this case, when I start
emacs with --daemon, it will hang with the message:

"todo.org has auto save data; consider M-x recover-this-file"

Since I mostly start the daemon from an init script, I can't confirm or
deny this dialog, so the daemon hangs forever.  How can I bypass the
notification of auto-save data in this case?  I don't mind losing the
auto save data if necessary.

Here was my attempt to do it:

  (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)

However, this doesn't work.  I still get the same hanging behaviour.
Indeed, putting a 'message' call inside the advice shows that the advice
isn't invoked at all.

Any ideas?

Similar question: http://stackoverflow.com/questions/4933134/

Cheers,
David




                 reply	other threads:[~2013-03-18 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ki7qug$nd7$1@ger.gmane.org' \
    --to=amoebae@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.