From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Using conditional in interactive Date: Mon, 16 Sep 2024 12:23:05 +0700 Message-ID: References: <87o74o4svq.fsf@web.de> <_xNUYtOpBXEf1wLflhP345KZrcoNEnJvtk0-zpRm25Riea3-M-kH9cSKm4UorkXc1uv_HcHE_vm6zeKx6i7lzYC4OQ-aj6w65Bsl2waczcw=@protonmail.com> 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="15042"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Heerdegen , Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 16 07:24:06 2024 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 1sq4DW-0003lB-0B for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 16 Sep 2024 07:24:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sq4Cn-00053S-Ln; Mon, 16 Sep 2024 01:23:21 -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 1sq4Cm-00053J-Az for help-gnu-emacs@gnu.org; Mon, 16 Sep 2024 01:23:20 -0400 Original-Received: from mail-vk1-xa29.google.com ([2607:f8b0:4864:20::a29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sq4Ck-0007et-Vi for help-gnu-emacs@gnu.org; Mon, 16 Sep 2024 01:23:20 -0400 Original-Received: by mail-vk1-xa29.google.com with SMTP id 71dfb90a1353d-5010861905bso2387798e0c.1 for ; Sun, 15 Sep 2024 22:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726464197; x=1727068997; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Wkfw1gGuQmvBd+yd3QlvyVIKlg+hzQAahcG8wsyT14o=; b=gWdc2/Hi6GQKYKqazcmbXsYc1fAV7lgAf9X449p47C4tEZlbFN3Ra1Aei84HWQfNZf +iZ2Zd62SUkl/0a0JbTSpI1TgjuQd0H/o7n6pQu/uY+UbLrVBgih67+G8TTRtF3OD8Ul l53AAaxc2rwM3M71XGZ663CQyKRnHivmFNQX+9/WUmRb6PluA7RGAAtUXEmKrdIk5l/p BDwp1Oaey7gyCcAd0ApafMCH8R/pkpGtOirAM1cFzjs4XllGtvcTJgdg3HUaqmZTjlg3 nl6hlUEAxBvdQ6Xr4AGNMadS7bRP3nKnecpNgbdOcAawLc1YIIYSbXbiw0Hmv1u1Vd1h atZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726464197; x=1727068997; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Wkfw1gGuQmvBd+yd3QlvyVIKlg+hzQAahcG8wsyT14o=; b=lAf+kmxYMduT7nOGb4y0TfMADMCmpegQo2L2VdmacM+Kthtz8N4TxtNZHt6obJsYYh gBF7dYjPmrR/WbrNbFEhUY70iGL8wN54GUV2SPVjsX0RJuKsV30FEpo/Bs8ZWBL/wwsA ihoZ3xATOBEq6x6Zms3PrZfybQYqTCQyEU4rVl5//N6wAho+vEfX778EFZ2WY/5QKbqJ sEkvg7hXD+kAW3I6BQekGdrKPJhO+64TljBx9LtyM9Q8Ha5POCbcVYkdCBKr3uogWKVl NLNlL8toP6c70aERaOPRZPTT08HBHxb9/A74tn+QQs3iCESABN5UfLoM1lkgmSn713DN jSBg== X-Forwarded-Encrypted: i=1; AJvYcCWyDPyH5zfWATBYjCPR9AON77YWEwJ9txuvWS326XEzn42kHvjasud7itkq1aOip4oo7s1El9EI/wOmnLi3PQ==@gnu.org X-Gm-Message-State: AOJu0Yz1y0WyUwJOlmqfbMs2Qb5G583AFoojRUY0UHVylokS5tdFkrSU wkX81ijpL/ozCNsjuSKA9oAohDWyrTMBetAyqdwNVlAaADeqH4MuIlyzksBlfWw7KWkdcA4fYuD Tt2SqBaaumhK3IO1N9iaUd2b2h0c= X-Google-Smtp-Source: AGHT+IGjLetPhbHdco9tuW2jt2zC/7pa6XavkxINqhIX68mlEGpjXi6jAynXIUMJxHqRc0uv0bceOTmWaRHBppVHl4w= X-Received: by 2002:a05:6122:2667:b0:502:c218:383f with SMTP id 71dfb90a1353d-502f771a796mr11367885e0c.7.1726464197021; Sun, 15 Sep 2024 22:23:17 -0700 (PDT) In-Reply-To: <_xNUYtOpBXEf1wLflhP345KZrcoNEnJvtk0-zpRm25Riea3-M-kH9cSKm4UorkXc1uv_HcHE_vm6zeKx6i7lzYC4OQ-aj6w65Bsl2waczcw=@protonmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::a29; envelope-from=yurivkhan@gmail.com; helo=mail-vk1-xa29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147993 Archived-At: On Mon, 16 Sept 2024 at 05:23, Heime wrote: > From you have described it, the cond should occur before the interactive > clause, ending up with two interactive clause. The one executed would > depend on which condition succeeds. An (interactive) clause is not executed. It is metadata which is consulted before the function starts. You cannot apply normal executable form reasoning to it. >From the point of view of the interactive call mechanism, there are three possibilities: * There is no interactive clause, in which case the function is not callable interactively * The first argument of the interactive clause is a string literal, in which case it is interpreted according to the string interactive spec rules. * The first argument is not a string, in which case it is evaluated and the result passed to the command. A (cond) form is not a string.