[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Printing alist pairs to a dedicated buffur
From: |
Manuel Giraud |
Subject: |
Re: Printing alist pairs to a dedicated buffur |
Date: |
Sat, 20 Apr 2024 11:55:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Heime <heimeborgia@protonmail.com> writes:
> This is how I am filling my alist named tema-lugar
>
>
> (defun tema-mark (kfrz)
> "Associate line number at cursor position with key phrase KFRZ."
> (interactive "sString: ")
>
> (let ( (lnum (line-number-at-pos)) )
>
> (setq-local tema-lugar
> (append tema-lugar
> (list (cons kfrz lnum)))) ))
Hi,
Maybe your error comes from this `setq-local'. I have used `defvar'
which will create a global (i.e. visible everywhere in Emacs) variable.
`setq-local' or `defvar-local' are used for *buffer-local* variables.
Buffer-local variables are visible only from the buffer they were
created.
In your previous command, the first thing you did was to switch to
another buffer that knows nothing about tema-lugar. I suggest you to
read "(elisp) Buffer-Local Variables".
HTH
--
Manuel Giraud
- Printing alist pairs to a dedicated buffur, Heime, 2024/04/19
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Drew Adams, 2024/04/25
- RE: [External] : Re: Printing alist pairs to a dedicated buffur, Heime, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25
- Re: [External] : Re: Printing alist pairs to a dedicated buffur, Emanuel Berg, 2024/04/25