all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arash Esbati <arash@gnu.org>
To: emacs-devel@gnu.org
Cc: Juri Linkov <juri@linkov.net>
Subject: Re: master b8d4242e8bd 1/2: New user option 'shell-command-guess-functions' (bug#18132)
Date: Wed, 29 Nov 2023 20:14:54 +0100	[thread overview]
Message-ID: <m2r0k8z80h.fsf@macmutant.fritz.box> (raw)
In-Reply-To: <20231127173714.78D41C36D10@vcs2.savannah.gnu.org> (Juri Linkov's message of "Mon, 27 Nov 2023 12:37:13 -0500 (EST)")

Juri Linkov <juri@jurta.org> writes:

> branch: master
> commit b8d4242e8bdbdb6ca364bf0760e50689f6a6e118
> Author: Juri Linkov <juri@linkov.net>
> Commit: Juri Linkov <juri@linkov.net>
> [...]
> 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 `shell-command-on-region'
>  is run interactively.  A value of nil means that output to stderr and
>  stdout will be intermixed in the output stream.")
>  
> -(declare-function mailcap-file-default-commands "mailcap" (files))
>  (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
>  
>  (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.

Best, Arash



       reply	other threads:[~2023-11-29 19:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <170110663333.10282.3772392230229139487@vcs2.savannah.gnu.org>
     [not found] ` <20231127173714.78D41C36D10@vcs2.savannah.gnu.org>
2023-11-29 19:14   ` Arash Esbati [this message]
2023-11-30  6:08     ` master b8d4242e8bd 1/2: New user option 'shell-command-guess-functions' (bug#18132) Eli Zaretskii
2023-11-30 17:22       ` Juri Linkov
2023-11-30 17:55         ` Eli Zaretskii
2023-11-30 18:12           ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r0k8z80h.fsf@macmutant.fritz.box \
    --to=arash@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.