GNU bug report logs - #2028
23.0.60; (1) dired-guess-default should remove duplicates (2) doc string

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 24 Jan 2009 18:50:03 UTC

Severity: minor

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2028 in the body.
You can then email your comments to 2028 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#2028; Package emacs. (Sat, 24 Jan 2009 18:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 24 Jan 2009 18:50:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <emacs-pretest-bug <at> gnu.org>
Subject: 23.0.60; (1) dired-guess-default should remove duplicates (2) doc string
Date: Sat, 24 Jan 2009 10:41:44 -0800
`dired-guess-default' returns a list of default shell commands
appropriate for its input, FILES.  It should remove duplicates from
this list before returning it.
 
Also, the doc string is:
 
"Guess a shell commands for FILES.  Return command or list of commands.
See `dired-guess-shell-alist-user'."
 
This is not correct grammatically. Suggestion:
 
"Return a shell command, or a list of such, appropriate for FILES.
See `dired-guess-shell-alist-user'."
 

BTW (I didn't check the code - just a naive question): Why do we
return sometimes a single command instead of a singleton list of that
command? What is gained by this added complexity? Is there some
calling code that *must* receive a command and not a list of commands?
It seems like any calling code would need to be able to handle the
list case, including a singleton list, anyway.
 
 
 
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2009-01-04 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
 





Severity set to `minor' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 25 Feb 2009 08:55:05 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 11 Jul 2011 13:41:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 2028 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 11 Jul 2011 13:41:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#2028; Package emacs. (Mon, 11 Jul 2011 13:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 2028 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 2028 <at> debbugs.gnu.org
Subject: Re: 23.0.60;
	(1) dired-guess-default should remove duplicates (2) doc string
Date: Mon, 11 Jul 2011 15:39:57 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> `dired-guess-default' returns a list of default shell commands
> appropriate for its input, FILES.  It should remove duplicates from
> this list before returning it.

Ok; done.

> Also, the doc string is:
>
> "Guess a shell commands for FILES.  Return command or list of commands.
> See `dired-guess-shell-alist-user'."
>
> This is not correct grammatically. Suggestion:
>
> "Return a shell command, or a list of such, appropriate for FILES.
> See `dired-guess-shell-alist-user'."

I've changed it to something like that.

> BTW (I didn't check the code - just a naive question): Why do we
> return sometimes a single command instead of a singleton list of that
> command? What is gained by this added complexity? Is there some
> calling code that *must* receive a command and not a list of commands?

I'm guessing somebody extended the function at some point.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 09 Aug 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 275 days ago.

Previous Next


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