Hacker News new | past | comments | ask | show | jobs | submit login

I somehow have been using Emacs for 15 years without knowing such a thing existed. I've been using lisp-interactive-mode for this purpose.



"I somehow have been using Emacs for 15 years without knowing <thing> existed"

could be the emacs manual title (or any large system tbh)


I've written about all the different methods here:

https://www.masteringemacs.org/article/evaluating-elisp-emac...


This is a great guide!


I have been using Emacs ~50 years, and I have always hoped all of the history would be visible as lisp-expressions which you could view and modify in interactive mode.

It is somewhere there because undo knows it. Typical example is that you fumble something splendid/stupid with fat fingers and then cant figure out what you just did.


Googled it and there is already

    (global-undo-tree-mode)
    (setq undo-tree-auto-save-history t)
    (setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
I did not know that.


I think C-h l (lossage) shows the keys and function names.


Yes it does.

Why did not I know that?

-- Because (view-lossage) is weird name for this.


Agree ... I don't know where the name comes from, but I've become used to it since I use C-h l frequently.

I asked chat gpt about it, and what it said seemed to match what I found when I googled it:

> In Emacs, “Lossage” refers to a section in the GNU Emacs Manual that describes how to recognize and deal with situations in which Emacs does not work as expected1. For example, it covers issues such as keyboard code mixups, garbled displays, running out of memory, and crashes and hangs1.

> There is also a command called view-lossage that displays the last 300 input keystrokes2. You can use open-dribble-file to record all your input on a file2.


Yeah, it's interesting that Emacs has ended up with lisp-interactive-mode as the primary "REPL" (even though it's not exactly the same thing). Kind of like the type-anywhere interactive input in Commodore BASICs vs using a dedicated line.


I've been using Emacs for over 30 years without ever needing such a thing. Just evaluate in scratch, keep what you want, delete the rest.


Same here! I will definitely check it out.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: