0

I have saved a keyboard macro in my init.el file as follows

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

I want to run this macro automatically when Emacs starts up. I tried to add the line (remember-notes-my-macro) in my init.el to run it when Emacs is launched, but I got a fatal error at startup.

enter image description here

I have never debugged Emacs, so I don't know what to do about it. The macro runs fine with M-x remember-notes-my-macro when Emacs is already running.

How can I get the macro to run automatically at startup?

Note: What this macro does is, it runs remember-notes to open notes. Then it runs recover-this-file to recover autosave data and then it enters yes at the minibuffer prompt.

8
  • 3
    What does the error message say? – NickD Nov 10 '20 at 19:52
  • Always quote the error message (if any) when asking a question. – phils Nov 11 '20 at 0:02
  • @NickD, I have added a screenshot of the dialog box to the question. I have never debugged Emacs with gdb, so I don't know how to do it. Should I attach the emacs_backtrace.txt too? – aks Nov 11 '20 at 5:28
  • @phils please see my comment above – aks Nov 11 '20 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.