[Top][All Lists]

[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 <address@hidden>
> Date: Tue, 17 Jul 2018 16:39:27 +0900
> Cc: bug-gnu-emacs <address@hidden>,
>       address@hidden, address@hidden, address@hidden,
>       Michael Albinus <address@hidden>, address@hidden,
>       address@hidden
> 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

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


reply via email to

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