From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Re: master b8d4242e8bd 1/2: New user option 'shell-command-guess-functions' (bug#18132) Date: Wed, 29 Nov 2023 20:14:54 +0100 Message-ID: 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: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11529"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Juri Linkov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 29 20:16:14 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 1r8Q2g-0002rA-4y for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Nov 2023 20:16:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8Q1S-0001ct-Jx; Wed, 29 Nov 2023 14:14:58 -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 1r8Q1R-0001cP-Kq for emacs-devel@gnu.org; Wed, 29 Nov 2023 14:14:57 -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 1r8Q1Q-0004CB-W6; Wed, 29 Nov 2023 14:14:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Xf8VNw10ADnSFSqDWfVZaT6dSegVBIgk0ZViQ+lUfm4=; b=HoSxvrKWk2/+K0yEVQif SHFxzRLEIzha+K+G4OqigCz3Jx7M1l4QRiTxiqCHblPV3SC9oXowuDy8S3Iurwlt0GX63zEAdUFde k9flUsaMgM5IBEkVPEST6GP6JCrKB53BHOjhZ4gkDzqa0dLJwiTOJ4C6bbkfXpDZP6yi8tk5HlYcp v4wc/qtcPauabzB/T4szAjDv9H5pBc/eDqMd4+yZR3Uriq/ncDusWbcKNAgABB86tstStLvamBuKl nVcZHs22uVI3RLmgj1XwfVJddX/X3qJrwnzOGBltRsZyMgxTYN+TNw4fsmcTt1t/Oe0Foqhu7b12Q uc/AOOo5AZx2tw==; In-Reply-To: <20231127173714.78D41C36D10@vcs2.savannah.gnu.org> (Juri Linkov's message of "Mon, 27 Nov 2023 12:37:13 -0500 (EST)") 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:313372 Archived-At: Juri Linkov writes: > branch: master > commit b8d4242e8bdbdb6ca364bf0760e50689f6a6e118 > Author: Juri Linkov > Commit: Juri Linkov > [...] > diff --git a/lisp/simple.el b/lisp/simple.el > index 02c68912dba..35bce6ab4b8 100644 > --- a/lisp/simple.el > +++ b/lisp/simple.el > @@ -4273,19 +4273,17 @@ This buffer is used when `shell-command' or `shel= l-command-on-region' > is run interactively. A value of nil means that output to stderr and > stdout will be intermixed in the output stream.") >=20=20 > -(declare-function mailcap-file-default-commands "mailcap" (files)) > (declare-function dired-get-filename "dired" (&optional localp no-error-= if-not-filep)) >=20=20 > (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 =E2=80=98shell-command-guess=E2=80= =99 is not known to be defined. Maybe you want to declare that function? This is with Emacs 30 (a811846879) on macOS. Best, Arash