[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to visit a file and kill the current buffer?
From: |
Drew Adams |
Subject: |
RE: How to visit a file and kill the current buffer? |
Date: |
Sun, 10 Sep 2017 18:18:30 +0000 (UTC) |
> > Very often I have a frame displaying a file, but I no longer need to
> > have that file open.
>
> Emacs doesn't keep the file open after visiting it. The file's
> contents is read into a buffer, and the file is closed. So you
> shouldn't worry about leaving the file open.
>
> > I wish to instead open another file. What I do
> > currently is to do C-x C-f and visit the new file, then kill the now
> > unneeded buffer, but it is annoying to have to do this in 2 steps.
>
> You don't need to kill the buffer.
>
> > Moreover, I tend to forget the later step and then I accumulate a lot of
> > “garbage” buffers that are visiting files that I am no longer interested
> in.
>
> Activate midnight-mode, and all those buffers will be automatically
> killed for you.
>
> IOW, I think you are looking for a solution to a problem that doesn't
> really exists in Emacs. It only exists in those "simple GUI editors".
I think that perhaps you and others who have replied to this
so far have misunderstood what the request is (or else I have).
I think he's asking to kill the current buffer and visit a file in
its window. That's `C-x C-v'.
Re: How to visit a file and kill the current buffer?, Eli Zaretskii, 2017/09/10
- RE: How to visit a file and kill the current buffer?,
Drew Adams <=
RE: How to visit a file and kill the current buffer?, Drew Adams, 2017/09/10