lem icon indicating copy to clipboard operation
lem copied to clipboard

how about create-file or new-empty-buffer

Open lewisl opened this issue 2 years ago • 5 comments

I guess the "spittle-in-the-beard" unix crowd never creates files, but the rest of us do. Even emacs has finally added commands for this (v. 27 and above). Only took them 30+ years so you have time...!

lewisl avatar Jul 20 '23 17:07 lewisl

Hahaha, creating a file it's just creating a buffer adding some text and save it. But indeed having a command to create an empty file is quite handy (and it should be quite easy to add).

Sasanidas avatar Jul 20 '23 21:07 Sasanidas

I tried that and I must have done something wrong. Is the command to create a buffer different than switching to another buffer. I could not name the new buffer.

From: Fermin MF @.> Reply-To: lem-project/lem @.> Date: Thursday, July 20, 2023 at 5:28 PM To: lem-project/lem @.> Cc: Lewis Levin @.>, Author @.***> Subject: Re: [lem-project/lem] how about create-file or new-empty-buffer (Issue #857)

Hahaha, creating a file it's just creating a buffer adding some text and save it. But indeed having a command to create an empty file is quite handy (and it should be quite easy to add).

— Reply to this email directly, view it on GitHubhttps://github.com/lem-project/lem/issues/857#issuecomment-1644630699, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIYWLITKLECDAAS33NTWNTXRGPGXANCNFSM6AAAAAA2RXC76M. You are receiving this because you authored the thread.Message ID: @.***>

lewisl avatar Jul 21 '23 18:07 lewisl

@lewisl I just tried: use C-x C-f to open a file, but give it the name of a new file. This creates a buffer with the given name, the file still doesn't exist. Write content, save the file.

If I use C-x b to switch buffers, I can give it a new name, it creates a new buffer, but C-x C-s did not work. I had to use M-x write-file.

vindarel avatar Jul 22 '23 10:07 vindarel

Good. I’ll give that a shot. It’s fine to have to save the buffer; that’s the goal after all.

From: vindarel @.> Reply-To: lem-project/lem @.> Date: Saturday, July 22, 2023 at 6:17 AM To: lem-project/lem @.> Cc: Lewis Levin @.>, Mention @.***> Subject: Re: [lem-project/lem] how about create-file or new-empty-buffer (Issue #857)

@lewislhttps://github.com/lewisl I just tried: use C-x C-f to open a file, but give it the name of a new file. This creates a buffer with the given name, the file still doesn't exist. Write content, save the file.

If I use C-x b to switch buffers, I can give it a new name, it creates a new buffer, but C-x C-s did not work. I had to use M-x write-file.

— Reply to this email directly, view it on GitHubhttps://github.com/lem-project/lem/issues/857#issuecomment-1646550453, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIYWLIFC6YH54VUH62EUYDXROSDZANCNFSM6AAAAAA2RXC76M. You are receiving this because you were mentioned.Message ID: @.***>

lewisl avatar Jul 22 '23 17:07 lewisl

Thank you for the interesting issue. I think so if there are no files associated when C-x C-s, it is better to change to the behavior of C-x C-w.

cxxxr avatar Jul 23 '23 02:07 cxxxr