From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions Date: Mon, 11 Sep 2023 20:50:43 +0530 Message-ID: <87fs3klos4.fsf@gmail.com> References: <87y1jloyao.fsf@gmail.com> 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="31066"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64584@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 11 17:21:23 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 1qfij4-0007uX-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Sep 2023 17:21:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfiin-00049m-JJ; Mon, 11 Sep 2023 11:21:05 -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 1qfiij-0003wq-Rl for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 11:21:03 -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 1qfiif-0007iu-Sg for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 11:21:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfiij-0008E4-T7 for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 11:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2023 15:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64584 X-GNU-PR-Package: emacs Original-Received: via spool by 64584-submit@debbugs.gnu.org id=B64584.169444565931605 (code B ref 64584); Mon, 11 Sep 2023 15:21:01 +0000 Original-Received: (at 64584) by debbugs.gnu.org; 11 Sep 2023 15:20:59 +0000 Original-Received: from localhost ([127.0.0.1]:54429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfiih-0008Dh-GG for submit@debbugs.gnu.org; Mon, 11 Sep 2023 11:20:59 -0400 Original-Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:44053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfiif-0008DV-Vf for 64584@debbugs.gnu.org; Mon, 11 Sep 2023 11:20:58 -0400 Original-Received: by mail-pl1-x644.google.com with SMTP id d9443c01a7336-1c3bd829b86so7040245ad.0 for <64584@debbugs.gnu.org>; Mon, 11 Sep 2023 08:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694445648; x=1695050448; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JIm9mbskoHRIujoukcvrHB46+LSW1iEMJ0nO9uqojyg=; b=OPo01VJ4CJxe/UCmtkB5uuMa1jDgVvC0DSjXPmMWFpoiesDsoeCtNZDnpqBWegcfP6 hd8lVbUi/akZCB4bQR8AV0jPeBMGnUn373mQQQs9aH1uMl+OOC9pdyiDfxfNGAHfE41S ytq3AB1dsCyIxHp1guRwcf6dLR5XFis8ek+x0xuaqfwZ8t+56+GWmA8wgWANdRqpe7Dy Wa6gpj/k9BmgXssNd9MSSuVU6KCIm6zMbFw4sIYyOJhwi98mLCL5DqAlnEKdEMlRmyMB UoO9uiU+TuJUaiNgQYHikLhKlbKOWeA2hWyfwANePd5BjxbgYt0wAPjqUhGqM7otpH3s KRlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694445648; x=1695050448; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JIm9mbskoHRIujoukcvrHB46+LSW1iEMJ0nO9uqojyg=; b=h5iExp1w4iwgyFhJQT3UhwB0bPx5saGnocd4Zffw1gkpkmu9VwZXmToxTve+gBNNCt rhZsc+qyqvOJdKpMXQKmkI8hO6XWJBD0enGgbNrXwmlff+VQPa5CsoVnXKjEPdCaGCD5 i/wSZNxYBP9dN3ahlcQez66Pn2W3IifVLEkqi56HzNmWCvxgIogPtyIDIdtla6YAsWnF WY2ToN9um7D9e/dKTMU6ElBgUT+T0AjtWdySCQNbtmYMWCDH93gf4LyU9RnL2rFfpoyQ YJUpe4pGIVzDguHYH430ow3M3qufUcLajaBtvstYF+rwcB8uGXn9qT7wdT0beiZYyJyK TUGA== X-Gm-Message-State: AOJu0YySMllcRdvSO9VZFVmIHbsCSalMCdBuINXh5jMKe4fnU3FerPYU ROwDl3sa6HpgxIB1WwrfJ/0= X-Google-Smtp-Source: AGHT+IEzdXls/sozocL6WAQ8kLJtoDmrbb7rQxmrCqpCXbulpwvOTqR8hqpG+NowVgVRJ7YOvlXrUg== X-Received: by 2002:a17:902:f7c9:b0:1c0:e87e:52ab with SMTP id h9-20020a170902f7c900b001c0e87e52abmr7590735plw.35.1694445646778; Mon, 11 Sep 2023 08:20:46 -0700 (PDT) Original-Received: from localhost ([118.185.152.162]) by smtp.gmail.com with ESMTPSA id b15-20020a170902d50f00b001b8a85489a3sm6562996plg.262.2023.09.11.08.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 08:20:46 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 11 Sep 2023 09:52:00 -0400") 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:270054 Archived-At: [ Sorry about mangling the bug address, and thanks for fixing it, and replying. ] [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 11, 2023] Stefan Monnier wrote: >> In a skeleton template, it is not possible to pass `str' as an argument >> to some functions. > > It is, but only after it appeared "naked" in the skeleton. > > `skeleton-insert` says: > > str first time: read a string according to INTERACTOR > then: insert previously read string once more > > which indeed doesn't explicitly tell you tht you're doing something > wrong, but it does imply that `str` doesn't just hold a string, or at > least not initially. Thanks, that explains the confusing part of the docstring. However, there's still a problem as... >> (define-skeleton test-skeleton "" >> (file-relative-name (read-file-name "P: ")) >> (shell-quote-argument str)) > > It should work if you can change your skeleton to something like: > > (define-skeleton test-skeleton "" > (file-relative-name (read-file-name "P: ")) > str > (shell-quote-argument str)) > > where that first use of `str` will convert it from something that "read > a string according to INTERACTOR" to the actual string. ... this inserts the directory twice. :-( AFAIU, using 'str should prevent the insertion of the value but that signals the same error. I tried (progn str (shell-quote-argument str)) instead but the same error again. > > Stefan