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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying a list for insertion


From: Heime
Subject: Re: Copying a list for insertion
Date: Fri, 21 Oct 2022 16:12:41 +0000

------- Original Message -------
On Friday, October 21st, 2022 at 3:57 PM, Jean Louis <bugs@gnu.support> wrote:


> * Heime via Users list for the GNU Emacs text editor help-gnu-emacs@gnu.org 
> [2022-10-21 17:18]:
> 
> > I am printing a list named "cunex" in the messages buffer. I would also 
> > like to store what is printed so I can insert
> > the contents somewhere else, without having to go to the "Messages" buffer 
> > to copy it.
> > 
> > (message "%s" cunex)
> 
> 
> I use this function:
> 
> (defun rcd-kill-new (kill)
> (cond ((stringp kill) (progn
> (kill-new kill)
> (rcd-message "Killed: %s" kill)))
> (t (rcd-message "😧 WARNING: Nothing to kill."))))
> 
> You may change `rcd-message' to message.
> 
> If you wish to kill the list, then you need to do something like:
> 
> (kill-new (prin1-to-string '(1 2 3 "My" "List" 10 20))) ⇒ t
> 
> Then you do C-y:
> 
> (1 2 3 "My" "List" 10 20)

Have done so, but doing M-w does not insert the string.



reply via email to

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