From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Banks Newsgroups: gmane.emacs.help Subject: Prevent emacs daemon from hanging on auto-save data with initial-buffer-choice Date: Mon, 18 Mar 2013 19:46:27 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363636211 26366 80.91.229.3 (18 Mar 2013 19:50:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Mar 2013 19:50:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 18 20:50:37 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHg4o-000078-Rq for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Mar 2013 20:50:34 +0100 Original-Received: from localhost ([::1]:40539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHg4R-0003Ha-SZ for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Mar 2013 15:50:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHg43-0003Bv-7O for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 15:49:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHg40-0005Ys-QR for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 15:49:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHg40-0005Yd-Jd for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 15:49:44 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UHg4L-0008D2-8c for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 20:50:05 +0100 Original-Received: from host-92-26-161-127.as13285.net ([92.26.161.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Mar 2013 20:50:05 +0100 Original-Received: from amoebae by host-92-26-161-127.as13285.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Mar 2013 20:50:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host-92-26-161-127.as13285.net User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89588 Archived-At: 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