unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tzz@lifelogs.com, clement.pit@gmail.com,
	Tino Calancha <tino.calancha@gmail.com>,
	sdl.web@gmail.com, 24150@debbugs.gnu.org
Subject: bug#24150: 26.0.50; New command: dired-create-empty-file
Date: Tue, 4 Jul 2017 00:04:31 +0900 (JST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1707032336370.10724@calancha-pc> (raw)
In-Reply-To: <83y3s5oaxo.fsf@gnu.org>



On Mon, 3 Jul 2017, Eli Zaretskii wrote:

Thanks for your comprehensive replay.
You know, you are the boss, so i will do what you say i must do.  Anyway,
let me defend my point after your replay.
> First, I think this might be mixing two separate requests: one is the
> desire to start a new file from Dired, the other is to create an empty
> file on disk.  I think these should be kept separate because they
> serve 2 different needs; in particular, the latter is not related to
> Dired in any way.
Honestly, i don't see the point to add a new keybinding in Dired for 
`find-file' having already the global `C-x C-f'.  I think the 
people in the threads are all aware about `C-x C-f': they are not looking
for reduce `find-file' to just one key. 
To me, it seems that those people are demanding for fast 
creationg of an _empty_ new file in Dired.  At least is what i got after 
reading them.

> I have no issues with adding a Dired keybinding that would call
> find-file without much ado.  I'm not sure whether it should be bound
> to M-+ or to "C-u +", but I will defer to opinions of others on that.
>
> But I don't think M-+ or whatever we bind that command to should
> actually _create_ an empty file on disk.  This is not how Emacs works
> with files; "C-x C-f" will not create a file until you save the
> buffer.  That "+" actually creates a directory is IMO an exception
> rather than the rule: nothing else makes sense with directories, since
> users cannot type directory contents into a buffer and then save it,
> at least not easily.
Dired is a file/directory manager inside Emacs.  I could even imagine 
people whom uses Emacs just to use Dired, because I was one of those guys.
You are right, a command to create an empty file is not the usual way 
for Emacs, as an editor, but I consider perfectly reasonable/necessary to 
assign a keybinding in a file manager for such operation.  One person in 
the threads above mentioned he wished this feature when working in a 
python project.  I often felt the same when working in python projects.

> I do recognize a possible need for a function, or maybe even a
> command, to create an empty disk file.  AFAIK, we don't have such a
> function, although it's not hard to write.  But I think the use cases
> for such a command are quite rare and niche cases, so I think we
> shouldn't have a keybinding for it, not even in Dired.
Obviosly is disagree here.  I found it useful in my workflow, that's why i 
wrote the function and opened the issue.  Many people watched the threads,
that means is not such rare feature.
> Let users who
> need this command frequently bind it to a key; with time, if it turns
> out I'm wrong and these use cases are much more frequent, we can
> decide on providing a binding by default.
>
> So, to summarize my POV: (a) it's okay to add a Dired keybinding for
> find-file; (b) let's add a command with no binding for creating an
> empty file.
I don't find useful (a).
The (b), for the normal user not hacking the lisp sources, doesn't make
much difference:
M-! touch new-file RET
M-x my-create-empty-file RET
;; The only difference is that the second will create parents dirs as 
;; needed.

We shouldn't assume that most of Emacs users set up their own bindings.  I 
know many buddies loving Emacs, using it many hours per day for 
working, and they keep their defaults .emacs files.
They don't know elisp.  They just want everything comes built-in.
We must not defraud those people.





  reply	other threads:[~2017-07-03 15:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 13:25 bug#24150: 25.1.50; New command: dired-create-empty-file Tino Calancha
2016-08-04 13:54 ` Clément Pit--Claudel
2016-08-04 16:29 ` Leo Liu
2016-08-04 17:13   ` Ted Zlatanov
2016-08-04 17:29     ` Drew Adams
2016-08-05  6:03 ` Tino Calancha
2016-08-05 14:48   ` Drew Adams
2016-08-06 12:38     ` Tino Calancha
2016-08-05  6:07 ` Tino Calancha
2017-05-03  8:23 ` Tino Calancha
2017-07-03  4:51 ` bug#24150: 26.0.50; " Tino Calancha
2017-07-03 14:24   ` Eli Zaretskii
2017-07-03 15:04     ` Tino Calancha [this message]
2017-07-03 16:33       ` Eli Zaretskii
2017-07-03 20:18         ` Thien-Thi Nguyen
2017-07-07 13:13         ` Ted Zlatanov
2017-07-07 13:17           ` Drew Adams
2017-07-07 13:31             ` Ted Zlatanov
2017-07-03 15:12     ` Drew Adams
2017-07-05 18:28   ` Eli Zaretskii
2017-07-05 19:34     ` Drew Adams
2017-07-07  5:36       ` Tino Calancha
2017-07-07 11:11         ` Drew Adams
2018-07-10  7:01           ` Tino Calancha
2018-07-10  7:42             ` Phil Sainty
2018-07-17  7:39               ` Tino Calancha
2018-07-20  9:03                 ` Eli Zaretskii
2018-07-23  3:57                   ` Tino Calancha
2018-07-27  8:39                     ` Eli Zaretskii
2018-07-31  4:47                       ` Tino Calancha
2018-07-31 16:20                         ` Eli Zaretskii
2018-08-01  5:16                           ` Tino Calancha
2018-08-01  6:24                             ` Eli Zaretskii
2018-08-01  7:13                               ` Tino Calancha
2018-08-01  8:56                                 ` Eli Zaretskii
2018-08-01  9:31                                   ` Tino Calancha
2018-08-01 11:45                                     ` Eli Zaretskii
2018-08-02  4:34                                       ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1707032336370.10724@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=24150@debbugs.gnu.org \
    --cc=clement.pit@gmail.com \
    --cc=eliz@gnu.org \
    --cc=sdl.web@gmail.com \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).