From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#30285: dired-do-chmod vs. top line of dired Date: Wed, 31 Jan 2018 23:35:09 +0200 Organization: LINKOV.NET Message-ID: <87fu6lwxxu.fsf@mail.linkov.net> 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1517435785 9591 195.159.176.226 (31 Jan 2018 21:56:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Jan 2018 21:56:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) 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 Wed Jan 31 22:56:21 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 1eh0MU-0001ZD-Cn for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jan 2018 22:56:10 +0100 Original-Received: from localhost ([::1]:34203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eh0OV-0007bs-7a for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Jan 2018 16:58:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eh0OM-0007bF-9n for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2018 16:58:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eh0OJ-0006g9-8h for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2018 16:58:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eh0OJ-0006fu-50 for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2018 16:58:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eh0OI-0007BU-SZ for bug-gnu-emacs@gnu.org; Wed, 31 Jan 2018 16:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jan 2018 21:58:02 +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.151743582327502 (code B ref 30285); Wed, 31 Jan 2018 21:58:02 +0000 Original-Received: (at 30285) by debbugs.gnu.org; 31 Jan 2018 21:57:03 +0000 Original-Received: from localhost ([127.0.0.1]:51558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eh0NJ-00079C-Bt for submit@debbugs.gnu.org; Wed, 31 Jan 2018 16:57:03 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:35178 helo=homiemail-a20.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eh0NH-000794-Ad for 30285@debbugs.gnu.org; Wed, 31 Jan 2018 16:56:59 -0500 Original-Received: from homiemail-a20.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a20.g.dreamhost.com (Postfix) with ESMTP id 55CC07EC064; Wed, 31 Jan 2018 13:56:58 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-107-8.cust.tele2.ee [91.129.107.8]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a20.g.dreamhost.com (Postfix) with ESMTPSA id AB5A47EC063; Wed, 31 Jan 2018 13:56:56 -0800 (PST) In-Reply-To: (Drew Adams's message of "Mon, 29 Jan 2018 15:42:59 -0800 (PST)") 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:142753 Archived-At: >> 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. Instead of doing nothing or showing an error message, how about doing a more useful thing: when on the top line, =E2=80=98dired-do-chmod=E2= =80=99 could do chmod on all files in the dir. This is exactly what other Dired commands already do: e.g. typing =E2=80=98= m=E2=80=99 on the top line or on any other subdir headerline, they perform their actions on all files. For example, see the docstring of =E2=80=98dired-mark=E2=80=99: =E2=80=9CIf on a subdir headerline, mark all its files except `.' and `= ..'.=E2=80=9D > No, we don't need a function `dired-marked-files-or-file-at-point-p', > for that or anything else. The `dired-do-*' commands already DTRT > wrt the marked-files-or-file-at-point. I agree that it's better to check the =E2=80=98files=E2=80=99 returned fr= om =E2=80=98dired-get-marked-files=E2=80=99.