bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24150: 26.0.50; New command: dired-create-empty-file


From: Eli Zaretskii
Subject: bug#24150: 26.0.50; New command: dired-create-empty-file
Date: Fri, 20 Jul 2018 12:03:05 +0300

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Tue, 17 Jul 2018 16:39:27 +0900
> Cc: bug-gnu-emacs <bug-gnu-emacs-bounces+psainty=orcon.net.nz@gnu.org>,
>       tino.calancha@gmail.com, tzz@lifelogs.com, clement.pit@gmail.com,
>       Michael Albinus <michael.albinus@gmx.de>, 24150@debbugs.gnu.org,
>       sdl.web@gmail.com
> 
> At this stage, I am happy to focus the discussion on the acceptance
> of the command itself.

I think we all agree that such a command would be a good feature.

As for your (Tino's) patch, I was somewhat surprised to see how much
code you needed.  We have the capability of creating parent
directories in 'make-directory', so I thought all we'd need for
creating a new file is this two-step dance:

  . call make-directory to maybe create the file's parent directory
  . call write-region to create the file itself

What did I miss that needs so many lines of code?

The advantage of the above seems to be that we don't need any
refactoring to create the internal make--empty-file-or-directory
function.

Also, once we settle on the implementation, please don't forget NEWS
and the manuals.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]