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: Output hash-table from a function Date: Sun, 22 Sep 2024 22:54:05 +0700 Message-ID: References: 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="15944"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 Sun Sep 22 17:55:01 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 1ssOvM-00040F-Ob for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 22 Sep 2024 17:55:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssOus-0002DI-2S; Sun, 22 Sep 2024 11:54:30 -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 1ssOui-0002C8-6D for help-gnu-emacs@gnu.org; Sun, 22 Sep 2024 11:54:20 -0400 Original-Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssOug-0007Au-4w for help-gnu-emacs@gnu.org; Sun, 22 Sep 2024 11:54:19 -0400 Original-Received: by mail-ua1-x930.google.com with SMTP id a1e0cc1a2514c-846c4ec2694so1014050241.2 for ; Sun, 22 Sep 2024 08:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727020457; x=1727625257; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dMacyhsiMoX1pcsJhFsRUp6ceo/IoaeCD6ah/yDfXpk=; b=UMaS6sJ9Azp8C2JpabcpK//t0Zqrp4yK/jXVX4G5SYK757TKiy+CB3s158HaWOyKYH 6TFiQzopEV+//NpRtMwlqzE01slzRuPynOebRfO0Hf+CFpLQceAcO4u0hi/bA7fWwc+g 59tS1nXB11hGQnSzedqfrSdis+OpWu5I5opgPxDCzCAm5y0X1l3MvkaNFtj1kK8HnCyu GlLcM8w99yxLxI0zGzVzKuborX2aip3IsNB3a8lLTzyDQ+8zLIp4mkZlquCM8dsR83y5 5b3S7HVOiTcYkZJZq7eHd1AthC0JZHc5ub30ncM1APej8+KmiEIb8vTbGRmIzIh/p6sU /lIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727020457; x=1727625257; h=content-transfer-encoding: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=dMacyhsiMoX1pcsJhFsRUp6ceo/IoaeCD6ah/yDfXpk=; b=jj99HASMo8OQgHH31k4jEZATPKbdfXUN50XqiBqNYmJfk999zqs7OXFbYLiIebwFxL Fyz1VpHV1EM0Mr1yHJw5ihkqg/dftCe3kXAPXGpe9qSn6FqNN4fnHw78rvLwAWRiB8hY LgKbo9HcWjGq0TibjctHjCaplTt9Vy+Y5tXCdy2YUD9OJtTwN6VTXx9HFeTsvPOEuNW9 H6wJnSRS3S/ejxZ5SmMM1l0d4Pk3gRA4jE/zseCzxRtPsDkh32gCXjteks0SrN68ZpK3 EZnjO0gij3Ma/gfi5cfcqw3iWmne6lmmNmkUNTOCeS6np/Py6GIx+IWliflk/CDpVUco 3aOA== X-Gm-Message-State: AOJu0YyXmFSVQm6JBP7jse7ojrBWpsUmRIAjjxblnTiuQoH0VRUFe4G/ qVUVXdD7l9juO7bK57MIdTibRDNWGMHGL4ZO8x9HlvTrhEAhqdCdc/8VbhgWcJCoDYjvWtJN0q7 LPuBD/RYcjbwL0ADvzWpC2Ow5Fpf86pnUId8= X-Google-Smtp-Source: AGHT+IFmQVnDa5RN2rKp1OJLdCy4oLy6NU+CUgLheZQpnQ4D0e9YVV8Ezp62X6Rz5pj9r52hgK8poM+ivP3We/KxU6Y= X-Received: by 2002:a67:ce18:0:b0:49b:fe4d:20e4 with SMTP id ada2fe7eead31-49fc9661fc0mr4193571137.28.1727020456883; Sun, 22 Sep 2024 08:54:16 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::930; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x930.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:148034 Archived-At: On Sun, 22 Sept 2024 at 22:16, Heime wrote: > > > (defun xiakos-anctr (fpln) > > > > > > (if (hash-table-p fpln) > > > > > > (let ( (anctr (make-hash-table :test 'equal)) ) > > > (maphash (lambda (waypt dirpath) > > > (puthash > > > waypt (not (file-directory-p dirpath)) > > > anctr)) > > > fpln)) )) > > > > Hint 1: What does your function to return right now? > > xiakos-anctr is certainly not returning a hash table, as I wanted You are not answering the question. I am asking it because by answering it you will get closer to understanding the root of your issue. So, what *is* it returning? > > Hint 2: You=E2=80=99ve created a hash table, bound it to a local variab= le, > > then did a bunch of mutations to that hash table, and then what? > > I want to call the function and store the hash table result in a let stat= ement > > (let ( (anctr (xiakos-anctr flpn)) ) This assumes xiakos-anctr returns the hash table. But, as you have seen, it does not return it. So what *happens* to the hash table you created in xiakos-anctr?