all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
Subject: RE: How to visit a file and kill the current buffer?
Date: Sun, 10 Sep 2017 18:18:30 +0000 (UTC)	[thread overview]
Message-ID: <e489e116-f3ce-490d-bd25-e7f31c9251dd@default> (raw)
In-Reply-To: <83wp56touh.fsf@gnu.org>

> > 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'.



  reply	other threads:[~2017-09-10 18:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-10 17:13 How to visit a file and kill the current buffer? Mario Castelán Castro
2017-09-10 17:24 ` tomas
2017-09-10 17:48   ` Mario Castelán Castro
2017-09-10 18:37     ` Emanuel Berg
2017-09-10 19:14       ` tomas
     [not found]       ` <mailman.265.1505070877.14750.help-gnu-emacs@gnu.org>
2017-09-10 22:13         ` Emanuel Berg
2017-09-10 18:01 ` Eli Zaretskii
2017-09-10 18:18   ` Drew Adams [this message]
2017-09-10 18:16 ` Drew Adams
     [not found] <mailman.245.1505063646.14750.help-gnu-emacs@gnu.org>
2017-09-10 18:15 ` Marco Wahl
2017-09-10 18:27   ` Mario Castelán Castro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e489e116-f3ce-490d-bd25-e7f31c9251dd@default \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.