From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master b8d4242e8bd 1/2: New user option 'shell-command-guess-functions' (bug#18132) Date: Thu, 30 Nov 2023 08:08:16 +0200 Message-ID: <83r0k76aen.fsf@gnu.org> References: <170110663333.10282.3772392230229139487@vcs2.savannah.gnu.org> <20231127173714.78D41C36D10@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9502"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, juri@linkov.net To: Arash Esbati Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 30 07:08:58 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r8aEL-0002BZ-Q8 for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Nov 2023 07:08:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8aDs-0002ZZ-KZ; Thu, 30 Nov 2023 01:08:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8aDq-0002Z5-7r for emacs-devel@gnu.org; Thu, 30 Nov 2023 01:08:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8aDo-0005wg-T3; Thu, 30 Nov 2023 01:08:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=CM0Nd8FTmg+p3xbWi17DrPOFvTgS1FdO940kHCwcFLs=; b=Wb+QeineJAgOChWyflak 6f13DrfmwX2UxGFZ8+IDleJda83B7rCu2k7HW+Qa+UFdiAObkyLBsajxje6X/V+gLaqteLdMLbDVm VWJ5EpaOJQX3h58Zc+APQGIyiFuDovpr/Ft8nhg9vYxEH7JMLgZUGyMy0AH79nu5nw3bRxrxM8a4n dPz/F2Z+3pTIotR8nw0o9LghlXwZgdpqWpVuSaCDDe7ORgmWw+/4TmQGSCzn2XjDxM7ujwuxjZ1bs N6ilOGzNjEhxc+TtgpxCjps37c+a1l6tdG5IrGf2TLyV+wwI9CMiFC1QbD+aLKa0lMy1FB8AtzVog uWnaWKCyexI5JQ==; In-Reply-To: (message from Arash Esbati on Wed, 29 Nov 2023 20:14:54 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313383 Archived-At: > From: Arash Esbati > Cc: Juri Linkov > Date: Wed, 29 Nov 2023 20:14:54 +0100 > > Juri Linkov writes: > > > (defun minibuffer-default-add-shell-commands () > > "Return a list of all commands associated with the current file. > > -This function is used to add all related commands retrieved by `mailcap' > > -to the end of the list of defaults just after the default value." > > - (interactive) > > +This function is used to add all related commands retrieved by > > +`shell-command-guess' to the end of the list of defaults just > > +after the default value." > > (let* ((filename (if (listp minibuffer-default) > > (car minibuffer-default) > > minibuffer-default)) > > - (commands (and filename (require 'mailcap nil t) > > - (mailcap-file-default-commands (list filename))))) > > + (commands (and filename (shell-command-guess (list filename))))) > > (setq commands (mapcar (lambda (command) > > (concat command " " filename)) > > commands)) > > This give me: > > ELC+ELN ../lisp/simple.elc > In end of data: > simple.el:4286:35: Warning: the function ‘shell-command-guess’ is not > known to be defined. > > Maybe you want to declare that function? This is with Emacs 30 > (a811846879) on macOS. Same as previously: recompile once more, and the warning will be gone. There's no problem here.