GNU bug report logs - #52566
29.0.50; Wishlist: There should be a print-unreadable-function variable

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Fri, 17 Dec 2021 07:26:02 UTC

Severity: wishlist

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52566 in the body.
You can then email your comments to 52566 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Fri, 17 Dec 2021 07:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 17 Dec 2021 07:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Wishlist: There should be a print-unreadable-function
 variable
Date: Fri, 17 Dec 2021 08:25:38 +0100
It should be called from print_vectorlike (and any other places that
print unreadable objects, but I'm not sure there are any other places),
and should probably have a signature like

OBJECT PRINTCHARFUN ESCAPEFLAG

If it returns nil, the object should be printed as normal.

This can then be used to implement a `readablep' function (that would
bind this to a function that signals an error, and then catch that
error), and also to possibly make an alternative version of prin1 that
returns whether it printed something unprintable.


In GNU Emacs 29.0.50 (build 69, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
 of 2021-12-16 built on xo
Repository revision: e7a6d6a546e7e56e5a721aac86a19473e4303111
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Debian GNU/Linux bookworm/sid


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 14:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50; Wishlist: There should be a
 print-unreadable-function variable
Date: Sat, 22 Jan 2022 15:14:03 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> It should be called from print_vectorlike (and any other places that
> print unreadable objects, but I'm not sure there are any other places),
> and should probably have a signature like
>
> OBJECT PRINTCHARFUN ESCAPEFLAG
>
> If it returns nil, the object should be printed as normal.
>
> This can then be used to implement a `readablep' function (that would
> bind this to a function that signals an error, and then catch that
> error), and also to possibly make an alternative version of prin1 that
> returns whether it printed something unprintable.

This has now been implemented in Emacs 29.  The function interface was
changed a bit, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 52566 <at> debbugs.gnu.org and Lars Ingebrigtsen <larsi <at> gnus.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 22 Jan 2022 14:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 14:50:02 GMT) Full text and rfc822 format available.

Message #13 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50;
 Wishlist: There should be a print-unreadable-function variable
Date: Sat, 22 Jan 2022 16:48:44 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Sat, 22 Jan 2022 15:14:03 +0100
> 
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> 
> > It should be called from print_vectorlike (and any other places that
> > print unreadable objects, but I'm not sure there are any other places),
> > and should probably have a signature like
> >
> > OBJECT PRINTCHARFUN ESCAPEFLAG
> >
> > If it returns nil, the object should be printed as normal.
> >
> > This can then be used to implement a `readablep' function (that would
> > bind this to a function that signals an error, and then catch that
> > error), and also to possibly make an alternative version of prin1 that
> > returns whether it printed something unprintable.
> 
> This has now been implemented in Emacs 29.  The function interface was
> changed a bit, though.

The doc string of print-unreadable-function and its documentation in
the manual seem to contradict each other.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 15:26:02 GMT) Full text and rfc822 format available.

Message #16 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50; Wishlist: There should be a
 print-unreadable-function variable
Date: Sat, 22 Jan 2022 16:25:00 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> The doc string of print-unreadable-function and its documentation in
> the manual seem to contradict each other.

Better now?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 15:37:01 GMT) Full text and rfc822 format available.

Message #19 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50; Wishlist: There should be a
 print-unreadable-function variable
Date: Sat, 22 Jan 2022 17:36:00 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 52566 <at> debbugs.gnu.org
> Date: Sat, 22 Jan 2022 16:25:00 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > The doc string of print-unreadable-function and its documentation in
> > the manual seem to contradict each other.
> 
> Better now?

Not really.  Or am I missing something?

The doc string says:

  If this function returns nil, the object will be printed as usual.
  If it returns a string, that string will then be printed.  If the
  function returns anything else, the object will not be printed.

But the manual says:

  The function should return either @code{nil} (print nothing), or a
  string (which will be printed), or any other object (which means that
  the object should be printed normally).

The only thing these two agree upon is the case that the function
returns a string.  The other 2 possibilities are described
differently.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 15:48:02 GMT) Full text and rfc822 format available.

Message #22 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50; Wishlist: There should be a
 print-unreadable-function variable
Date: Sat, 22 Jan 2022 16:46:55 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> The doc string says:
>
>   If this function returns nil, the object will be printed as usual.
>   If it returns a string, that string will then be printed.  If the
>   function returns anything else, the object will not be printed.

Fixed now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 16:19:02 GMT) Full text and rfc822 format available.

Message #25 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50; Wishlist: There should be a
 print-unreadable-function variable
Date: Sat, 22 Jan 2022 18:18:05 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 52566 <at> debbugs.gnu.org
> Date: Sat, 22 Jan 2022 16:46:55 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > The doc string says:
> >
> >   If this function returns nil, the object will be printed as usual.
> >   If it returns a string, that string will then be printed.  If the
> >   function returns anything else, the object will not be printed.
> 
> Fixed now.

Did you forget to push?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52566; Package emacs. (Sat, 22 Jan 2022 16:22:01 GMT) Full text and rfc822 format available.

Message #28 received at 52566 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52566 <at> debbugs.gnu.org
Subject: Re: bug#52566: 29.0.50; Wishlist: There should be a
 print-unreadable-function variable
Date: Sat, 22 Jan 2022 17:21:10 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Did you forget to push?

Yup.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Feb 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.