GNU bug report logs - #10723
24.0.93; bad pp formatting for `C-h v' with list value

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 4 Feb 2012 17:41:02 UTC

Severity: minor

Tags: confirmed, fixed

Merged with 9342

Found in versions 24.0.50, 24.0.93

Fixed in version 26.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 10723 in the body.
You can then email your comments to 10723 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#10723; Package emacs. (Sat, 04 Feb 2012 17:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Feb 2012 17:41:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.93; bad pp formatting for `C-h v' with list value
Date: Sat, 4 Feb 2012 09:39:39 -0800
This is a REGRESSION which starts with Emacs 23 (no problem before 23).
 
emacs -Q
 
(setq foobar '(some-symbol ((some . cons) "some-string")))
 
C-h v foobar
 
Shows:
 
foobar's value is (some-symbol
 ((some . cons)
  "some-string"))
 
Please do not start the pretty-printed value on the same line as
"foobar's value is" if the pretty-printed value EITHER:
 
a. uses more than one line (i.e. contains newline chars)
 
OR
 
b. is longer than the standard *Help* output line length (`fill-column')
MINUS the length of "foobar's value is " (where "foobar" is replaced by
the variable's name)
 

In GNU Emacs 24.0.93.1 (i386-mingw-nt5.1.2600)
 of 2012-01-29 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include --ldflags
 -LD:/devel/emacs/libs/gnutls-3.0.9/lib'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10723; Package emacs. (Mon, 17 Sep 2012 00:19:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <10723 <at> debbugs.gnu.org>
Subject: RE: bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
Date: Sun, 16 Sep 2012 17:17:13 -0700
ping

regression





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10723; Package emacs. (Sun, 09 Feb 2014 05:19:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 10723 <at> debbugs.gnu.org
Subject: Re: bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
Date: Sat, 08 Feb 2014 21:16:46 -0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> This is a REGRESSION which starts with Emacs 23 (no problem before 23).
>
> emacs -Q
>
> (setq foobar '(some-symbol ((some . cons) "some-string")))
>
> C-h v foobar
>
> Shows:
>
> foobar's value is (some-symbol
>  ((some . cons)
>   "some-string"))
>
> Please do not start the pretty-printed value on the same line as
> "foobar's value is" if the pretty-printed value EITHER:
>
> a. uses more than one line (i.e. contains newline chars)
>
> OR
>
> b. is longer than the standard *Help* output line length (`fill-column')
> MINUS the length of "foobar's value is " (where "foobar" is replaced by
> the variable's name)

I can confirm that this still exists in Emacs 24.3.

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




Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 09 Feb 2014 05:19:03 GMT) Full text and rfc822 format available.

Merged 9342 10723. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 09 Feb 2014 06:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10723; Package emacs. (Thu, 28 Apr 2016 13:14:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 10723 <at> debbugs.gnu.org
Subject: Re: bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
Date: Thu, 28 Apr 2016 15:13:22 +0200
Man, the logic in that function is weird.

Here's some of the outputs:

lala’s value is
(ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo)

Fine.

lala’s value is (ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 (oo))

Er.

lala’s value is (oo (oo))

Fine, I guess...

lala’s value is (zot
 (bar)
 (foo)
 (zot)
 (fooooooooooooooo0000000000))

Which was your original complaint.

----
lala’s value is shown below.

Documentation:
Not documented as a variable.

Value: (zot
 (bar)
 (foo)
 (zot)
 (bar)
 (foo)
 (zot)
 (bar)
 (foo)
 (zot)
 (bar)
 (foo)
 (zot)
 (fooooooooooooooo0000000000))
----

So when it's very long it moves to a totally different format with a
"below" clause.

The uncommented "logic" here is this, mostly: 

		  (if (< (+ (length print-rep) (point) (- line-beg)) 68)
		      (insert print-rep)
		    (terpri)
		    (pp val)
		    (if (< (point) (+ 68 (line-beginning-position 0)))
			(delete-region from (1+ from))
		      (delete-region (1- from) from)))

Which means "if the final line of the pp'd expression is shorter than 68
characters, then delete the newline after 'value ', otherwise delete the
trailing space".

I think that's a slight thinko.  I'm changing it to "if the pp'd
expression is more than one line, then etc".

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





Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 28 Apr 2016 13:25:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.2, send any further explanations to 10723 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 28 Apr 2016 13:25:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 May 2016 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:03 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 26.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:03 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 25.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:03 GMT) Full text and rfc822 format available.

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

This bug report was last modified 8 years and 174 days ago.

Previous Next


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