From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9708 invoked from network); 11 Feb 2023 23:45:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Feb 2023 23:45:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1676159155; b=hnUGSDA2BgS8TIFpS0Z7EUfvz5ttbZhbq+TUb1Rg7Q8LQYD209RJvbF4uzfsQbCi3crM9HjYPb 7qoKLAqA6xqLRSySJwaQqPXh8YQDSEcYhORqN0Tz9PMqL+nbcKib8cA3ISehGoEt+8GzK91S46 eHw7QUE60ZO7WyMtb81OeribNecWtAYmyCkbo7etA4mrVAy2e1Q5QZcakAcFTC2oLmoWQledXu KWZgglnrsGNj+xq3S5jknvPz5lKzRyE59tqr3UrBoNlQLMCLqtNU7oo5f2g8JAJe+TDmY1W1p0 46Pk3C7MX0hJsgBFKYExY0wngBA7VLp8rDtRLkB8vokPrw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1676159155; bh=G/4QCyHZPaRxJZxV1eR3a/5HFd5J+0JKpQRY0wCK6IY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=OTyy+JbTp1sh0Ssy6q3MLxNffAPfp8L7NM5dNgN5m3X7AbtfCH/7sCHGRYD8EiTn/RWvlu/Wfg oN29FZc1c/rT6iq3tlDfN548L3YktkLUKK+PRtsmhf7xogtSouymYf/K791N8UzTCuEQKCcZcT pBbfk8Sy4/VY2pu0ebh1a2bNIxj2AU6a6YEYCK92XCt7w7Rzy9R2JupJYvwuHrljG/K294p5V4 lX5iJIXkosSFqS0u/qqJndxBfW6ZhyWjhL1tM7XJK+1D64eIfsUBa+SYxr3K6PfeUW59EWcLRE mvBUMWm1oU2yrGC20t1kw2ny2fzlNfI1SmVdKQKU0UfaQQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=X+BKMREeNy8bpzV4EDoE2U+7urAJ+XiqHO3uO4f81xI=; b=OhIoO7oySC7rop+wALL6mVt+d2 4W4YeygIa0VdocYC/NYrMFj54yyEqWpW3aH5g+LsoLZ6UwvhLAdVd3zyWfcO11IxfVs3ZLIbrlMCy 5XO0B2j1fo0cBZESeMFtHY1xRl5zPw9j9h95XGCbZY6M+/xzDcJDah/pqjBf+l7LQ3pWwUjN8pfY1 QdUK+lpYAd1/eXQXi7xblVpYyqu74iBKN86zPYSfkBNyXMX/2x17inF4Kxbp5HB4Chj4x+jdHilBk ULSUu9R4x3Vo/Q9b/IpncwySZh2v/QAcrdTMgKcVhaEqywrV8RzImokx6kiPrfyAPHkBWtLVwKbky ghaA+SWw==; Received: by zero.zsh.org with local id 1pQzZ5-0002SK-OL; Sat, 11 Feb 2023 23:45:55 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f51.google.com ([209.85.208.51]:35482) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pQzYb-00027n-Sl; Sat, 11 Feb 2023 23:45:26 +0000 Received: by mail-ed1-f51.google.com with SMTP id w3so1634032edc.2 for ; Sat, 11 Feb 2023 15:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=X+BKMREeNy8bpzV4EDoE2U+7urAJ+XiqHO3uO4f81xI=; b=x5cIO0sOwQk1ISQBtJrU66YQrPp7l9oG6wlrA0d28o9mvWVRAb4dYnf3V8m2uCES0o /lUAz/FQnjo3HFsNHeoeBvNv141MvxlWbIYC7in8gTcaF6jtaoDFfNYFIYor7LF6kChh IVNTcoLl47WYLR+jIsKX36sQBLF5AOwkVdtmYA3RK52Zv8Sk0LwuXT/w6LmvA8ujpVrZ m4psmF4vzO3sopFTBcTWZy0jU2XgJ9lRc/blfd3pXwgxWBNCau/OVvAz0TiLPHeOoK02 Ggfrw3GNhVj00bQ77Wq8N+4H3IU90i3WVaSEgAGaUOEQUF92HP1egQlzFBrtpiAvDAe1 PUGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=X+BKMREeNy8bpzV4EDoE2U+7urAJ+XiqHO3uO4f81xI=; b=aXHXma0jRwmHGMhqUHcr6HxBEBTo060Lk6Wbb1flWyWL8yUwf3WrG+MQ9w9aOpXhJ5 ttecKX0rN8LHKhV+TlMwgOeYYPEhUQPOFMlfcIPiasxrNgv81cVg29m8LlihX5WXP9/I Qabfh9i5SB91hvjGDsfWxvguvXpkj2WFLIweTAlCHHIMot6kYmZtsoaBnI561QWv9a6C eQrIzCgkYsQ6SpQjtFxpK8MahMGZt3iTXwJ12bB1Ew1xGfmHg80FKzeUJ0bV5gocTGgp N/Eux/57c7eSAjttplLQAETUXkHLUswIZ5GqAjDou1XcLXmKlI3MMHdoQTujLHr/y2QM F+Ag== X-Gm-Message-State: AO0yUKVY07GVl2M7qDsBSeoirUy8S6nLzqft2U8TGPLl/ez6hXGEO4nk yHhK8M4greiUmbUel1lMAbxKmKxQbnmZmEDztlbbPNo1iYZmrw== X-Google-Smtp-Source: AK7set9koqw0kKDpu5owUB5x4mjf+IyruuHoMcAZdM8m3qpgkotDPIpb+91244rXk2/FWYcM8dBdUfalp2+tysj+3S4= X-Received: by 2002:a50:c308:0:b0:4ab:4dc7:574b with SMTP id a8-20020a50c308000000b004ab4dc7574bmr1855904edb.3.1676159125626; Sat, 11 Feb 2023 15:45:25 -0800 (PST) MIME-Version: 1.0 References: <67689-1675827940.088548@BxvG.D9_b.7RzI> <12608-1675903622.800470@Xj82.e3y1.svhG> <66045-1675975796.128039@FBF_.0yMO.Y8fk> <40726-1676098925.110777@U2kb.d0Pd.I9ml> In-Reply-To: From: Bart Schaefer Date: Sat, 11 Feb 2023 15:45:14 -0800 Message-ID: Subject: Re: [PATCH 1/3]: Add named references To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 51401 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Sat, Feb 11, 2023 at 3:43 PM Bart Schaefer wrote: > > On Fri, Feb 10, 2023 at 11:45 PM Bart Schaefer > wrote: > > > > On Fri, Feb 10, 2023 at 11:02 PM Oliver Kiddle wrote: > > > > > > fine with the reference becoming unset at the time of the return if it > > > refers to a variable that is going out of scope. > > That's actually a little startling given dynamic scoping. It leads to this: > > { > typeset -n ref=var > () { > var=FUNC1 # that should of course be "local var=FUNC1" sorry > typeset -p ref > } > typeset -p ref > } > > Output: > typeset -g -n ref=var > typeset: no such variable: ref