emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44583: closed (25.3; Emacs aborts with fatal error when a keyboard m


From: GNU bug Tracking System
Subject: bug#44583: closed (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: Thu, 12 Nov 2020 18:03:02 +0000

Your message dated Thu, 12 Nov 2020 20:01:51 +0200
with message-id <83tutuxxm8.fsf@gnu.org>
and subject line Re: 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)
has caused the debbugs.gnu.org bug report #44583,
regarding 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)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
44583: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44583
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 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 23:51:01 +0530




In GNU Emacs 25.3.1 (x86_64-w64-mingw32)
 of 2017-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Configured using:
 'configure --without-dbus --without-compress-install 'CFLAGS=-O2
 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
  savehist-mode: t
  save-place-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent messages:
Starting Emacs daemon.
When done with this frame, type C-x 5 0

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message idna dired format-spec rfc822
mml mml-sec password-cache epg gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils server
time-date imenu finder-inf edmacro kmacro package epg-config seq
byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv
cl-loaddefs pcase cl-lib savehist saveplace mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32
ls-lisp disp-table w32-win w32-vars term/common-win tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 16 228843 16607)
 (symbols 56 25882 0)
 (miscs 48 52 128)
 (strings 32 63017 18885)
 (string-bytes 1 1525123)
 (vectors 16 19795)
 (vector-slots 8 536167 4328)
 (floats 8 193 3)
 (intervals 56 763 30)
 (buffers 976 20))

Hello,

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:

QUOTE
A fatal error has occured!
Would you like to attach a debugger?
Select:
YES -- To debug Emacs, or
NO -- to abort Emacs and produce a backtrace
(emacs_backtrace.txt in current directory).
(type 'gdb -p <emacs-PID>' and
'continue' inside GDB before clicking YES.)
UNQUOTE

5. However, this macro RUNS FINE when invoked in a running Emacs
instance by M-x remember-notes-my-macro

6. Please find the emacs_backtrace.txt in the attachment to this email.
<#part type=text filename="c:/Users/USER/Desktop/emacs_backtrace.txt" 
disposition=inline description=emacs_backtrace.txt>
<#/part>

Warm regards,
Akshay



--- End Message ---
--- Begin Message --- Subject: Re: 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: Thu, 12 Nov 2020 20:01:51 +0200
[Please use Reply All to keep the bug tracker on the CC list.]

> From: Akshay C <akshaychavan20031@gmail.com>
> Date: Thu, 12 Nov 2020 23:24:18 +0530
> 
> Thank you for your response. Some text editors allow users to close the 
> editor without saving the buffer to a
> file. The next time they open the editor, the buffer is still open. I wanted 
> to achieve this in Emacs. So I wanted
> Emacs to automatically open "notes" at startup with the remember-notes 
> function, then run recover-this-file
> function to recover any autosave data that I hadn't saved to disk, then enter 
> "yes" at the minibuffer prompt. I
> am not good at elisp, so I recorded a keyboard macro to do the job.

Yes, but when you start Emacs as a daemon, there's no minibuffer to
prompt in, because there's no frame to display.

> I have attached emacs_backtrace.txt to
> this mail.

Thanks.  I've fixed the crash for the upcoming Emacs 27.2, in a way
that will use the console to display the messages when there's no
frame.

So I'm therefore closing this bug report.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]