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: Heime
Subject: Re: Printing alist pairs to a dedicated buffur
Date: Fri, 19 Apr 2024 19:26:50 +0000





Sent with Proton Mail secure email.

On Saturday, April 20th, 2024 at 1:24 AM, Manuel Giraud via Users list for the 
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> 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

When I use message, all is good, but not with insert to the buffer.

(cdr pair) and (car pair) are not getting printed in the tema buffer,
but they get printed in the messages buffer.




reply via email to

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