all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pietru@caramail.com
To: "Stefan Möding" <s.moeding@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Messages - Avoiding newlines
Date: Tue, 8 Dec 2020 14:47:40 +0100	[thread overview]
Message-ID: <trinity-ae9251d7-f12e-42d3-bdc5-d6479b330ac1-1607435260954@3c-app-mailcom-bs08> (raw)
In-Reply-To: <m2360gtoi7.fsf@athena.moeding.net>


> 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
> 
>



  parent reply	other threads:[~2020-12-08 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 12:51 Messages - Avoiding newlines pietru
2020-12-08 13:29 ` Stefan Möding
2020-12-08 13:47   ` 2QdxY4RzWzUUiLuE
2020-12-08 13:47   ` pietru [this message]
2020-12-08 14:23   ` pietru
2020-12-08 15:32 ` Michael Heerdegen
2020-12-15  3:34 ` Tim Landscheidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-ae9251d7-f12e-42d3-bdc5-d6479b330ac1-1607435260954@3c-app-mailcom-bs08 \
    --to=pietru@caramail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=s.moeding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.