From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#24150: 26.0.50; New command: dired-create-empty-file Date: Tue, 4 Jul 2017 00:04:31 +0900 (JST) Message-ID: References: <87mv8m3yya.fsf@calancha-pc> <83y3s5oaxo.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1499094314 28696 195.159.176.226 (3 Jul 2017 15:05:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Jul 2017 15:05:14 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: tzz@lifelogs.com, clement.pit@gmail.com, Tino Calancha , sdl.web@gmail.com, 24150@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 03 17:05:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS2uR-000793-8W for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jul 2017 17:05:07 +0200 Original-Received: from localhost ([::1]:35712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS2uW-0004p8-DB for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Jul 2017 11:05:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dS2uQ-0004nq-4G for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 11:05:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dS2uL-0002Vx-UO for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 11:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dS2uL-0002Vo-Qj for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 11:05:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dS2uL-00076o-K8 for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2017 11:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jul 2017 15:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24150 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24150-submit@debbugs.gnu.org id=B24150.149909428327295 (code B ref 24150); Mon, 03 Jul 2017 15:05:01 +0000 Original-Received: (at 24150) by debbugs.gnu.org; 3 Jul 2017 15:04:43 +0000 Original-Received: from localhost ([127.0.0.1]:50478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS2u3-00076B-JB for submit@debbugs.gnu.org; Mon, 03 Jul 2017 11:04:43 -0400 Original-Received: from mail-pg0-f44.google.com ([74.125.83.44]:33674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS2u1-00075z-Ut for 24150@debbugs.gnu.org; Mon, 03 Jul 2017 11:04:42 -0400 Original-Received: by mail-pg0-f44.google.com with SMTP id k14so20767470pgr.0 for <24150@debbugs.gnu.org>; Mon, 03 Jul 2017 08:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=SB3gu+Pb63anC/qctqM2BQ+1eIDovYUACRJ7Sh5RTjQ=; b=Ozpv5zgXLa+TVHNDTYobtBEAQvDAtXieYBnvUfSilKZC8vxtuitkWj6+sUKeAeOcsk S9KvlQCwXkV1CZyJFxcp2LxxPOAzWothaQ4RIR16le68BN5C0XtxqWFBXRUx7FDBhnxv e2QrSzT6EJDGbQ8un/vU55mOd8eGjA3yQZ8l4xSOdvuLpToPpKsDe2ndmIWzL6rpZG8R Sk49GELfp4jaBI8C+idxZsIh0Xz8O+wgxt87ph6F5OPwQBbwB3IwuY1zfTN5grTQl6VJ X10tZXsG9B1bakHo/QZI9aUXZR+GjDONEgTbLusLonzXH36StyjUJ6CqmgODJEESGnq2 FXQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=SB3gu+Pb63anC/qctqM2BQ+1eIDovYUACRJ7Sh5RTjQ=; b=ZjOPoMCQx7sOgQqMzdQ6W3trVz9GS16Q2by/Bo82j5T/ErbBeMNZ7fnUyrtG7qP69a 3GhS1ApHp3WyRdFkQvF7zztLNSM1riWDLQkO4TJ4N2XMnHifCMzBfBzzajvTmZXlj6/x t9jy+YSKpBYxGcv+BjuzSK6HpJ307nuA/Ny6LsgB/dqYo4q4K805Qqr/pzSUdaN4fLwb xp0zsvboyJ6463Yfn8FIWyIczJwaDCUYBUpDlTjXOy+zkwJsCgYoNNe0X1bVuN6u5dhB 5XvXYD0Qsv9RNj1mgVCuhZ+6AvSp6iadQa6RjdcyiNtL9kEmZrPp66ILx7JELSZLZAMU K1Ig== X-Gm-Message-State: AIVw112n/WCEcHhtu5UtbrC7CCM87U46CGFowvdYKP9RFMzhWKfidKIH TYRZCVHnIkndJA== X-Received: by 10.84.236.14 with SMTP id q14mr10957212plk.254.1499094276145; Mon, 03 Jul 2017 08:04:36 -0700 (PDT) Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id a29sm38985611pfg.30.2017.07.03.08.04.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 08:04:35 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <83y3s5oaxo.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134125 Archived-At: 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.