From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Delete multiple repositories programmatically from elisp by supplying `y' as the answer to an interactively called function. Date: Tue, 7 Dec 2021 21:16:00 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32839"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 07 14:17:39 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1muaLh-0008JS-Uw for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 14:17:37 +0100 Original-Received: from localhost ([::1]:41376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muaLg-0005TC-1r for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 07 Dec 2021 08:17:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muaKN-0005Se-3y for help-gnu-emacs@gnu.org; Tue, 07 Dec 2021 08:16:15 -0500 Original-Received: from [2607:f8b0:4864:20::929] (port=34368 helo=mail-ua1-x929.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muaKL-0002nP-Ht for help-gnu-emacs@gnu.org; Tue, 07 Dec 2021 08:16:14 -0500 Original-Received: by mail-ua1-x929.google.com with SMTP id n6so26514979uak.1 for ; Tue, 07 Dec 2021 05:16:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=SWAcxtP20cg8mZnEpDOcAMDtGApWVwL6OgFww5srtug=; b=mJyZzw131vYUtMK5o6N0WRC6YRG9J8aOmqdVwpr4pFrguJUhfJih2cmWOfE3UdDD9/ m8wSlxl0bIjxFv7ecTXecLlnBrps6JeasPvyjERtowL4vHdd7l/hJQTXwUXNUD+9MMD6 /N8g+AYP7JQ8PpaiCIFbp3Qtx0gnRoFCN62f6ZHelnxUfIH9X426wMybb4kbuDtfqI+9 rwTvwt+jaUZIGK6JQrgjRG9Q57+99A/cwuG50f84ZW3j/jervXoy5yKBvs+MTB3wSRpH UF+GzvsQZ+bDkdIWhgkUdKrsZ9vqGMV5/gZLjEDUYsVP32EjO84bZo1hGqkgRDUsXsTs HnTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SWAcxtP20cg8mZnEpDOcAMDtGApWVwL6OgFww5srtug=; b=OyLtXs3HDYvQhepR77vS1rK5XL3MqPBe65lrh6knKoagjBkoWAAisCrACqWIrgsklH PhaJGAeJ9nDE4egU2s4Pd+SNFbCbZd9qRtqT5Y5aJsKH05Y8GjewSUwLkmPtwAWA9286 xa12yVWLQSGQsGz4CZxp9XwE4vUjv7LOG++YooHPVfc7WaCvOmBk4GB6E4+G1X2rW3f+ vLOkNejYjSW3LmbTdDsA1kgYH0wFYqqJpZkHdNsrkJ4ONhMbZ5KLWuGrouxwuvjqrTKp mCUP4xmB4jxHaKdJgFxRM1jfkL2qghkNPJ9fXZXqAWx7ZK0F0YmcwacsQmLaUTyaocDC DG5A== X-Gm-Message-State: AOAM533AcqTOPIeMqBMla6C7JYnIJXlB3CsJlEl+5fdAjuVfT1I76rLV z7G4jdY/JxlG5l8IzhV1yfZiB0PGdMuK083rP835EjutO2igwBXnOOU= X-Google-Smtp-Source: ABdhPJxo1kRjiN/WFDdjH4X1+XhGCKFeK4qOHlOm2RmLlJY1AyNhp0yuiR2cazmW3r27IpSyBc94EL0yZaVbyiwdcbM= X-Received: by 2002:a67:33d1:: with SMTP id z200mr44234868vsz.1.1638882971924; Tue, 07 Dec 2021 05:16:11 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::929 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::929; envelope-from=hongyi.zhao@gmail.com; helo=mail-ua1-x929.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134866 Archived-At: The straight package manager [1] supplies the following interactive function, which can be used to delete the unused repositories: straight-remove-unused-repos. As we all know, the normal way to call this function is `M-x straight-remove-unused-repos RET package-name RET`. However, the above method can only delete one repository at a time. If I have many unused repositories that I want to clean up now, this method is very inefficient. In order to achieve a more efficient way, I want to loop over the following command programmatically from elisp, and supply `y' as the answer repeatedly: (call-interactively #'straight-remove-unused-repos) But I still can't figure out the code snippet for doing the above work. Any hints will be greatly appreciated. [1] https://github.com/raxod502/straight.el Regards, HZ