|
|
Up |
|
|
  |
Author: Ben AurelBen Aurel Date: Jul 21, 2008 11:59
hi
This is my first post here, so I hope this is the right place for asking
beginner questions.
My question is simple: When I list some files in dired mode I select one
file to edit. Now how can I close this file and go back to dired without
closing emacs?
thanks
ben
|
| |
|
| | 24 Comments |
|
  |
Author: XahXah Date: Jul 21, 2008 22:56
On Jul 21, 11:59 am, Ben Aurel gmail.com> wrote:
> hi
> This is my first post here, so I hope this is the right place for asking
> beginner questions.
>
> My question is simple: When I list some files in dired mode I select one
> file to edit. Now how can I close this file and go back to dired without
> closing emacs?
To close the file, use the menu “File‣Close”. Emacs doesn't have a
keyboard shortcut for this due the fact that emacs has build on the
1980's mindset and havn't modernized. But you can add one by putting
the following in your emacs preference file. (the file at “~/.emacs”):
(global-set-key (kbd "C-w") 'kill-this-buffer) ; close
This will let you press Ctrl+w to close the current file.
To switch to files or directories you have opened before, you can use
the menu “Buffers”. The “buffer” is term used in the 1980s. Today you
just call it “Tabs” or “workspace”.
So, for example, to switch to the previous tab, press Ctrl+x Ctrl+←.
(this is in the graphical menu Buffers too.)
|
| Show full article (1.19Kb) |
|
| | no comments |
|
  |
Author: Miles BaderMiles Bader Date: Jul 22, 2008 00:14
Ben Aurel gmail.com> writes:
> My question is simple: When I list some files in dired mode I select one
> file to edit. Now how can I close this file and go back to dired without
> closing emacs?
C-x k RET
is one way.
[Don't pay too much attention to xahlee about keybindings -- he's
... kinda nuts on that issue...]
-MIles
--
We live, as we dream -- alone....
|
| |
| no comments |
|
  |
Author: Bastien GuerryBastien Guerry Date: Jul 22, 2008 01:23
Xah gmail.com> writes:
> On Jul 21, 11:59 am, Ben Aurel gmail.com> wrote:
>> hi
>> This is my first post here, so I hope this is the right place for asking
>> beginner questions.
>>
>> My question is simple: When I list some files in dired mode I select one
>> file to edit. Now how can I close this file and go back to dired without
>> closing emacs?
>
> To close the file, use the menu “File‣Close”. Emacs doesn't have a
> keyboard shortcut for this due the fact that emacs has build on the
> 1980's mindset and havn't modernized.
Or because the concept of "File" is not as central as the concept of
"buffer". It is not a question of being modern or not. In the 1980's
the notion of "file" already existed, and today, projects like OLPC are
putting it aside.
> (global-set-key (kbd "C-w") 'kill-this-buffer) ; close
Please don't suggest this.
|
| Show full article (1.42Kb) |
| no comments |
|
  |
Author: nakkayanakkaya Date: Jul 22, 2008 03:58
C-x k RET
closes a file. to switch between files you can use ibuffer
M-x ibuffer or you can bound it to a key.
(define-key global-map [(meta \])] 'ibuffer)
--
Nurullah Akkaya
|
| |
| no comments |
|
  |
Author: XahXah Date: Jul 22, 2008 04:01
Xah wrote:
> (global-set-key (kbd "C-w") 'kill-this-buffer) ; close
>
> This will let you press Ctrl+w to close the current file.
PS i forgot to mention, that Ctrl+w is emacs default shortcut to copy
text. So, if you set Close to Ctrl+w, then you should find another key
for Copy. You can set emacs to Copy by Ctrl+c, by going to the menu
“Options‣C-x/C-c/C-v Cut and Paste (CUA)”, Then use menu “Options‣Save
Options”.
For some details about these, see:
http://xahlee.org/emacs/emacs_make_modern.html
Xah
∑ http://xahlee.org/
☄
|
| |
| no comments |
|
  |
Author: Juanma BarranqueroJuanma Barranquero Date: Jul 22, 2008 04:13
On Tue, Jul 22, 2008 at 10:23, Bastien Guerry altern.org> wrote:
> Or because the concept of "File" is not as central as the concept of
> "buffer".
But Xah Lee is not arguing against the concept. He is arguing against
the terminology...
> The notion of "buffer" might be emacs specific, but it's not 1980's.
I don't think the notion of "buffer" is Emacs specific; as Xah Lee has
said, in other environments (editors, IDEs, etc.) they exist, it's
just that they exist under a different name ("workspace" being a nice
alternative).
Juanma
|
| |
| no comments |
|
  |
Author: Thierry VolpiattoThierry Volpiatto Date: Jul 22, 2008 05:12
> C-x k RET
Alternatively, you can use quit-window that allow to quit window without
killing buffer (with arg t, it will quit and kill buffer)
|
| Show full article (1.01Kb) |
| no comments |
|
  |
Author: Bastien GuerryBastien Guerry Date: Jul 22, 2008 09:46
"Juanma Barranquero" gmail.com> writes:
> On Tue, Jul 22, 2008 at 10:23, Bastien Guerry altern.org> wrote:
>
>> Or because the concept of "File" is not as central as the concept of
>> "buffer".
>
> But Xah Lee is not arguing against the concept. He is arguing against
> the terminology...
My sentence above was a reaction to Xah's sentence:
"Emacs doesn't have a keyboard shortcut for this due the fact that
emacs has build on the 1980's mindset and havn't modernized."
I think that the reason Emacs doesn't have a keybinding for "Close"
is because the concept of a buffer is more central to Emacs than the
concept of a file.
Open/Close is bound to file manipulation, and many buffer manipulations
are not related to files at all - think of dired, for example.
|
| Show full article (1.24Kb) |
| no comments |
|
  |
|
|
  |
Author: Juanma BarranqueroJuanma Barranquero Date: Jul 22, 2008 15:51
On Tue, Jul 22, 2008 at 18:46, Bastien Guerry altern.org> wrote:
> My sentence above was a reaction to Xah's sentence:
>
> "Emacs doesn't have a keyboard shortcut for this due the fact that
> emacs has build on the 1980's mindset and havn't modernized."
Even so, I don't think he was arguing against the *concept* of buffers.
> I don't think "buffer" and "workspaces" are synonymous, and I don't
> think there is anything wrong with the current use of "buffer".
We'll have to disagree, at least partially.
Juanma
|
| |
| no comments |
|
|
|
|