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

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

Re: Messages - Avoiding newlines


From: pietru
Subject: Re: Messages - Avoiding newlines
Date: Tue, 8 Dec 2020 14:47:40 +0100

> Sent: Tuesday, December 08, 2020 at 2:29 PM
> From: "Stefan Möding" <s.moeding@gmail.com>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Messages - Avoiding newlines
>
> pietru@caramail.com writes:
> 
> > I would like to print some values but I am getting a new-line
> > after (pp bounds).  Haw may I avoid it?
> 
> You could remove the trailing newlines returned by pp:
> 
> (message "Bounds: %s [%s, %s]"
>          (replace-regexp-in-string "\n+$" "" (pp bounds)) $ma $mb)
> 
> pp (Pretty Print) is meant to be used interactively so the newline make
> sense when showing the output on a terminal.

Thusly I can simply use 

(message "Bounds: %s %s %s" bounds $ma $mb)

 
> -- 
> Stefan
> 
>



reply via email to

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