From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 10723@debbugs.gnu.org
Subject: bug#10723: 24.0.93; bad pp formatting for `C-h v' with list value
Date: Thu, 28 Apr 2016 15:13:22 +0200 [thread overview]
Message-ID: <87pot9lvv1.fsf@gnus.org> (raw)
In-Reply-To: <4F4BAC82D7B848B5B3EA377B062FF8F2@us.oracle.com> (Drew Adams's message of "Sat, 4 Feb 2012 09:39:39 -0800")
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
prev parent reply other threads:[~2016-04-28 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=87pot9lvv1.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=10723@debbugs.gnu.org \
--cc=drew.adams@oracle.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.