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: Tino Calancha <tino.calancha <at> gmail.com>
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: Tue, 30 Jan 2018 12:53:05 +0900 (JST)

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




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.