help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete multiple repositories programmatically from elisp by supplyin


From: Hongyi Zhao
Subject: Re: Delete multiple repositories programmatically from elisp by supplying `y' as the answer to an interactively called function.
Date: Wed, 8 Dec 2021 10:56:12 +0800

On Wed, Dec 8, 2021 at 1:05 AM Robert Pluim <rpluim@gmail.com> wrote:
> That function takes a 'force' argument, so if you manage to supply any
> prefix arg at all it will delete all the repos without prompting. One
> way to do that is by using `current-prefix-arg':
>
> (let ((current-prefix-arg '(4)))
>   (call-interactively #'straight-remove-unused-repos))

The author told me the following solution here [1]:

==========

Please see: 
https://www.gnu.org/software/emacs/manual/html_node/emacs/Arguments.html

You can pass the universal argument to the command and force will be non-nil.

And if you wish to use the command in an elisp program you can just
pass the force argument you desire:

(straight-remove-unused-repos 'force)

==========

[1] https://github.com/raxod502/straight.el/issues/898#issuecomment-988352840

Regards,
HZ



reply via email to

[Prev in Thread] Current Thread [Next in Thread]