From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function? Date: Wed, 9 Jun 2021 09:39:28 +0200 Message-ID: <20210609073928.GC21706@tuxteam.de> References: <20210608183138.GA14693@tuxteam.de> <20210608200312.GE14693@tuxteam.de> <20210608202326.GG14693@tuxteam.de> <20210609060959.GA21706@tuxteam.de> <20210609065129.GB21706@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mvpLiMfbWzRoNl4x" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19571"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 09 09:39:58 2021 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 1lqsoe-0004ml-UT for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Jun 2021 09:39:56 +0200 Original-Received: from localhost ([::1]:46472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqsoc-0003kg-50 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Jun 2021 03:39:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqsoG-0003kW-I2 for help-gnu-emacs@gnu.org; Wed, 09 Jun 2021 03:39:32 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:39965) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1lqsoE-0002Ju-Ip for help-gnu-emacs@gnu.org; Wed, 09 Jun 2021 03:39:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=6wlexKupFy8oLcH4zLVB03TQ9IWZZs6vy2knjBz99/8=; b=QvNVjNcxU0SdUwlbZAFcR5o8EgOYcO2QGkA8sac3NSOedRbbzkSMMiWsqiKSuEDGHyfLd6pDn5JlgdWKprI39R7IEWoWlb8Xub4P/aCvuY2OCuhNQicy/xfbbM6Yn4BJomPWLn6my3mtgmHBOkYjAIJCMFBpVGm9H+VX34w7m2+dptBpN4PMHQP83e3+vEBrNyc2FoxWxaS1lWKppq6JzbNgTEJ4KG0yuMlR5n/rSITCZQRJLsjhl2GfrWJ3kvZlnYtWL5a++tqDuqvvpeaGKhGIwzEtV0PPYspb/9smrnMn0LY88a0rI1Y17BonkTvXQkyU0VgxSjkx96xvdDMf3w==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1lqsoC-0007An-BP for help-gnu-emacs@gnu.org; Wed, 09 Jun 2021 09:39:28 +0200 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de 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, 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.23 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" Xref: news.gmane.io gmane.emacs.help:130657 Archived-At: --mvpLiMfbWzRoNl4x Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 09, 2021 at 10:03:16AM +0300, Jean Louis wrote: > * tomas@tuxteam.de [2021-06-09 09:52]: > > [skipping the rest. I don't want even to think wrapping my head > > around all that before basic things are not cleared. You'll have > > to find yourself another sparring partner for this one, sorry] >=20 > Feel free to be more direct. If I don't see what you see and that is > exactly what I wish to know, then tell me. If you remain mysterious > even while it is clear that I don't see what you are pointing out, how > do you expect me to see it without explanation?=20 >=20 > I had problems constructing a macro, then I got information it is > special form, it will not work, etc. So it works now with `eval'. >=20 > The bottom question is if some other solution exists or not to > dynamically create completing-read and read-from-minibuffer history > variables. You snipped the (for me) interesting part: did you notice how `eval' jumps over the local declaration? It doesn't even /see/ it, the defun whithin the eval munged with the outer scope (which might be buffer-local or just global). You could as well have messed with the obarray [1] directly. If this is what you want, fine. If it's not, think again. I can't even venture a guess towards what you have in mind, I'm that bad at interpreting what you write. And then there is the issue of how readable your code becomes, which will be important or not, depending on whether you want others to read it or not. Cheers [1] Finding which obarray to munge is left as an exercise for the reader. - t --mvpLiMfbWzRoNl4x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmDAcDAACgkQBcgs9XrR2kYpkgCdF+warVFbN4fikSTnfjJXMfZ6 cOsAnAkPpAFUlYoP2ZLXCyqV88QCD2hE =TfOx -----END PGP SIGNATURE----- --mvpLiMfbWzRoNl4x--