unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: tomas@tuxteam.de
To: Drew Adams <drew.adams@oracle.com>,
	Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: [SOLVED with `eval']: Why I cannot use this variable in macro call from function?
Date: Tue, 8 Jun 2021 22:03:12 +0200	[thread overview]
Message-ID: <20210608200312.GE14693@tuxteam.de> (raw)
In-Reply-To: <YL/EiLI0CeKB/UnL@protected.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

On Tue, Jun 08, 2021 at 10:27:04PM +0300, Jean Louis wrote:
> Thanks Tomas.

Glad I could help :)

> I know you have sharp mind.

Don't let apperances mis-lead you...

>   Is there a way to dynamically
> generate global variable based on a string and use it as history?
> 
> It's interesting how this works:
> 
> (defmacro rcd-gen-defvar (name description)
>   `(defvar ,(intern name) nil ,description))
> 
> Now I can repeat and use the below and it will remember history:
> 
> (read-from-minibuffer "Tell me: " nil nil nil (rcd-gen-defvar "my-history" "This is history"))
> 
> I was expecting it NOT to work as I was expecting `defvar' to be
> repeated and to nullify the value, but it does not.

[rest snipped]

Sorry, Jean Louis, I can't understand what you are after.
Even after reading you mail a couple of times.

Sometimes (but I'm not sure either), I have the impression
that you try to do too many things at once. Try to break them
down into little pieces to give your interlocutors at least
a small chance.

You want to define a variable whose name you can only know
at run time? Did I understand that correctly?

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2021-06-08 20:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 13:10 Why I cannot use this variable in macro call from function? Jean Louis
2021-06-08 13:41 ` [External] : " Drew Adams
2021-06-08 14:47   ` Jean Louis
2021-06-08 17:14   ` Jean Louis
2021-06-08 18:31     ` tomas
2021-06-08 18:37       ` Oops function? tomas
2021-06-08 19:27       ` [SOLVED with `eval']: Why I cannot use this variable in macro call from function? Jean Louis
2021-06-08 20:03         ` tomas [this message]
2021-06-08 20:06           ` Sorry again tomas
2021-06-08 20:12           ` [SOLVED with `eval']: Why I cannot use this variable in macro call from function? Jean Louis
2021-06-08 20:23             ` tomas
2021-06-08 20:38               ` Jean Louis
2021-06-08 20:47               ` Jean Louis
2021-06-09  6:09                 ` tomas
2021-06-09  6:42                   ` Jean Louis
2021-06-09  6:51                     ` tomas
2021-06-09  7:03                       ` Jean Louis
2021-06-09  7:39                         ` tomas
2021-06-09  8:22                           ` Jean Louis
2021-06-09  8:54                             ` tomas
2021-06-09 10:56                               ` Jean Louis
2021-06-09 11:33                                 ` tomas
2021-06-09 14:39                                   ` Jean Louis
2021-06-09 16:41                                     ` tomas
2021-06-10  2:10                                     ` Robert Thorpe
2021-06-10  6:56                                       ` Jean Louis
2021-06-11  6:33                                         ` Robert Thorpe
2021-06-11  7:03                                           ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608200312.GE14693@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).