for background, I am an emacs newbie and long time unix user... What I am trying to do is to work in emacs in a pattern that is familiar to someone who has used a windows, linux, mac text editor such as notepad, vi, textwrangler, etc:
- Open the editor
- Open a blank buffer if necessary (sometimes called Untitled)
- Type and edit text
- Exit the editor after being asked to save the changes to the buffer
In my experience, this is not how it works in emacs, but I am hoping to hear from y'all about how it can be, or how my thinking about editing might be changed for the better. Here is how it seems to work in emacs:
- Open the editor
emacs
- Open a blank buffer
C-x b Untitled
- Type and edit some text
- Exit the editor...
Oops, after losing some changes without prompting, I caught on that this wasn't an ideal workflow (call me slow), so I thought about alternatives and tried visiting a new file instead of a new buffer: C-x C-f Untitled
, but this meant I had to provide a path and be saddled with it throughout the life of the session - meaning that when exiting, emacs would think that was where it should save the file (reasonable of emacs really). I don't like having to provide this information up-front as I may not want to save my edits later.
So, my question, is it possible to replicate the workflow above in an emacsy way, ie. prompt on changes to a buffer, but only buffers like the described Untitled, not *Messages*
, or am I just thinking wrongly and there's a better workflow that I'm somehow overlooking?
If this is duplicated elsewhere, please point that out, I searched, but searches are fickle.