help-gnu-emacs
[Top][All Lists]
Advanced

[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: Fri, 19 Apr 2024 15:24:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Heime <heimeborgia@protonmail.com> writes:

> I want to print the value pairs of an alist named tema-vodilac.
>
> Although I can insert tema-vodilac: using
>
> (insert (concat "\n" "tema-vodilac:\n"))
>
> I cannot print the value pairs to the tema buffer
>
> (defun tema-alist ()
>   "Display the content of the association list ALIST."
>   (interactive)
>
>   (with-current-buffer (get-buffer-create "tema")
>     (goto-char (point-max))
>     (insert (concat "\n" "tema-vodilac:\n"))
>     (dolist (pair tema-vodilac)
>       (insert (format "\n %d  %s \n" (cdr pair) (car pair)))) ))

Hi,

I don't understand.  With tema-vodilac defined like this:

(defvar tema-vodilac '((a . 2) (b . 1)))

Your command works for me.
-- 
Manuel Giraud



reply via email to

[Prev in Thread] Current Thread [Next in Thread]