From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44583: 25.3; Emacs aborts with fatal error when a keyboard macro (saved in init.el) is set to run automatically at Emacs startup (Windows 10) Date: Wed, 11 Nov 2020 21:36:03 +0200 Message-ID: <83v9ebznx8.fsf@gnu.org> References: <864klvhi0i.fsf@DESKTOP-IVLB171.i-did-not-set--mail-host-address--so-tickle-me> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29802"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44583@debbugs.gnu.org To: akshaychavan20031@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 11 20:37:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcvva-0007ej-7H for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Nov 2020 20:37:10 +0100 Original-Received: from localhost ([::1]:44920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcvvZ-00016C-A7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Nov 2020 14:37:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcvvT-000164-3f for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 14:37:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcvvS-0003ep-R4 for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 14:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kcvvS-0007GM-P8 for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 14:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Nov 2020 19:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44583 X-GNU-PR-Package: emacs Original-Received: via spool by 44583-submit@debbugs.gnu.org id=B44583.160512336527832 (code B ref 44583); Wed, 11 Nov 2020 19:37:02 +0000 Original-Received: (at 44583) by debbugs.gnu.org; 11 Nov 2020 19:36:05 +0000 Original-Received: from localhost ([127.0.0.1]:42903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcvuW-0007Ep-GN for submit@debbugs.gnu.org; Wed, 11 Nov 2020 14:36:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:32786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcvuU-0007EI-Vx for 44583@debbugs.gnu.org; Wed, 11 Nov 2020 14:36:03 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35587) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcvuP-0003Co-Mh; Wed, 11 Nov 2020 14:35:57 -0500 Original-Received: from [176.228.60.248] (port=4943 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kcvuK-0000Qk-E5; Wed, 11 Nov 2020 14:35:54 -0500 In-Reply-To: <864klvhi0i.fsf@DESKTOP-IVLB171.i-did-not-set--mail-host-address--so-tickle-me> (akshaychavan20031@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193132 Archived-At: > From: akshaychavan20031@gmail.com > Date: Wed, 11 Nov 2020 23:51:01 +0530 > > I encountered a fatal error which caused Emacs to abort at startup > (running as Daemon). The actions which led to this bug are as follows: > > 1. I recorded a keyboard macro and inserted its elisp code in init.el > with the M-x insert-kbd-macro function. > > 2. The elisp code for the macro is > > ;; This macro automatically runs remember-notes on Emacs startup and > ;; then runs recover-this-file to recover autosave data of notes and > ;; then enters 'yes' to the minibuffer prompt > (fset 'remember-notes-my-macro > (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([134217848 114 101 109 101 109 98 101 114 45 110 111 116 101 115 return 134217848 114 101 99 111 118 101 114 45 116 104 105 115 45 102 105 108 101 return 121 101 115 return] 0 "%d")) arg))) > ;; Macro ends here > > 3. I wished for this macro execute automatically when Emacs Daemon is > launched at System startup. So I added the following line to my init.el > > (remember-notes-my-macro) > > 4. When Emacs is started, I get a dialog box with the following text: Your macro attempts to prompt the user in the minibuffer, but the daemon doesn't have a frame to do that. What was the purpose of invoking such a macro when you start Emacs as a daemon?