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#30285: dired-do-chmod vs. top line of dired Date: Tue, 30 Jan 2018 12:53:05 +0900 (JST) Message-ID: References: <87mv0wg80c.fsf@jidanni.org> <87efm8snnr.fsf@gmail.com> <83efm8irac.fsf@gnu.org> <87d11sl08v.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1517284363 7262 195.159.176.226 (30 Jan 2018 03:52:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Jan 2018 03:52:43 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: 30285@debbugs.gnu.org, Tino Calancha , jidanni@jidanni.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 30 04:52:39 2018 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 1egMxy-00005B-2J for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jan 2018 04:52:14 +0100 Original-Received: from localhost ([::1]:35072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egMzt-0006SY-U8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jan 2018 22:54:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egMzm-0006SI-8i for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2018 22:54:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egMzi-0000Nu-9r for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2018 22:54:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40532) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1egMzi-0000Nh-5v for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2018 22:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1egMzh-0001Vz-S5 for bug-gnu-emacs@gnu.org; Mon, 29 Jan 2018 22:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jan 2018 03:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30285 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30285-submit@debbugs.gnu.org id=B30285.15172843975773 (code B ref 30285); Tue, 30 Jan 2018 03:54:01 +0000 Original-Received: (at 30285) by debbugs.gnu.org; 30 Jan 2018 03:53:17 +0000 Original-Received: from localhost ([127.0.0.1]:48429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egMyz-0001V3-AD for submit@debbugs.gnu.org; Mon, 29 Jan 2018 22:53:17 -0500 Original-Received: from mail-pf0-f179.google.com ([209.85.192.179]:41737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egMyy-0001Ur-36 for 30285@debbugs.gnu.org; Mon, 29 Jan 2018 22:53:16 -0500 Original-Received: by mail-pf0-f179.google.com with SMTP id c6so7501976pfi.8 for <30285@debbugs.gnu.org>; Mon, 29 Jan 2018 19:53:15 -0800 (PST) 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=j37+1oZC9QdEL12FUC8VzEAUQ0p1bT3bp2XxhT2VdRs=; b=k3zPX/QMBmGrLdzqqZQyScBnqdOPgM2khDduErwclZqO7A+6/Vi78vvN4daaWtg3lS fBRxqbGssXknXrhRfrWoDL008dNqgvZ1nhipgT28tB3301g3ERs9G2B7oGb42Ki70+2p /kBbwFAsA9wULuPWq2FKcgifaP2vYeysPPq7ECjMcn0E/jZ8IVQAhu6MD/o2TasYEnq4 i0KVUUmDo7X93Y3jxAYAnkz6JLoqnpuhCOoHDyVGmS5jLJ+30K6Vj3BG5OaarHAyRmtP lTsaMGPL4fxX6kLcPzs98yDNFsO1CxzwcE426vROvr7P1xKN8PXMIzHuhi887l+Au5vj 9kvw== 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=j37+1oZC9QdEL12FUC8VzEAUQ0p1bT3bp2XxhT2VdRs=; b=XCwu9zjeczrr2Qec8+oNxF7oGYAsuRGhAEimkM7xmKFkxYO8KfT3Mw8DPbSC1VM9J/ pLL1TNIGjmfMyjF7bkGj1pCfILeKQOXD95lTAKiXbIOI5vEpHwJH1HpBL37CuT0f+59O QCS1rShpunx526NL+a282fK7JWs/UtNTgvL0l2HJKzvPKPx36fioAf7bDxfl6QSG6r/2 pZ1kIYGjAbv+5BFZnCqvkjMV98pHSy2MLiMAztVtCiY0I+hDFGtGKiOMGd/Nbw22YGqw v6JCBM3XxN9mLRvp+xV2yHpyGpXiBeG8bjsX2xCyHZlVvIuPCU2bUz6BivopxpEJPavC Trjw== X-Gm-Message-State: AKwxyteUkscXBp1TKnrfg6drquAzcXV7sa2cIzr9wFji09nWD5qyw+s7 PxGJvVidBw5DK7RPPW/8bQU= X-Google-Smtp-Source: AH8x224n4QBKhBe7er7+9Kd4r7tZUf0iWXk5c0YSG95brs3RZBLeLTRqdiTiwHTOpnX9DPlsluQ38g== X-Received: by 10.98.103.83 with SMTP id b80mr28681111pfc.223.1517284390173; Mon, 29 Jan 2018 19:53:10 -0800 (PST) Original-Received: from calancha-pc (FL1-125-193-170-29.tky.mesh.ad.jp. [125.193.170.29]) by smtp.gmail.com with ESMTPSA id o7sm16824710pgp.18.2018.01.29.19.53.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Jan 2018 19:53:09 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: 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:142680 Archived-At: On Mon, 29 Jan 2018, Drew Adams wrote: >>>>> (Why doesn't it just complain "can't operate on" like it does for >> the >>>>> third line, ".".) >>>> Following patch just do nothing in these cases. That's OK for me. >>>> Do you prefer to inform the user in this case that there is no file >>>> to change the mode? >>> >>> Yes, I think we should produce some message in these cases. >> OK. Then, we must adjust other siblings commands (dired-do-chgrp, >> dired-do-chown); otherwise they might become jealous. >> I propose to add a new predicate >> `dired-marked-files-or-file-at-point-p', and used it in all those >> commands. > > Please don't do any such thing. > > Yes, it makes sense for such commands to do nothing or to show an > error message when on the "top line of dired", as described in the > bug report. OK, I see you agree with Eli and me. the rest I believe is just funny misunderstanding :-) > No, we don't need a function `dired-marked-files-or-file-at-point-p', > for that or anything else. Probably not, but it looks tidy in my patch to add one to reinforce DRY. > The `dired-do-*' commands already DTRT wrt the marked-files-or-file-at-point. No, they don't. They annoying users asking a useless prompt, like: Change mode of * [0 files] to: ;; Just to notify the user after his input: No file on this line This is like if I ask my gf: Dear, do you want I change diapers to [0 of our children]? ;; After she answer... Ohhh, I just remembered we have no kids!!! ;; After that silly question probably I will not have gf either... > And no, it doesn't make sense to act that way on `.' - it's OK to > change the properties of the current directory (provided you have > the necessary permissions). Indeed, I don't want to change that and I agree with you. I just offered the OP to open another bug report with this topic if he likes. This bug report is just about the unnecessary prompt in the top line. > The question of `..' is arguable, but I'd say the same thing for > it as for `.': It's OK to change its properties, provided you have > permission to do so. After all, `..' is just a (unique) directory. Nobody said the opposite :-D > > How did this bug report move from being about behavior on the top > line (and the second, "total" etc. line) to being also about the > lines for `.' and `..'? No idea... maybe it just happened in your mind, or you had a dream last night about it ;-)