From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Passing a list of symbols to function argument Date: Fri, 29 Nov 2024 20:54:55 +0100 Message-ID: <87ser97r3k.fsf@gmx.net> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22282"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Heime To: Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 29 20:55:39 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 1tH75W-0005cr-UP for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 29 Nov 2024 20:55:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tH74z-0002CE-SY; Fri, 29 Nov 2024 14:55:05 -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 1tH74x-0002Bq-Tz for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 14:55:03 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tH74w-0005ue-7o for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 14:55:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1732910096; x=1733514896; i=stephen.berman@gmx.net; bh=U9yGeK2e+eS39vczqrqpF1hLjDGuFksqnSaB5sINE2w=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=PompqGcTYNuQBFeNSqYiUg2JflrysqM54khUJDuqoux/5lYT0oaoAnr4Qwu21+t9 EbdXrLgqfgjtagpGPmXsh4yhJxlXU895lORDkByo7/uR2rIlY0QDzjjxK6tsI6Kl/ ORZ9cp4OY494DH5/fE4PiTlsRO1deAFTEvz5FsZ5YspXsoCHSUEXSbHAptQh9r6GI cGZqLw0H0812AWpYlLHitM0PY+GpgevW9taJXidkHOBe8FLS4RxWFkeVfz0lzaGqK 10Fb9eCMmVH5hUtPfmnWPo04n983KtBBV3FcXh0leH8DrMIipziObHvHhUojbU6nw w+5xlvmpOlSL1n1dUw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfssd ([88.130.49.222]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpDJX-1u2HTL2YcJ-00pI2V; Fri, 29 Nov 2024 20:54:56 +0100 In-Reply-To: (Heime via Users list for the's message of "Fri, 29 Nov 2024 17:34:01 +0000") X-Provags-ID: V03:K1:3gj+71EQpNcBmkp88NfvNFutHobfYhUyiSuqAhI2G+YGFR+v3lX p5hKNm0h30nCRJO9ONKyz+RS/nfCPLmtJWRk2V5y9c8mNZhviA6jlbDLsvoTV25duUwJGKS Hi0u/vLC5xTNJV4o8RQCXDW3TwRbC9UeNNAK9G9lcslCdZHpYns0aWIaKN11ZFgEKPytP6A vJw30frcq4fFPK3oZxjBg== UI-OutboundReport: notjunk:1;M01:P0:otV6nFN0j+E=;cv5NWvBsJGpgLzi3NXszmKt0kd2 n+yTixIgNpzk8eZhSCziLy77iAdo52+BmVUZY1aEjHK9Xa/B1+Nm7onyxqV2hXySb1kG1pFmP 2ESOJ5SaHKGC02xlXOO26BzJRKnyFaHGLvx7e56wmDwcHw9xCQ3RwxFSsFReo8+UBqEsoRJC8 CfE+xlZ3AFTL6OKi1ATPVvp5pKgOgtL5Jr8kc8QCJVNyvywcbjc9ZxpXFd3FG8OIpD3/xm37A T8QtW4RYgRW+cjQAhle/98vYYrWvoQN1NUKqBY9804Kb1trxJVGFI/AMTEqH0Vx7HlYzUsIGw YxXoGmk3gpw3puZoIV2FW2xvPujovvfx4YwCAoZpiGlRuDDlgO9h6TSKZTPkjIAVHOuwt7VsA l+28uQddsxBVVbXwuvGtH2zSoFli/8dfZlpLjuYLVd7u3Dl6nXV/977290UGhZUDI/A6MVPDA kTvFGkwCoj66FVekpirPj+qEubJqW99ePt7I2eDt0dRmhhhvy/4iOk2pe94DpCL882bUxQCSq AqLfT1pwsbhnQWrhp6vzSWJFBLLR663CjSJ9IIbOJuJwxg2G9dolQYDJDbV8EnOzautCvfWIZ y3SdDJ1lxDBh3cTxxyRb03RqcGTs6RnjHFWcF/xyqo++CRPd976+4P6rRLtkrCd5Ogqmi7hwm rj3cmPDMo/tMnwc6jF/6NPadYILZO5DLjJW+NxO67hDcSLOzXUlHSwAgY34cY1wnFCbQK4JhP lxTMPyNAzr9djIPGmEy41AELaJcB+RI7fzVne1shrOq0hXuSJ6GWlzKHvEmUtlo6duTNHC/V Received-SPF: pass client-ip=212.227.17.22; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -36 X-Spam_score: -3.7 X-Spam_bar: --- X-Spam_report: (-3.7 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.93, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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:148444 Archived-At: On Fri, 29 Nov 2024 17:34:01 +0000 Heime via Users list for the GNU Emacs = text editor wrote: > Why do I get > > Wrong type argument: stringp, tabtrail > > When using the call > > (poalatuk '(72 tabtrail global)) > > to the function > > > (defun poalatuk (actm-seqr) > > (interactive > (let* ( (colw (read-number "Line Column: " 72)) > (cseq '("extended" "disable" "tabtrail")) > (rsel (completing-read "Selector: " cseq nil t "tabtrail")) > (scope (completing-read "Scope: " > '("global" "local") nil t "local")) ) > > ;; Pass a single list as argument > (list (list colw rsel scope))) ) > > ;; ------------------------------------------------------------- > > (message "poalatuk: %S" actm-seqr) > > (let* ( (colw (nth 0 actm-seqr)) ;; Extract column width. > (rsel (intern (nth 1 actm-seqr))) ;; Extract mode selector= . ^^^^^^^^^^^^^^^^^^^^^^^^^^ The error happens here. You passed '(72 tabtrail global) as the value of the argument actm-seqr, so (nth 1 actm-seqr) returns the symbol `tabtrail'. But `intern' takes a string and returns the symbol (in the obarray) whose name is given by the string. Steve Berman