all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: iarchivedmywholelife@gmail.com, 70868@debbugs.gnu.org,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters
Date: Sat, 11 May 2024 16:48:41 +0200	[thread overview]
Message-ID: <87msow76ba.fsf@web.de> (raw)
In-Reply-To: <E2209579-0458-4FE1-8457-1CD96E963966@gmail.com> ("Mattias Engdegård"'s message of "Sat, 11 May 2024 14:08:35 +0200")

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> 11 maj 2024 kl. 13.09 skrev Michael Heerdegen <michael_heerdegen@web.de>:
>
> > (let ((print-integers-as-characters t))
> >   (princ ?\; (current-buffer)))
> > 
> > prints "?;" instead of "?\;" - it fails to quote the character.  Binding
> > `print-quoted' doesn't help.  This needs to be fixed.
>
> Does it? Not defending the code in any way, but `princ` isn't supposed
> to quote anything. If you want it in a form that can be read back in,
> use `prin1`.
>
> We do get to make up the rules, though. Perhaps it should print 57 as
> `;` instead of `?;`. It's not clear what makes the most sense here.

Thanks Andreas and Mattias for bringing up the missing point.

I don't have an opinion about - and don't want to answer - what `princ'
should print here, and rather stick to original problem of this bug
report.

It is quite obvious that we need to change `pp--insert-lisp' to use
`prin1' in this case - again: we changed several other places in the
past in the same way.

Does anyone have a clue if there is a reason why we should not simply
change _all_ occurrences of `princ' to `prin1' in `pp--insert-lisp' and
related functions?  It seems that when there is a difference we always
want `prin1', i.e. readable, printing.

BTW, is there a rule of thumb that makes it possible to remember which
of the two does the readable printing?  I'm always confusing them or
even don't get the problem.


Thanks,

Michael.





  reply	other threads:[~2024-05-11 14:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 23:56 bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters No Wayman
2024-05-11  0:10 ` No Wayman
2024-05-11  6:47   ` Eli Zaretskii
2024-05-11 10:58   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-11 11:09     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-11 12:08       ` Mattias Engdegård
2024-05-11 14:48         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-11 15:10           ` Mattias Engdegård
2024-05-11 11:32     ` Andreas Schwab
2024-05-11 10:54 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-11 16:38   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-11 16:47     ` Eli Zaretskii
2024-05-11 18:26       ` bug#70868: 30.0.50; iarchivedmywholelife
2024-05-11 18:29         ` Eli Zaretskii
2024-05-11 18:33           ` Eli Zaretskii
2024-05-12 14:50             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-12 15:06               ` Eli Zaretskii
2024-05-12 15:15                 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-12 15:42                   ` Eli Zaretskii
2024-05-12 18:11                     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-28 10:51                       ` bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-12 21:39                     ` bug#70868: 30.0.50; Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 18:25                       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 22:30                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 18:28                       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 20:16                         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87msow76ba.fsf@web.de \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70868@debbugs.gnu.org \
    --cc=iarchivedmywholelife@gmail.com \
    --cc=mattias.engdegard@gmail.com \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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.