unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Making new files
@ 2024-05-03 23:57 Heime
  2024-05-04  0:15 ` Po Lu
  0 siblings, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-03 23:57 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I always struggle in emacs because there is no way to make a new file 
from the "File" menu.  Can "New File" be added please.




Sent with Proton Mail secure email.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-03 23:57 Making new files Heime
@ 2024-05-04  0:15 ` Po Lu
  2024-05-04  7:41   ` Yuri Khan
  0 siblings, 1 reply; 28+ messages in thread
From: Po Lu @ 2024-05-04  0:15 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

Heime <heimeborgia@protonmail.com> writes:

> I always struggle in emacs because there is no way to make a new file 
> from the "File" menu.  Can "New File" be added please.

"Visit New File."



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04  0:15 ` Po Lu
@ 2024-05-04  7:41   ` Yuri Khan
  2024-05-04  8:16     ` Eli Zaretskii
  2024-05-04 22:37     ` Heime
  0 siblings, 2 replies; 28+ messages in thread
From: Yuri Khan @ 2024-05-04  7:41 UTC (permalink / raw)
  To: Po Lu; +Cc: Heime, Heime via Users list for the GNU Emacs text editor

On Sat, 4 May 2024 at 07:16, Po Lu <luangruo@yahoo.com> wrote:

> > I always struggle in emacs because there is no way to make a new file
> > from the "File" menu.  Can "New File" be added please.
>
> "Visit New File."

That’s not exactly what Users New To Emacs™ expect from a File → New command.

The standard behavior of File → New is to create a blank buffer, no
questions asked. The decision as to the name and location of the file
is deferred to the first explicit save. Emacs, on the other hand, asks
for the name up front.

@Heime: Consider this a productivity shortcut. By giving a name to
your file, you let Emacs automatically choose the appropriate major
mode, which, in turn, gives you the right syntax highlighting and
various mode-specific key bindings. With an unnamed file, you’d have
to choose the mode manually.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04  7:41   ` Yuri Khan
@ 2024-05-04  8:16     ` Eli Zaretskii
  2024-05-04 16:08       ` Heime
  2024-05-04 22:37     ` Heime
  1 sibling, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2024-05-04  8:16 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Sat, 4 May 2024 14:41:50 +0700
> Cc: Heime <heimeborgia@protonmail.com>, 
>  Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> 
> On Sat, 4 May 2024 at 07:16, Po Lu <luangruo@yahoo.com> wrote:
> 
> > > I always struggle in emacs because there is no way to make a new file
> > > from the "File" menu.  Can "New File" be added please.
> >
> > "Visit New File."
> 
> That’s not exactly what Users New To Emacs™ expect from a File → New command.

But that's what we decided to have instead of "File->New".  There were
a lot of discussions about it quite a few years ago, and we ended up
implementing that, for reasons that you can find in the discussion
(there's more here than meets the eye, as usually with Emacs).

So we are not going to change that any time soon.  The "New" in "Visit
New File" should tell the user this is what they want, and the
help-echo tooltip should help some more.

> The standard behavior of File → New is to create a blank buffer, no
> questions asked. The decision as to the name and location of the file
> is deferred to the first explicit save. Emacs, on the other hand, asks
> for the name up front.

Emacs is not like "other apps" out there, it has its own logic and
paradigms, which are usually well-thought.  Users of Emacs should
realize the value of the Emacs behavior (for example, the fact that in
this case Emacs automatically choses the correct modes for the new
file), and appreciate it, rather than look for the inferior behavior
characteristic of "other apps".



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04  8:16     ` Eli Zaretskii
@ 2024-05-04 16:08       ` Heime
  2024-05-04 16:23         ` Eli Zaretskii
  2024-05-05  2:09         ` జిందం వాఐి
  0 siblings, 2 replies; 28+ messages in thread
From: Heime @ 2024-05-04 16:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

On Saturday, May 4th, 2024 at 8:16 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Yuri Khan yuri.v.khan@gmail.com
> > Date: Sat, 4 May 2024 14:41:50 +0700
> > Cc: Heime heimeborgia@protonmail.com,
> > Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org
> > 
> > On Sat, 4 May 2024 at 07:16, Po Lu luangruo@yahoo.com wrote:
> > 
> > > > I always struggle in emacs because there is no way to make a new file
> > > > from the "File" menu. Can "New File" be added please.
> > > 
> > > "Visit New File."
> > 
> > That’s not exactly what Users New To Emacs™ expect from a File → New command.
> 
> 
> But that's what we decided to have instead of "File->New". There were
> 
> a lot of discussions about it quite a few years ago, and we ended up
> implementing that, for reasons that you can find in the discussion
> (there's more here than meets the eye, as usually with Emacs).
> 
> So we are not going to change that any time soon. The "New" in "Visit
> New File" should tell the user this is what they want, and the
> help-echo tooltip should help some more.
> 
> > The standard behavior of File → New is to create a blank buffer, no
> > questions asked. The decision as to the name and location of the file
> > is deferred to the first explicit save. Emacs, on the other hand, asks
> > for the name up front.
> 
> 
> Emacs is not like "other apps" out there, it has its own logic and
> paradigms, which are usually well-thought. Users of Emacs should
> realize the value of the Emacs behavior (for example, the fact that in
> this case Emacs automatically choses the correct modes for the new
> file), and appreciate it, rather than look for the inferior behavior
> characteristic of "other apps".

That's what your stupid minds decided.  One does "Visit New File", to
get "Find File" to show up in the "Title Bar".  Find file on something 
that does not exist.  "Visiting something that does not exist" !!!
I suggest going back to school and relearn the englrish language properly.

"Make New File", not "Visit New File" or any other nonsense you decided.
You are creating confusion for benefits of convenience.  People do not 
work like that.  Confusion brings more confusion and more confusion.
One can get fundamental mode, and a user can change it.  Or reload the 
file and get the mode chosen automatically.





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04 16:08       ` Heime
@ 2024-05-04 16:23         ` Eli Zaretskii
  2024-05-04 16:40           ` Heime
  2024-05-05  2:09         ` జిందం వాఐి
  1 sibling, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2024-05-04 16:23 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sat, 04 May 2024 16:08:40 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > Emacs is not like "other apps" out there, it has its own logic and
> > paradigms, which are usually well-thought. Users of Emacs should
> > realize the value of the Emacs behavior (for example, the fact that in
> > this case Emacs automatically choses the correct modes for the new
> > file), and appreciate it, rather than look for the inferior behavior
> > characteristic of "other apps".
> 
> That's what your stupid minds decided.

Once again I learn the simple truth: the individual who goes by the
handle Heime is not to be helped under any circumstances, because he
or she can insult you out of the blue any time, regardless of the fact
that I'm trying to help him/her to understand the Emacs mindset, so
that future experiences could be more pleasant.

Until I try to help you next time...



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04 16:23         ` Eli Zaretskii
@ 2024-05-04 16:40           ` Heime
  0 siblings, 0 replies; 28+ messages in thread
From: Heime @ 2024-05-04 16:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs


On Sunday, May 5th, 2024 at 4:23 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Sat, 04 May 2024 16:08:40 +0000
> > From: Heime heimeborgia@protonmail.com
> > Cc: help-gnu-emacs@gnu.org
> > 
> > > Emacs is not like "other apps" out there, it has its own logic and
> > > paradigms, which are usually well-thought. Users of Emacs should
> > > realize the value of the Emacs behavior (for example, the fact that in
> > > this case Emacs automatically choses the correct modes for the new
> > > file), and appreciate it, rather than look for the inferior behavior
> > > characteristic of "other apps".
> > 
> > That's what your stupid minds decided.
> 
> 
> Once again I learn the simple truth: the individual who goes by the
> handle Heime is not to be helped under any circumstances, because he
> or she can insult you out of the blue any time, regardless of the fact
> that I'm trying to help him/her to understand the Emacs mindset, so
> that future experiences could be more pleasant.
> 
> Until I try to help you next time...

I find a problem for many others, this "having to understand the mind of emacs".
There in no such thing as the "mind of emacs".  For instance, you could have a
"Select File Type (by extention)" from a predefined list, in the popup window
to create a new file.  One could alse be allowed to set their own extention
and emacs could set the major mode associated with that extention.

This is similar problem of the gender pronounce nonsense.  Where people start
to insist that other understand such mindset nothwithstanding the confusion
they create.  And also, notwithstanding the reality that many do not give a 
care about addressing anybody for the purpose of not setting them angry.





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04  7:41   ` Yuri Khan
  2024-05-04  8:16     ` Eli Zaretskii
@ 2024-05-04 22:37     ` Heime
  2024-05-05 13:49       ` Stefan Monnier via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-04 22:37 UTC (permalink / raw)
  To: Yuri Khan; +Cc: Po Lu, Heime via Users list for the GNU Emacs text editor


On Saturday, May 4th, 2024 at 7:41 PM, Yuri Khan <yuri.v.khan@gmail.com> wrote:

> On Sat, 4 May 2024 at 07:16, Po Lu luangruo@yahoo.com wrote:
> 
> > > I always struggle in emacs because there is no way to make a new file
> > > from the "File" menu. Can "New File" be added please.
> > 
> > "Visit New File."
> 
> 
> That’s not exactly what Users New To Emacs™ expect from a File → New command.
> 
> The standard behavior of File → New is to create a blank buffer, no
> questions asked. The decision as to the name and location of the file
> is deferred to the first explicit save. Emacs, on the other hand, asks
> for the name up front.
> 
> @Heime: Consider this a productivity shortcut. By giving a name to
> your file, you let Emacs automatically choose the appropriate major
> mode, which, in turn, gives you the right syntax highlighting and
> various mode-specific key bindings. With an unnamed file, you’d have
> to choose the mode manually.

I have no complaints about naming the file as it is.  But the choice of
words is very bad.  One cannot visit something that does not exist as in
"Visit New File".  The associated popup menu has in its Title Bar the 
phrase "Find File".  It is those two things that I am against continuing 
with.  They do not help at all.





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04 16:08       ` Heime
  2024-05-04 16:23         ` Eli Zaretskii
@ 2024-05-05  2:09         ` జిందం వాఐి
  2024-05-05  2:28           ` Heime
  1 sibling, 1 reply; 28+ messages in thread
From: జిందం వాఐి @ 2024-05-05  2:09 UTC (permalink / raw)
  To: help-gnu-emacs

On 2024-05-04 21:38, Heime wrote:
> Sent with Proton Mail secure email.
> 
> On Saturday, May 4th, 2024 at 8:16 PM, Eli Zaretskii <eliz@gnu.org> 
> wrote:
> 
>> > From: Yuri Khan yuri.v.khan@gmail.com
>> > Date: Sat, 4 May 2024 14:41:50 +0700
>> > Cc: Heime heimeborgia@protonmail.com,
>> > Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org
>> >
>> > On Sat, 4 May 2024 at 07:16, Po Lu luangruo@yahoo.com wrote:
>> >
>> > > > I always struggle in emacs because there is no way to make a new file
>> > > > from the "File" menu. Can "New File" be added please.
>> > >
>> > > "Visit New File."
>> >
>> > That’s not exactly what Users New To Emacs™ expect from a File → New command.
>> 
>> 
>> But that's what we decided to have instead of "File->New". There were
>> 
>> a lot of discussions about it quite a few years ago, and we ended up
>> implementing that, for reasons that you can find in the discussion
>> (there's more here than meets the eye, as usually with Emacs).
>> 
>> So we are not going to change that any time soon. The "New" in "Visit
>> New File" should tell the user this is what they want, and the
>> help-echo tooltip should help some more.
>> 
>> > The standard behavior of File → New is to create a blank buffer, no
>> > questions asked. The decision as to the name and location of the file
>> > is deferred to the first explicit save. Emacs, on the other hand, asks
>> > for the name up front.
>> 
>> 
>> Emacs is not like "other apps" out there, it has its own logic and
>> paradigms, which are usually well-thought. Users of Emacs should
>> realize the value of the Emacs behavior (for example, the fact that in
>> this case Emacs automatically choses the correct modes for the new
>> file), and appreciate it, rather than look for the inferior behavior
>> characteristic of "other apps".
> 
> That's what your stupid minds decided.

* in opensource packages, its quite
common, which tests your nerve or
you are in complete disagreement
* i didnt remember package name,
however, on the package website,
its clearly indicated what and
what not features they can implement
* in other words, they are subjective
* i too felt same way ;)
* however, once i forced myself
completely dependant on emacs, i
fully appreciate benefits of choice
made by emacs devs about "making
new file"

> One does "Visit New File", to
> get "Find File" to show up in the "Title Bar".  Find file on something
> that does not exist.  "Visiting something that does not exist" !!!
> I suggest going back to school and relearn the englrish language 
> properly.
> 
> "Make New File", not "Visit New File" or any other nonsense you 
> decided.
> You are creating confusion for benefits of convenience.  People do not
> work like that.  Confusion brings more confusion and more confusion.
> One can get fundamental mode, and a user can change it.  Or reload the
> file and get the mode chosen automatically.

-- 
regards,
జిందం వాఐి [ jindam, vani ]

web_ jindam.neocities.org
[matrix]_ @jindam:oikei.net



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05  2:09         ` జిందం వాఐి
@ 2024-05-05  2:28           ` Heime
  2024-05-05  2:53             ` Po Lu
  0 siblings, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-05  2:28 UTC (permalink / raw)
  To: జిందం వాఐి
  Cc: help-gnu-emacs


On Sunday, May 5th, 2024 at 2:09 PM, జిందం వాఐి <jindam.vani@disroot.org> wrote:

> On 2024-05-04 21:38, Heime wrote:
> 
> > Sent with Proton Mail secure email.
> > 
> > On Saturday, May 4th, 2024 at 8:16 PM, Eli Zaretskii eliz@gnu.org
> > wrote:
> > 
> > > > From: Yuri Khan yuri.v.khan@gmail.com
> > > > Date: Sat, 4 May 2024 14:41:50 +0700
> > > > Cc: Heime heimeborgia@protonmail.com,
> > > > Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org
> > > > 
> > > > On Sat, 4 May 2024 at 07:16, Po Lu luangruo@yahoo.com wrote:
> > > > 
> > > > > > I always struggle in emacs because there is no way to make a new file
> > > > > > from the "File" menu. Can "New File" be added please.
> > > > > 
> > > > > "Visit New File."
> > > > 
> > > > That’s not exactly what Users New To Emacs™ expect from a File → New command.
> > > 
> > > But that's what we decided to have instead of "File->New". There were
> > > 
> > > a lot of discussions about it quite a few years ago, and we ended up
> > > implementing that, for reasons that you can find in the discussion
> > > (there's more here than meets the eye, as usually with Emacs).
> > > 
> > > So we are not going to change that any time soon. The "New" in "Visit
> > > New File" should tell the user this is what they want, and the
> > > help-echo tooltip should help some more.
> > > 
> > > > The standard behavior of File → New is to create a blank buffer, no
> > > > questions asked. The decision as to the name and location of the file
> > > > is deferred to the first explicit save. Emacs, on the other hand, asks
> > > > for the name up front.
> > > 
> > > Emacs is not like "other apps" out there, it has its own logic and
> > > paradigms, which are usually well-thought. Users of Emacs should
> > > realize the value of the Emacs behavior (for example, the fact that in
> > > this case Emacs automatically choses the correct modes for the new
> > > file), and appreciate it, rather than look for the inferior behavior
> > > characteristic of "other apps".
> > 
> > That's what your stupid minds decided.
> 
> 
> * in opensource packages, its quite
> common, which tests your nerve or
> you are in complete disagreement
> * i didnt remember package name,
> however, on the package website,
> its clearly indicated what and
> what not features they can implement
> * in other words, they are subjective
> * i too felt same way ;)
> * however, once i forced myself
> completely dependant on emacs, i
> fully appreciate benefits of choice
> made by emacs devs about "making
> new file"

Does that mean that you interpret "Find File" as a request to enter the name
of a new file that you want to create ?  How many emacs users interpret things 
this way ?
 
> > One does "Visit New File", to
> > get "Find File" to show up in the "Title Bar". Find file on something
> > that does not exist. "Visiting something that does not exist" !!!
> > I suggest going back to school and relearn the englrish language
> > properly.
> > 
> > "Make New File", not "Visit New File" or any other nonsense you
> > decided.
> > You are creating confusion for benefits of convenience. People do not
> > work like that. Confusion brings more confusion and more confusion.
> > One can get fundamental mode, and a user can change it. Or reload the
> > file and get the mode chosen automatically.
> 
> 
> --
> regards,
> జిందం వాఐి [ jindam, vani ]
> 
> web_ jindam.neocities.org
> [matrix]_ @jindam:oikei.net



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05  2:28           ` Heime
@ 2024-05-05  2:53             ` Po Lu
  2024-05-05  3:07               ` Heime
  0 siblings, 1 reply; 28+ messages in thread
From: Po Lu @ 2024-05-05  2:53 UTC (permalink / raw)
  To: Heime
  Cc: జిందం వాఐి,
	help-gnu-emacs

Heime <heimeborgia@protonmail.com> writes:

> Does that mean that you interpret "Find File"

There is no menu bar option titled "Find File."



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05  2:53             ` Po Lu
@ 2024-05-05  3:07               ` Heime
  2024-05-05  3:18                 ` Heime
  0 siblings, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-05  3:07 UTC (permalink / raw)
  To: Po Lu
  Cc: జిందం వాఐి,
	help-gnu-emacs






Sent with Proton Mail secure email.

On Sunday, May 5th, 2024 at 2:53 PM, Po Lu <luangruo@yahoo.com> wrote:

> Heime heimeborgia@protonmail.com writes:
> 
> > Does that mean that you interpret "Find File"
> 
> 
> There is no menu bar option titled "Find File."

I am using Emacs 29.3 and I do see "Find File" Popup Window Title
after clicking on "Visit New File".



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05  3:07               ` Heime
@ 2024-05-05  3:18                 ` Heime
  0 siblings, 0 replies; 28+ messages in thread
From: Heime @ 2024-05-05  3:18 UTC (permalink / raw)
  To: Heime
  Cc: Po Lu,
	జిందం వాఐి,
	help-gnu-emacs

On Sunday, May 5th, 2024 at 3:07 PM, Heime <heimeborgia@protonmail.com> wrote:

> On Sunday, May 5th, 2024 at 2:53 PM, Po Lu luangruo@yahoo.com wrote:
> 
> > Heime heimeborgia@protonmail.com writes:
> > 
> > > Does that mean that you interpret "Find File"
> > 
> > There is no menu bar option titled "Find File."
> 
> 
> I am using Emacs 29.3 and I do see "Find File" Popup Window Title
> after clicking on "Visit New File".

Change "Visit New File" to "New File" and stop using a file selector Window
"Find File", but something like "Write File" instead.




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-04 22:37     ` Heime
@ 2024-05-05 13:49       ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-05-05 16:37         ` Heime
  0 siblings, 1 reply; 28+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-05-05 13:49 UTC (permalink / raw)
  To: help-gnu-emacs

> I have no complaints about naming the file as it is.  But the choice of
> words is very bad.  One cannot visit something that does not exist as in
> "Visit New File".  The associated popup menu has in its Title Bar the 
> phrase "Find File".  It is those two things that I am against continuing 
> with.  They do not help at all.

Not sure why you keep trying to reason with our "stupid minds".


        Stefan




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05 13:49       ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-05-05 16:37         ` Heime
  2024-05-05 18:03           ` Stefan Monnier
  0 siblings, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-05 16:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Monday, May 6th, 2024 at 1:49 AM, Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> > I have no complaints about naming the file as it is. But the choice of
> > words is very bad. One cannot visit something that does not exist as in
> > "Visit New File". The associated popup menu has in its Title Bar the
> > phrase "Find File". It is those two things that I am against continuing
> > with. They do not help at all.
>
>
> Not sure why you keep trying to reason with our "stupid minds". Stefan

Because with "Save As" you are doing things differently and more correctly.
At least you believe it is correct because you have done already.  Ultimately 
I try as you do with me.  Although I could stop on this one as you say.

Will do things a different way, disregarding the existence of "Visit New File".

 





^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05 16:37         ` Heime
@ 2024-05-05 18:03           ` Stefan Monnier
  2024-05-05 18:54             ` Heime
  0 siblings, 1 reply; 28+ messages in thread
From: Stefan Monnier @ 2024-05-05 18:03 UTC (permalink / raw)
  To: Heime; +Cc: help-gnu-emacs

> Will do things a different way, disregarding the existence of "Visit
> New File".

I think before treating people of stupid, I'd advise to understand why
we do things differently from what you're used to, and I get the
impression that you don't understand that yet.

Basically, in Emacs we don't distinguish whether you're opening an
existing file or a new file.  You just `C-x C-f` and then put the name
of the file.  The name of the file tells Emacs where to save backups,
which mode to use, which project it belongs to, etc...

If the user just says "give me a new file buffer", we can't provide
a very good experience because we don't know where this file will be
saved, which project it will belong to, and most importantly which mode
it should use.  LibreOffice has a similar problem so when you ask for
a "new document" it has to prompt you back to choose the kind of
document, which is akin to our major modes, except we have many more
major modes.  Choosing a file name is usually not harder for you than
choosing a major mode, and it gives Emacs more information.


        Stefan




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05 18:03           ` Stefan Monnier
@ 2024-05-05 18:54             ` Heime
  2024-05-05 19:03               ` Heime
  0 siblings, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-05 18:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Monday, May 6th, 2024 at 6:03 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > Will do things a different way, disregarding the existence of "Visit
> > New File".
> 
> 
> I think before treating people of stupid, I'd advise to understand why
> we do things differently from what you're used to, and I get the
> impression that you don't understand that yet.

You are correct, eventually you can continue with whatever you want.
And I do whatever I want to, some other way.
 
> Basically, in Emacs we don't distinguish whether you're opening an
> existing file or a new file. You just `C-x C-f` and then put the name
> of the file. The name of the file tells Emacs where to save backups,
> which mode to use, which project it belongs to, etc...
> 
> If the user just says "give me a new file buffer", we can't provide
> a very good experience because we don't know where this file will be
> saved, which project it will belong to, and most importantly which mode
> it should use. 

I agree.  There must be a misunderstanding because I have not been referring
to "give me a new file buffer".  But "give me a new file" which distinguishes 
that you are saving a new one (as with "Save As") rather than opening an 
existing one. 

> LibreOffice has a similar problem so when you ask for
> a "new document" it has to prompt you back to choose the kind of
> document, which is akin to our major modes, except we have many more
> major modes. Choosing a file name is usually not harder for you than
> choosing a major mode, and it gives Emacs more information.
> 
> 
> Stefan



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05 18:54             ` Heime
@ 2024-05-05 19:03               ` Heime
  2024-05-06  3:12                 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-05 19:03 UTC (permalink / raw)
  To: Heime; +Cc: Stefan Monnier, help-gnu-emacs

On Monday, May 6th, 2024 at 6:54 AM, Heime <heimeborgia@protonmail.com> wrote:

> On Monday, May 6th, 2024 at 6:03 AM, Stefan Monnier monnier@iro.umontreal.ca wrote:
> 
> > > Will do things a different way, disregarding the existence of "Visit
> > > New File".
> > 
> > I think before treating people of stupid, I'd advise to understand why
> > we do things differently from what you're used to, and I get the
> > impression that you don't understand that yet.
> 
> 
> You are correct, eventually you can continue with whatever you want.
> And I do whatever I want to, some other way.
> 
> > Basically, in Emacs we don't distinguish whether you're opening an
> > existing file or a new file. You just `C-x C-f` and then put the name
> > of the file. The name of the file tells Emacs where to save backups,
> > which mode to use, which project it belongs to, etc...
> > 
> > If the user just says "give me a new file buffer", we can't provide
> > a very good experience because we don't know where this file will be
> > saved, which project it will belong to, and most importantly which mode
> > it should use.
> 
> 
> I agree. There must be a misunderstanding because I have not been referring
> to "give me a new file buffer". But "give me a new file" which distinguishes
> that you are saving a new one (as with "Save As") rather than opening an
> existing one.

Well not really "give me a new file", but "save me a new file".  Like "Save As",
although "Save As" requires you to have an existing buffer.
 
> > LibreOffice has a similar problem so when you ask for
> > a "new document" it has to prompt you back to choose the kind of
> > document, which is akin to our major modes, except we have many more
> > major modes. Choosing a file name is usually not harder for you than
> > choosing a major mode, and it gives Emacs more information.
> > 
> > Stefan



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-05 19:03               ` Heime
@ 2024-05-06  3:12                 ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-05-06  7:05                   ` Stephen Berman
  0 siblings, 1 reply; 28+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-05-06  3:12 UTC (permalink / raw)
  To: help-gnu-emacs

> Well not really "give me a new file", but "save me a new file".  Like "Save As",
> although "Save As" requires you to have an existing buffer.

Then, no we don't have a command specifically dedicated to creating new
empty files (contrary to the command line which has `touch` for that).
AFAIK this is extremely rarely needed so it's unlikely Emacs will get
a standard command for that, let alone an entry in the menu bar.

But you can make your own, like

    (defun my-save-new-file (file)
      "Save a new file."
      (interactive "fNew file name: ")
      (write-region "" nil file))


- Stefan




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06  3:12                 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-05-06  7:05                   ` Stephen Berman
  2024-05-06 13:11                     ` Stefan Monnier
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Berman @ 2024-05-06  7:05 UTC (permalink / raw)
  To: Stefan Monnier via Users list for the GNU Emacs text editor
  Cc: Stefan Monnier

On Sun, 05 May 2024 23:12:39 -0400 Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

>> Well not really "give me a new file", but "save me a new file".  Like "Save As",
>> although "Save As" requires you to have an existing buffer.
>
> Then, no we don't have a command specifically dedicated to creating new
> empty files (contrary to the command line which has `touch` for that).

There's `dired-create-empty-file'...

> AFAIK this is extremely rarely needed so it's unlikely Emacs will get
> a standard command for that, let alone an entry in the menu bar.

...and it's in the "Immediate" menu in dired-mode.  (But it can of
course be invoked anywhere.)

Steve Berman



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06  7:05                   ` Stephen Berman
@ 2024-05-06 13:11                     ` Stefan Monnier
  2024-05-06 13:16                       ` Po Lu
  0 siblings, 1 reply; 28+ messages in thread
From: Stefan Monnier @ 2024-05-06 13:11 UTC (permalink / raw)
  To: Stephen Berman
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor

>> Then, no we don't have a command specifically dedicated to creating new
>> empty files (contrary to the command line which has `touch` for that).
>
> There's `dired-create-empty-file'...

Well, I'll be damned!

Thanks, Steve!


        Stefan




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 13:11                     ` Stefan Monnier
@ 2024-05-06 13:16                       ` Po Lu
  2024-05-06 13:34                         ` Heime
  2024-05-06 13:40                         ` Heime
  0 siblings, 2 replies; 28+ messages in thread
From: Po Lu @ 2024-05-06 13:16 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Stephen Berman,
	Stefan Monnier via Users list for the GNU Emacs text editor

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> Then, no we don't have a command specifically dedicated to creating new
>>> empty files (contrary to the command line which has `touch` for that).
>>
>> There's `dired-create-empty-file'...
>
> Well, I'll be damned!
>
> Thanks, Steve!

There was always "M-! touch", as well.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 13:16                       ` Po Lu
@ 2024-05-06 13:34                         ` Heime
  2024-05-06 14:44                           ` Stephen Berman
  2024-05-06 13:40                         ` Heime
  1 sibling, 1 reply; 28+ messages in thread
From: Heime @ 2024-05-06 13:34 UTC (permalink / raw)
  To: Po Lu
  Cc: Stefan Monnier, Stephen Berman,
	Stefan Monnier via Users list for the GNU Emacs text editor

On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu <luangruo@yahoo.com> wrote:

> Stefan Monnier monnier@iro.umontreal.ca writes:
> 
> > > > Then, no we don't have a command specifically dedicated to creating new
> > > > empty files (contrary to the command line which has `touch` for that).
> > > 
> > > There's `dired-create-empty-file'...
> > 
> > Well, I'll be damned!
> > 
> > Thanks, Steve!
> 
> 
> There was always "M-! touch", as well.

A great thing to have is the ability to allow people to introduce their
own menu bar items in a convenient way.  So then I can call the command 
you wrote for me.  That would assist a lot of people.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 13:16                       ` Po Lu
  2024-05-06 13:34                         ` Heime
@ 2024-05-06 13:40                         ` Heime
  1 sibling, 0 replies; 28+ messages in thread
From: Heime @ 2024-05-06 13:40 UTC (permalink / raw)
  To: Po Lu
  Cc: Stefan Monnier, Stephen Berman,
	Stefan Monnier via Users list for the GNU Emacs text editor






Sent with Proton Mail secure email.

On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu <luangruo@yahoo.com> wrote:

> Stefan Monnier monnier@iro.umontreal.ca writes:
> 
> > > > Then, no we don't have a command specifically dedicated to creating new
> > > > empty files (contrary to the command line which has `touch` for that).
> > > 
> > > There's `dired-create-empty-file'...
> > 
> > Well, I'll be damned!
> > 
> > Thanks, Steve!
> 
> 
> There was always "M-! touch", as well.

To looks that it is useful for being included in dired,
but not directly in the File Menu.  Because somebody 
decided that is rarely used.  It is never used actually,
also I don't use it.  But mainly because such possibility
does not exist.




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 13:34                         ` Heime
@ 2024-05-06 14:44                           ` Stephen Berman
  2024-05-06 16:43                             ` Heime
  0 siblings, 1 reply; 28+ messages in thread
From: Stephen Berman @ 2024-05-06 14:44 UTC (permalink / raw)
  To: Heime; +Cc: Stefan Monnier via Users list for the GNU Emacs text editor

On Mon, 06 May 2024 13:34:37 +0000 Heime <heimeborgia@protonmail.com> wrote:

> On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu <luangruo@yahoo.com> wrote:
>
>> Stefan Monnier monnier@iro.umontreal.ca writes:
>>
>> > > > Then, no we don't have a command specifically dedicated to creating new
>> > > > empty files (contrary to the command line which has `touch` for that).
>> > >
>> > > There's `dired-create-empty-file'...
>> >
>> > Well, I'll be damned!
>> >
>> > Thanks, Steve!
>>
>>
>> There was always "M-! touch", as well.
>
> A great thing to have is the ability to allow people to introduce their
> own menu bar items in a convenient way.  So then I can call the command
> you wrote for me.  That would assist a lot of people.

It's pretty convenient with `easy-menu-define':

(defun heime-new-file ()
  "Open a new empty file using `dired-create-empty-file'."
  (interactive)
  (require 'dired-aux)
  (call-interactively #'dired-create-empty-file))

(easy-menu-define heime-menu global-map
  "Heime's very own menu."
  '("Heime"
    ("File"
     ["New File" heime-new-file t])))

Steve Berman



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 14:44                           ` Stephen Berman
@ 2024-05-06 16:43                             ` Heime
  2024-05-06 16:54                               ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-05-06 17:00                               ` Stephen Berman
  0 siblings, 2 replies; 28+ messages in thread
From: Heime @ 2024-05-06 16:43 UTC (permalink / raw)
  To: Stephen Berman
  Cc: Stefan Monnier via Users list for the GNU Emacs text editor

On Tuesday, May 7th, 2024 at 2:44 AM, Stephen Berman <stephen.berman@gmx.net> wrote:

> On Mon, 06 May 2024 13:34:37 +0000 Heime heimeborgia@protonmail.com wrote:
> 
> > On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu luangruo@yahoo.com wrote:
> > 
> > > Stefan Monnier monnier@iro.umontreal.ca writes:
> > > 
> > > > > > Then, no we don't have a command specifically dedicated to creating new
> > > > > > empty files (contrary to the command line which has `touch` for that).
> > > > > 
> > > > > There's `dired-create-empty-file'...
> > > > 
> > > > Well, I'll be damned!
> > > > 
> > > > Thanks, Steve!
> > > 
> > > There was always "M-! touch", as well.
> > 
> > A great thing to have is the ability to allow people to introduce their
> > own menu bar items in a convenient way. So then I can call the command
> > you wrote for me. That would assist a lot of people.
> 
> 
> It's pretty convenient with `easy-menu-define': (defun heime-new-file () "Open a new empty file using` dired-create-empty-file'."
> (interactive)
> (require 'dired-aux)
> (call-interactively #'dired-create-empty-file))
> 
> (easy-menu-define heime-menu global-map
> "Heime's very own menu."
> '("Heime"
> ("File"
> ["New File" heime-new-file t])))
> 
> Steve Berman


Why don't you allow others to add to the existing menus rather than 
our own separate menus.



^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 16:43                             ` Heime
@ 2024-05-06 16:54                               ` Stefan Monnier via Users list for the GNU Emacs text editor
  2024-05-06 17:00                               ` Stephen Berman
  1 sibling, 0 replies; 28+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-05-06 16:54 UTC (permalink / raw)
  To: help-gnu-emacs

> Why don't you allow others to add to the existing menus rather than 
> our own separate menus.  

What makes you think we don't allow that?


        Stefan




^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Making new files
  2024-05-06 16:43                             ` Heime
  2024-05-06 16:54                               ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-05-06 17:00                               ` Stephen Berman
  1 sibling, 0 replies; 28+ messages in thread
From: Stephen Berman @ 2024-05-06 17:00 UTC (permalink / raw)
  To: Heime; +Cc: Stefan Monnier via Users list for the GNU Emacs text editor

On Mon, 06 May 2024 16:43:59 +0000 Heime <heimeborgia@protonmail.com> wrote:

> On Tuesday, May 7th, 2024 at 2:44 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
>
>> On Mon, 06 May 2024 13:34:37 +0000 Heime heimeborgia@protonmail.com wrote:
>>
>> > On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu luangruo@yahoo.com wrote:
>> >
>> > > Stefan Monnier monnier@iro.umontreal.ca writes:
>> > >
>> > > > > > Then, no we don't have a command specifically dedicated to creating new
>> > > > > > empty files (contrary to the command line which has `touch` for that).
>> > > > >
>> > > > > There's `dired-create-empty-file'...
>> > > >
>> > > > Well, I'll be damned!
>> > > >
>> > > > Thanks, Steve!
>> > >
>> > > There was always "M-! touch", as well.
>> >
>> > A great thing to have is the ability to allow people to introduce their
>> > own menu bar items in a convenient way. So then I can call the command
>> > you wrote for me. That would assist a lot of people.
>>
>>
>> It's pretty convenient with `easy-menu-define': (defun heime-new-file ()
>> "Open a new empty file using` dired-create-empty-file'."
>> (interactive)
>> (require 'dired-aux)
>> (call-interactively #'dired-create-empty-file))
>>
>> (easy-menu-define heime-menu global-map
>> "Heime's very own menu."
>> '("Heime"
>> ("File"
>> ["New File" heime-new-file t])))
>>
>> Steve Berman
>
>
> Why don't you allow others to add to the existing menus rather than
> our own separate menus.

(keymap-set-after menu-bar-file-menu "<NEW-FILE>"
  '("New Empty File" . heime-new-file) 'new-file)

Steve Berman



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-05-06 17:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-03 23:57 Making new files Heime
2024-05-04  0:15 ` Po Lu
2024-05-04  7:41   ` Yuri Khan
2024-05-04  8:16     ` Eli Zaretskii
2024-05-04 16:08       ` Heime
2024-05-04 16:23         ` Eli Zaretskii
2024-05-04 16:40           ` Heime
2024-05-05  2:09         ` జిందం వాఐి
2024-05-05  2:28           ` Heime
2024-05-05  2:53             ` Po Lu
2024-05-05  3:07               ` Heime
2024-05-05  3:18                 ` Heime
2024-05-04 22:37     ` Heime
2024-05-05 13:49       ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-05-05 16:37         ` Heime
2024-05-05 18:03           ` Stefan Monnier
2024-05-05 18:54             ` Heime
2024-05-05 19:03               ` Heime
2024-05-06  3:12                 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-05-06  7:05                   ` Stephen Berman
2024-05-06 13:11                     ` Stefan Monnier
2024-05-06 13:16                       ` Po Lu
2024-05-06 13:34                         ` Heime
2024-05-06 14:44                           ` Stephen Berman
2024-05-06 16:43                             ` Heime
2024-05-06 16:54                               ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-05-06 17:00                               ` Stephen Berman
2024-05-06 13:40                         ` Heime

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).