unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* pp-to-string heisenberg bug
@ 2008-03-31 22:56 Mike Mattie
  2008-04-01  7:13 ` Thien-Thi Nguyen
  2008-04-01  8:29 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Mattie @ 2008-03-31 22:56 UTC (permalink / raw)
  To: emacs developers

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

Hello,

I am running Emacs 23.0.60.2 on linux, and Emacs.app 0.9-rc2. The following pp-to-string
phenomena is seen on both platforms.

description:

pp-to-string is suppost to pretty print nested lists, however when I start Emacs I always get
this output truncated with ...

<example 1>
parser-compile-run: Creating new closure.
(lambda
  (start-pos)
  (save-excursion
    (let
        (...)
      (goto-char start-pos)
      (funcall ...))))
</example 1>

Which is very annoying.

If I edebug-defun evaluate this little snippet:

(pp-to-string 'foo)

a couple of times pp-to-string starts working normally producing the
correct output below:

<example 2>
parser-compile-run: Creating new closure.
(lambda
  (start-pos)
  (save-excursion
    (let
        ((parser-position
          (cons start-pos nil)))
      (goto-char start-pos)
      (funcall 'start))))
</example 2>

If you can't reproduce this problem it might have to do with what kind of lists my parser-compiler is generating.
If That is the case (I think so) contact me for help in reproducing the problem. It happens every time, I have to "trigger"
normal behavior so it's a matter of running a small test case with my Parser Compiler.

Cheers,
Mike Mattie

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pp-to-string heisenberg bug
  2008-03-31 22:56 pp-to-string heisenberg bug Mike Mattie
@ 2008-04-01  7:13 ` Thien-Thi Nguyen
  2008-04-02 15:07   ` Stephen J. Turnbull
  2008-04-01  8:29 ` Andreas Schwab
  1 sibling, 1 reply; 5+ messages in thread
From: Thien-Thi Nguyen @ 2008-04-01  7:13 UTC (permalink / raw)
  To: Mike Mattie; +Cc: emacs developers

() Mike Mattie <codermattie@gmail.com>
() Mon, 31 Mar 2008 15:56:30 -0700

   pp-to-string is suppost to pretty print nested lists, however
   when I start Emacs I always get this output truncated with ...

Substitution w/ "..." is called "abbreviation", not "truncation",
and is controlled by `print-level' and `print-length', not just
for `pp-to-string', but for the primitive output funcs it uses,
e.g., `prin1'.  Other print-foo vars control other aspects.

thi




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pp-to-string heisenberg bug
  2008-03-31 22:56 pp-to-string heisenberg bug Mike Mattie
  2008-04-01  7:13 ` Thien-Thi Nguyen
@ 2008-04-01  8:29 ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2008-04-01  8:29 UTC (permalink / raw)
  To: Mike Mattie; +Cc: emacs developers

Mike Mattie <codermattie@gmail.com> writes:

> pp-to-string is suppost to pretty print nested lists, however when I start Emacs I always get
> this output truncated with ...
>
> <example 1>
> parser-compile-run: Creating new closure.
> (lambda
>   (start-pos)
>   (save-excursion
>     (let
>         (...)
>       (goto-char start-pos)
>       (funcall ...))))
> </example 1>

print-length is a variable defined in `src/print.c'.
Its value is nil


Documentation:
Maximum length of list to print before abbreviating.
A value of nil means no limit.  See also `eval-expression-print-length'.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pp-to-string heisenberg bug
  2008-04-01  7:13 ` Thien-Thi Nguyen
@ 2008-04-02 15:07   ` Stephen J. Turnbull
  2008-04-02 20:31     ` Thien-Thi Nguyen
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen J. Turnbull @ 2008-04-02 15:07 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: Mike Mattie, emacs developers

Thien-Thi Nguyen writes:
 > () Mike Mattie <codermattie@gmail.com>
 > () Mon, 31 Mar 2008 15:56:30 -0700
 > 
 >    pp-to-string is suppost to pretty print nested lists, however
 >    when I start Emacs I always get this output truncated with ...
 > 
 > Substitution w/ "..." is called "abbreviation", not "truncation",

That's unfortunate, because the technical term is "elision", and the
semantics of elision is IMO much closer to truncation than to
abbreviation.  An abbreviation is an incomplete copy conveying the
full meaning of the original, while an elision is an incomplete copy
lacking details considered unimportant by the editor.

Thus, 'foo is an abbreviation of (quote foo) because the semantics are
exactly the same by convention (enforced by reader macro), while (foo
...) is an elision of (foo bar baz quux) because it doesn't have the
same semantics.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: pp-to-string heisenberg bug
  2008-04-02 15:07   ` Stephen J. Turnbull
@ 2008-04-02 20:31     ` Thien-Thi Nguyen
  0 siblings, 0 replies; 5+ messages in thread
From: Thien-Thi Nguyen @ 2008-04-02 20:31 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: Mike Mattie, emacs developers

() "Stephen J. Turnbull" <stephen@xemacs.org>
() Thu, 03 Apr 2008 00:07:23 +0900

   That's unfortunate, because the technical term is "elision",
   and the semantics of elision is IMO much closer to truncation
   than to abbreviation.  An abbreviation is an incomplete copy
   conveying the full meaning of the original, while an elision is
   an incomplete copy lacking details considered unimportant by
   the editor.

   Thus, 'foo is an abbreviation of (quote foo) because the
   semantics are exactly the same by convention (enforced by
   reader macro), while (foo ...) is an elision of (foo bar baz
   quux) because it doesn't have the same semantics.

Yeah, "elision" is nicer.  Actually, "truncation" strikes my fancy,
too, after looking at the tree like Castenada would.  Words are such
traitors, yet spies we cannot due w/o.

thi




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-02 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-31 22:56 pp-to-string heisenberg bug Mike Mattie
2008-04-01  7:13 ` Thien-Thi Nguyen
2008-04-02 15:07   ` Stephen J. Turnbull
2008-04-02 20:31     ` Thien-Thi Nguyen
2008-04-01  8:29 ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).