[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making new files
From: |
Stephen Berman |
Subject: |
Re: Making new files |
Date: |
Mon, 06 May 2024 19:00:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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
- Re: Making new files, (continued)
- Re: Making new files, Heime, 2024/05/05
- Re: Making new files, Heime, 2024/05/05
- Re: Making new files, Stefan Monnier, 2024/05/05
- Re: Making new files, Stephen Berman, 2024/05/06
- Re: Making new files, Stefan Monnier, 2024/05/06
- Re: Making new files, Po Lu, 2024/05/06
- Re: Making new files, Heime, 2024/05/06
- Re: Making new files, Stephen Berman, 2024/05/06
- Re: Making new files, Heime, 2024/05/06
- Re: Making new files, Stefan Monnier, 2024/05/06
- Re: Making new files,
Stephen Berman <=
- Re: Making new files, Heime, 2024/05/06