From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Passing a list of symbols to function argument Date: Fri, 29 Nov 2024 22:45:43 +0000 Message-ID: <-pNNoKQIEPZicROSgGBiVJrfyTKFJ6G_mlwxErytQ6cMKhQ6APevkEq-MQNYAaUlevdzXi2v-5v_iacDZCKK3qJG0YXPvcmxdAO9U9cY8r8=@protonmail.com> References: <87ser97r3k.fsf@gmx.net> <87ldx17oxv.fsf@gmx.net> <87h67p7mpu.fsf@gmx.net> <87cyid7lnq.fsf@gmx.net> Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23576"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Stephen Berman Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 29 23:46:29 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 1tH9kr-0005zC-Cy for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 29 Nov 2024 23:46:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tH9kJ-0007wZ-T6; Fri, 29 Nov 2024 17:45:57 -0500 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 1tH9kG-0007wQ-W7 for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 17:45:53 -0500 Original-Received: from mail-43166.protonmail.ch ([185.70.43.166]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tH9kF-00041E-88 for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 17:45:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1732920348; x=1733179548; bh=E9tGT7pm00H7VSQta7R554qaYLlYV+TRVAKwZgpfep4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Rwl+Y50IbIdgwWNZIeLQny5FQStA2UsaAswyNNiroxFINspGmwSiVpnH8I1/coTm0 KTisePctDLjRe+uBPmwZgHUtxjPa0TM/XXdLOyNhDaadQZW2reausWtopEZkjv2ufS xcaUexGxbX63v86tYAK7uMl2ETRwKjU9msbtmp+jexrJVoGVRzCKwiVPH6Q+2NU4Ng 02oG1fM0WVow2JcR8wTY8syqLs1B3EI2fMxCuUsJwo3N5kt4b/+ZwWur3XywE2ZQOC BQ7JnvAohlJzxmhLDkQyvX/uWI+dB/9mw2sYLQ9rD5O00rvm7FsDNwYWuQXaJQGTH9 klg7JfnpdPh2A== In-Reply-To: <87cyid7lnq.fsf@gmx.net> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: ee9fa2354fc48532687e57003be49d6fb565f201 Received-SPF: pass client-ip=185.70.43.166; envelope-from=heimeborgia@protonmail.com; helo=mail-43166.protonmail.ch 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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:148453 Archived-At: > > > > For the interactive call I want to pass the three values so that > > > > actm-seqr will be a list of three objects. > > > >=20 > > > > Thus I do > > > >=20 > > > > (list (list colw rsel scope)) > > > >=20 > > > > Would the above be correct? > > >=20 > > > Yes. > > >=20 > > > > With only (list colw rsel scope) emacs does complain. > > >=20 > > > Because that means the interactive call passes three arguments, but y= our > > > definition of `poalatuk' only specifies one argument parameter. > > >=20 > > > > I wonder whether actm-seqr will give me ((72 tabtrail global)) > > > > and not (72 tabtrail global). > > >=20 > > > I don't know what you mean; actm-seqr is the function parameter, a > > > variable whose value is whatever is passed on calling the function > > > either interactively or noninteractively. > >=20 > > For the interactive part, would returning > >=20 > > (list (list colw (intern rsel) (intern scope))) > >=20 > > pass > >=20 > > ((72 tabtrail global)) ; list with single element being a list > >=20 > > or > >=20 > > (72 tabtrail global) ; list of three entries > >=20 > > to actm-seqr? >=20 >=20 > The answer is in message displayed when you do `M-x poalatuk' and act > appropriately on the prompts, isn't it? With only =20 (list colw rsel scope) rather than=20 (list (list colw rsel scope)) I get=20 Debugger entered--Lisp error: (wrong-number-of-arguments ((t) (actm-seqr= ) "Visualisation of spaces including tabs and trailin..." poalatuk(72 "tabtrail" "local") > > > > Have also been looking at the possibility of using > > > >=20 > > > > (list (list colw (intern rsel) (intern scope))) > > > >=20 > > > > Or would this be considered replication? Because the call > > > > to intern would happen later anyway. > > >=20 > > > Then it would cause the error you reported in your OP. > >=20 > > (list (list colw (intern rsel) (intern scope))) > >=20 > > The above will be for the interactive part, so that the string values > > would be changed immediately to symbols. > >=20 > > And since I now fixed the problem by checking with stringp so intern ge= ts > > called when calling the function programatically with strings. >=20 >=20 > Ok. >=20 > Steve Berman