GNU bug report logs - #30285
dired-do-chmod vs. top line of dired

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 29 Jan 2018 12:44:01 UTC

Severity: minor

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 30285 <at> debbugs.gnu.org, jidanni <at> jidanni.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: bug#30285: dired-do-chmod vs. top line of dired
Date: Wed, 31 Jan 2018 23:35:09 +0200
>> 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, ‘dired-do-chmod’
could do chmod on all files in the dir.

This is exactly what other Dired commands already do: e.g. typing ‘m’
on the top line or on any other subdir headerline, they perform
their actions on all files.

For example, see the docstring of ‘dired-mark’:

  “If on a subdir headerline, mark all its files except `.' and `..'.”

> 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 ‘files’ returned from
‘dired-get-marked-files’.




This bug report was last modified 7 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.