* bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
@ 2012-02-04 17:39 Drew Adams
2012-09-17 0:17 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Drew Adams @ 2012-02-04 17:39 UTC (permalink / raw)
To: 10723
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'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
2012-02-04 17:39 bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value Drew Adams
@ 2012-09-17 0:17 ` Drew Adams
2014-02-09 5:16 ` Lars Ingebrigtsen
2016-04-28 13:13 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2012-09-17 0:17 UTC (permalink / raw)
To: 10723
ping
regression
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
2012-02-04 17:39 bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value Drew Adams
2012-09-17 0:17 ` Drew Adams
@ 2014-02-09 5:16 ` Lars Ingebrigtsen
2016-04-28 13:13 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-09 5:16 UTC (permalink / raw)
To: Drew Adams; +Cc: 10723
"Drew Adams" <drew.adams@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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
2012-02-04 17:39 bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value Drew Adams
2012-09-17 0:17 ` Drew Adams
2014-02-09 5:16 ` Lars Ingebrigtsen
@ 2016-04-28 13:13 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-28 13:13 UTC (permalink / raw)
To: Drew Adams; +Cc: 10723
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-28 13:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-04 17:39 bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value Drew Adams
2012-09-17 0:17 ` Drew Adams
2014-02-09 5:16 ` Lars Ingebrigtsen
2016-04-28 13:13 ` Lars Ingebrigtsen
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.