From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#62563: [FR] Expose `interactive' arg handling as an Elisp function Date: Mon, 11 Sep 2023 16:54:50 -0700 Message-ID: References: <83lejd2wwi.fsf@gnu.org> 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="9112"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ruijie Yu , 62563-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 12 01:56:15 2023 Return-path: Envelope-to: geb-bug-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 1qfqlL-0002Am-Ju for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Sep 2023 01:56:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfql7-0004NC-63; Mon, 11 Sep 2023 19:56:01 -0400 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 1qfql5-0004Mg-6E for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 19:55:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfql3-00010a-Up for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 19:55:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfql8-0003TN-7U for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 19:56:02 -0400 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2023 23:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 62563 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Mail-Followup-To: 62563@debbugs.gnu.org, stefankangas@gmail.com, ruijie@netyu.xyz Original-Received: via spool by 62563-done@debbugs.gnu.org id=D62563.169447650313254 (code D ref 62563); Mon, 11 Sep 2023 23:56:01 +0000 Original-Received: (at 62563-done) by debbugs.gnu.org; 11 Sep 2023 23:55:03 +0000 Original-Received: from localhost ([127.0.0.1]:55256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfqkB-0003Rg-0r for submit@debbugs.gnu.org; Mon, 11 Sep 2023 19:55:03 -0400 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:42477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfqk9-0003Qq-4n for 62563-done@debbugs.gnu.org; Mon, 11 Sep 2023 19:55:02 -0400 Original-Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2bcb54226e7so61016281fa.1 for <62563-done@debbugs.gnu.org>; Mon, 11 Sep 2023 16:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694476491; x=1695081291; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=kcm7WsiB7UhEUn5y7crDtEPWdPOgG3RXEqXKz/aGo8c=; b=qH5EsNX0zFGEIdZ+Lf0A5SqxVXUVHNUCVYRpYItUnbxQmVAxAJX4NBVVjr6QaMJSZb snozLjd5oNgd6u/dVG8aToMGUweFuzGv4zYG7V4la8vty9/E3tPkHxNIqmvNYoDcI/XQ rUNx917tz35dMZ5hDt/GaP6yh79EUtwWEjw0eJ/BuxcO+k7jMxO8/3jBu+rDM4L/uQp+ YLAO3LBZtZBkOE9zniQoDdYuClpth59rKa5OlD6QikNCdvazURomYTBi4e7tbft6bXu5 03dogsHP3hZNpXNnJWAiWUNFKjBqQtOHOBEaGUwK3CEi/ORQ5BadbxooaKKr42fIGh9l VLWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694476491; x=1695081291; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kcm7WsiB7UhEUn5y7crDtEPWdPOgG3RXEqXKz/aGo8c=; b=HxikiGRmkE+sPSxwxwF7bCQduC/xxdqInxpxTicKNAYgbd4mRcpgxgE0mEGrO4UzEo rFjOWO0ar1Tt8a3xMk1VFlaR1SIst7DRFPZdpjxxjgwS8oTFeR10Bo1CT5jjsbgSnQwF G3yNDOLuLXjxqOlJtbaYws1R1rJ+QF/vaTKJ4CGmYs0tylTCVepJ0uaLdqmIv/g97jG+ 269eIbVXLd7WFwYilzTOaVjMNeHnKIKNAdredPTxhHflt9hLIEV+zkFFmdYjTqkdJ+4F 7VKQlAsF0egRz94+TkzdqSk1xONoNRB7IAInQ1479DVXBbWqVHPW1RxE/elPrlTKqq/1 GYQQ== X-Gm-Message-State: AOJu0YxmcDDAX9L5CLS6Rq/san/1Go0nQlHVQ//41YMBq+Sr9TMH+KY0 RtoszKaP5kNIjos0koO7BQKsouoxBp3CIfqnntQ= X-Google-Smtp-Source: AGHT+IEiLaQLNgfNAN2qDU12RMpZN1s4qETZWrnq0DSEcCjcW3RFrsaFScQps3ElMmiNJKqfiYWOUsxEd/+Hz5NkwiE= X-Received: by 2002:a2e:b0c2:0:b0:2bc:fd50:573d with SMTP id g2-20020a2eb0c2000000b002bcfd50573dmr389207ljl.23.1694476490813; Mon, 11 Sep 2023 16:54:50 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 11 Sep 2023 16:54:50 -0700 In-Reply-To: <83lejd2wwi.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 Mar 2023 10:38:21 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270104 Archived-At: Eli Zaretskii writes: >> Date: Fri, 31 Mar 2023 15:27:47 +0800 >> From: Ruijie Yu via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> I find myself sometimes needing to manually write code that do the same >> job as the string-form `interactive' would do, like "read for an >> existing file name" (the "f" form), etc. This happens because I want to >> do the following conversion. >> >> --8<---------------cut here---------------start------------->8--- >> (defun foo (fname) >> (interactive "f") >> (ignore fname)) >> >> (defun foo (fname bar) >> (interactive >> (list (simulate-interactive-f) >> (get-bar))) >> (ignore fname bar)) >> --8<---------------cut here---------------end--------------->8--- >> >> In short, this is useful when I need to add an interactive argument that >> is not already covered by interactive codes, so I have to use the more >> verbose interactive list form. > > I don't think I understand the rationale, so please tell more. The > interactive spec can be used like this: > > (interactive "bBuffer to rename: \nsRename buffer %s to: ") > > So basically, you can prompt for anything using the 's' descriptor and > the following prompt string with %-constructs. In what use cases is > this not enough, so much so that it would require exposing the guts of > this to Lisp? More information was requested, but none was given within 6 months, so I'm closing this bug. If this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report.