unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* print-circle and describe-variable
@ 2007-04-07  0:54 Lennart Borgman (gmail)
  2007-04-07 17:31 ` Richard Stallman
  0 siblings, 1 reply; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-07  0:54 UTC (permalink / raw)
  To: Emacs Devel

Sometime ago we had a discussion about printing variables with recursive 
structures. As I remember it the conclusion was that we could not set 
print-circle to t generally now. But is there something that prevents 
describe-variable from let-bounding `print-circle' to t? I think this 
would be convenient.

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

* Re: print-circle and describe-variable
  2007-04-07  0:54 print-circle and describe-variable Lennart Borgman (gmail)
@ 2007-04-07 17:31 ` Richard Stallman
  2007-04-09  0:15   ` Stefan Monnier
  0 siblings, 1 reply; 27+ messages in thread
From: Richard Stallman @ 2007-04-07 17:31 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel

    Sometime ago we had a discussion about printing variables with recursive 
    structures. As I remember it the conclusion was that we could not set 
    print-circle to t generally now. But is there something that prevents 
    describe-variable from let-bounding `print-circle' to t? I think this 
    would be convenient.

It sounds like a good idea to me.  Does anyone know of a reason not to
do it?

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

* Re: print-circle and describe-variable
  2007-04-07 17:31 ` Richard Stallman
@ 2007-04-09  0:15   ` Stefan Monnier
  2007-04-09  1:00     ` Lennart Borgman (gmail)
  2007-04-09 22:52     ` Richard Stallman
  0 siblings, 2 replies; 27+ messages in thread
From: Stefan Monnier @ 2007-04-09  0:15 UTC (permalink / raw)
  To: rms; +Cc: Lennart Borgman (gmail), emacs-devel

>     Sometime ago we had a discussion about printing variables with recursive 
>     structures. As I remember it the conclusion was that we could not set 
>     print-circle to t generally now. But is there something that prevents 
>     describe-variable from let-bounding `print-circle' to t? I think this 
>     would be convenient.

> It sounds like a good idea to me.  Does anyone know of a reason not to
> do it?

I can think of one: too late.


        Stefan

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

* Re: print-circle and describe-variable
  2007-04-09  0:15   ` Stefan Monnier
@ 2007-04-09  1:00     ` Lennart Borgman (gmail)
  2007-04-09  7:02       ` Eli Zaretskii
  2007-04-09 19:25       ` Stefan Monnier
  2007-04-09 22:52     ` Richard Stallman
  1 sibling, 2 replies; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-09  1:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rms, emacs-devel

Stefan Monnier wrote:
>>     Sometime ago we had a discussion about printing variables with recursive 
>>     structures. As I remember it the conclusion was that we could not set 
>>     print-circle to t generally now. But is there something that prevents 
>>     describe-variable from let-bounding `print-circle' to t? I think this 
>>     would be convenient.
> 
>> It sounds like a good idea to me.  Does anyone know of a reason not to
>> do it?
> 
> I can think of one: too late.


But we do believe that print-circle makes it possible to print out 
recursive structures, or? And we do not believe that it disturbs 
printing out non-recursive structures (except that it gets a bit 
slower), or?

Could it make much harm then if we let describe-variable use it? And is 
it not a bug that Emacs hangs and eats all memory if you try to display 
a recursive structure with describe-variable?

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

* Re: print-circle and describe-variable
  2007-04-09  1:00     ` Lennart Borgman (gmail)
@ 2007-04-09  7:02       ` Eli Zaretskii
  2007-04-09  9:06         ` Lennart Borgman (gmail)
  2007-04-09 19:25       ` Stefan Monnier
  1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2007-04-09  7:02 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: rms, emacs-devel

> Date: Mon, 09 Apr 2007 03:00:46 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> Cc: rms@gnu.org, emacs-devel@gnu.org
> 
> > I can think of one: too late.
> 
> But we do believe that print-circle makes it possible to print out 
> recursive structures, or? And we do not believe that it disturbs 
> printing out non-recursive structures (except that it gets a bit 
> slower), or?
> 
> Could it make much harm then if we let describe-variable use it? And is 
> it not a bug that Emacs hangs and eats all memory if you try to display 
> a recursive structure with describe-variable?

Lennart, there will always be ``one more bug''.  If we strive to
release Emacs without bugs at all, we will never release!

This particular bug is not serious enough to risk postponing the
release.

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

* Re: print-circle and describe-variable
  2007-04-09  7:02       ` Eli Zaretskii
@ 2007-04-09  9:06         ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-09  9:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rms, emacs-devel

Eli Zaretskii wrote:
>> Date: Mon, 09 Apr 2007 03:00:46 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc: rms@gnu.org, emacs-devel@gnu.org
>>
>>> I can think of one: too late.
>> But we do believe that print-circle makes it possible to print out 
>> recursive structures, or? And we do not believe that it disturbs 
>> printing out non-recursive structures (except that it gets a bit 
>> slower), or?
>>
>> Could it make much harm then if we let describe-variable use it? And is 
>> it not a bug that Emacs hangs and eats all memory if you try to display 
>> a recursive structure with describe-variable?
> 
> Lennart, there will always be ``one more bug''.  If we strive to
> release Emacs without bugs at all, we will never release!


I am disturbed by this particular bug, but of course recursive 
structures are not that common. However describe-variable is one of the 
few places where print-circle really makes a difference and where the 
chance that it disturbs something is quite small.

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

* Re: print-circle and describe-variable
  2007-04-09  1:00     ` Lennart Borgman (gmail)
  2007-04-09  7:02       ` Eli Zaretskii
@ 2007-04-09 19:25       ` Stefan Monnier
  2007-04-09 19:59         ` Lennart Borgman (gmail)
  2007-04-10  2:21         ` Richard Stallman
  1 sibling, 2 replies; 27+ messages in thread
From: Stefan Monnier @ 2007-04-09 19:25 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: rms, emacs-devel

> But we do believe that print-circle makes it possible to print out
> recursive structures, or? And we do not believe that it disturbs printing
> out non-recursive structures (except that it gets a bit slower), or?

Actually, I believe it does affect printing non-circular structures in more
ways than just by making it slower.

Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))

In some cases, this is a good feature, but in many other cases it can be
very confusing.


        Stefan

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

* Re: print-circle and describe-variable
  2007-04-09 19:25       ` Stefan Monnier
@ 2007-04-09 19:59         ` Lennart Borgman (gmail)
  2007-04-09 23:08           ` Chong Yidong
  2007-04-10  1:00           ` Miles Bader
  2007-04-10  2:21         ` Richard Stallman
  1 sibling, 2 replies; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-09 19:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rms, emacs-devel

Stefan Monnier wrote:
>> But we do believe that print-circle makes it possible to print out
>> recursive structures, or? And we do not believe that it disturbs printing
>> out non-recursive structures (except that it gets a bit slower), or?
> 
> Actually, I believe it does affect printing non-circular structures in more
> ways than just by making it slower.
> 
> Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))
> 
> In some cases, this is a good feature, but in many other cases it can be
> very confusing.


Interesting, but is not that just another bug?

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

* Re: print-circle and describe-variable
  2007-04-09  0:15   ` Stefan Monnier
  2007-04-09  1:00     ` Lennart Borgman (gmail)
@ 2007-04-09 22:52     ` Richard Stallman
  1 sibling, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-04-09 22:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lennart.borgman, emacs-devel

    >     Sometime ago we had a discussion about printing variables with recursive 
    >     structures. As I remember it the conclusion was that we could not set 
    >     print-circle to t generally now. But is there something that prevents 
    >     describe-variable from let-bounding `print-circle' to t? I think this 
    >     would be convenient.

    > It sounds like a good idea to me.  Does anyone know of a reason not to
    > do it?

    I can think of one: too late.

It's not too late for this.  This is a fix for a problem that can
cause errors showing the value of a variable.  It can't cause any
problem worse than the existing problem.

Do you see any technical reason why this change would be bad?

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

* Re: print-circle and describe-variable
  2007-04-09 19:59         ` Lennart Borgman (gmail)
@ 2007-04-09 23:08           ` Chong Yidong
  2007-04-09 23:28             ` Lennart Borgman (gmail)
  2007-04-10  1:00           ` Miles Bader
  1 sibling, 1 reply; 27+ messages in thread
From: Chong Yidong @ 2007-04-09 23:08 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel, Stefan Monnier, rms

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Stefan Monnier wrote:
>>> But we do believe that print-circle makes it possible to print out
>>> recursive structures, or? And we do not believe that it disturbs printing
>>> out non-recursive structures (except that it gets a bit slower), or?
>>
>> Actually, I believe it does affect printing non-circular structures in more
>> ways than just by making it slower.
>>
>> Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))
>>
>> In some cases, this is a good feature, but in many other cases it can be
>> very confusing.
>
>
> Interesting, but is not that just another bug?

Nope.  When print-circle is on, the printer takes note of shared
substructures.  It's just that in this case, taking note of shared
substructure obfuscates the value.

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

* Re: print-circle and describe-variable
  2007-04-09 23:08           ` Chong Yidong
@ 2007-04-09 23:28             ` Lennart Borgman (gmail)
  2007-04-09 23:43               ` Drew Adams
  0 siblings, 1 reply; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-09 23:28 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel, Stefan Monnier, rms

Chong Yidong wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> 
>> Stefan Monnier wrote:
>>>> But we do believe that print-circle makes it possible to print out
>>>> recursive structures, or? And we do not believe that it disturbs printing
>>>> out non-recursive structures (except that it gets a bit slower), or?
>>> Actually, I believe it does affect printing non-circular structures in more
>>> ways than just by making it slower.
>>>
>>> Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))
>>>
>>> In some cases, this is a good feature, but in many other cases it can be
>>> very confusing.
>>
>> Interesting, but is not that just another bug?
> 
> Nope.  When print-circle is on, the printer takes note of shared
> substructures.  It's just that in this case, taking note of shared
> substructure obfuscates the value.

But the result I see is

   (#1=(2) #1#)((2) (2))

Why are the two printed representations of toto different? Hm. The doc 
is a bit unclear. To me it seems like

   #2=(#1=(2) #1#) #2

or

   (#1=(2) #1#) (#1=(2) #1#)

could both be possible. But not the one I actually see.

Yes (disregarding the output inconsistency above), I can see this is a 
difficulty. print-circle does not do exactly what I supposed. I believed 
it only jumped in when there were recursive structures (as the name 
suggests). Is there any function for checking if a structure is recursive?

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

* RE: print-circle and describe-variable
  2007-04-09 23:28             ` Lennart Borgman (gmail)
@ 2007-04-09 23:43               ` Drew Adams
  2007-04-10  0:01                 ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 27+ messages in thread
From: Drew Adams @ 2007-04-09 23:43 UTC (permalink / raw)
  To: emacs-devel

> But the result I see is
>
>    (#1=(2) #1#)((2) (2))
>
> Why are the two printed representations of toto different?

I think you are seeing: 1) the side-effect result of `prin1' printing,
followed by 2) the returned value, printed normally. (#1=(2) #1#) is the
former; ((2) (2)) is the latter.

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

* Re: print-circle and describe-variable
  2007-04-09 23:43               ` Drew Adams
@ 2007-04-10  0:01                 ` Lennart Borgman (gmail)
  2007-04-10 15:02                   ` Drew Adams
  0 siblings, 1 reply; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-10  0:01 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

Drew Adams wrote:
>> But the result I see is
>>
>>    (#1=(2) #1#)((2) (2))
>>
>> Why are the two printed representations of toto different?
> 
> I think you are seeing: 1) the side-effect result of `prin1' printing,
> followed by 2) the returned value, printed normally. (#1=(2) #1#) is the
> former; ((2) (2)) is the latter.


But it is the output of (prin1 (list toto toto)), isn't it?

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

* Re: print-circle and describe-variable
  2007-04-09 19:59         ` Lennart Borgman (gmail)
  2007-04-09 23:08           ` Chong Yidong
@ 2007-04-10  1:00           ` Miles Bader
  1 sibling, 0 replies; 27+ messages in thread
From: Miles Bader @ 2007-04-10  1:00 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: emacs-devel, Stefan Monnier, rms

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>> Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))
>
> Interesting, but is not that just another bug?

No, it's the correct behavior.

-Miles

-- 
80% of success is just showing up.  --Woody Allen

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

* Re: print-circle and describe-variable
  2007-04-09 19:25       ` Stefan Monnier
  2007-04-09 19:59         ` Lennart Borgman (gmail)
@ 2007-04-10  2:21         ` Richard Stallman
  2007-04-10  2:35           ` Chong Yidong
  1 sibling, 1 reply; 27+ messages in thread
From: Richard Stallman @ 2007-04-10  2:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: lennart.borgman, emacs-devel

    Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))

    In some cases, this is a good feature, but in many other cases it can be
    very confusing.

That is a good point.  So I guess it is better not to make this change.

How about binding print-length and print-level instead?
They could be bound to eval-expression-print-length, etc.

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

* Re: print-circle and describe-variable
  2007-04-10  2:21         ` Richard Stallman
@ 2007-04-10  2:35           ` Chong Yidong
  2007-04-11  4:14             ` Richard Matthew Stallman
  0 siblings, 1 reply; 27+ messages in thread
From: Chong Yidong @ 2007-04-10  2:35 UTC (permalink / raw)
  To: rms; +Cc: lennart.borgman, Stefan Monnier, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     Try (let ((print-circle t) (toto (list 2))) (prin1 (list toto toto)))
>
>     In some cases, this is a good feature, but in many other cases it can be
>     very confusing.
>
> That is a good point.  So I guess it is better not to make this change.
>
> How about binding print-length and print-level instead?
> They could be bound to eval-expression-print-length, etc.

I think only Lisp hackers will encounter/care about such complicated
structures, and they are surely able to customize print-length and
print-level if necessary.

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

* RE: print-circle and describe-variable
  2007-04-10  0:01                 ` Lennart Borgman (gmail)
@ 2007-04-10 15:02                   ` Drew Adams
  2007-04-10 15:33                     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 27+ messages in thread
From: Drew Adams @ 2007-04-10 15:02 UTC (permalink / raw)
  To: emacs-devel

> >> But the result I see is
> >>
> >>    (#1=(2) #1#)((2) (2))
> >>
> >> Why are the two printed representations of toto different?
> >
> > I think you are seeing: 1) the side-effect result of `prin1' printing,
> > followed by 2) the returned value, printed normally. (#1=(2) #1#) is the
> > former; ((2) (2)) is the latter.
>
> But it is the output of (prin1 (list toto toto)), isn't it?

I'm not sure what you mean (by "it" and by "the output", for instance).

During the invocation of `prin1', the `print-circle' binding is in effect,
so (#1=(2) #1#) is what is printed (by the side effect of `prin1').

The binding is finished after the expression evaluation, and that is when
the command loop prints the value that is returned by the expression.
Printing of this value is thus done using the default value of
`print-circle', nil, so you see ((2) (2)).

If you use setq, the command-loop printing of the value also shows (#1=(2)
#1#):

(setq toto (list 2))    => (2)
(setq print-circle t)
(prin1 (setq bar (list toto toto))) => (#1=(2) #1#)(#1=(2) #1#)
C-h v bar  => (#1=(2) #1#)(#1=(2) #1#)
(setq print-circle nil)
C-h v bar  => ((2) (2))
(prin1 (setq bar (list toto toto))) => ((2) (2))((2) (2))

Both the printout from `prin1' and the printout from the command-loop are
done using the same variable environment, here, so the effect is the same
for both.

You see different printouts using the `let' expression, because one is done
with the non-nil `print-circle' binding in effect, and the other is done
using the default value of `print-circle'.

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

* Re: print-circle and describe-variable
  2007-04-10 15:02                   ` Drew Adams
@ 2007-04-10 15:33                     ` Lennart Borgman (gmail)
  2007-04-10 15:50                       ` Drew Adams
  2007-04-10 16:13                       ` Chong Yidong
  0 siblings, 2 replies; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-10 15:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

Drew Adams wrote:
>>>> But the result I see is
>>>>
>>>>    (#1=(2) #1#)((2) (2))
>>>>
>>>> Why are the two printed representations of toto different?
>>> I think you are seeing: 1) the side-effect result of `prin1' printing,
>>> followed by 2) the returned value, printed normally. (#1=(2) #1#) is the
>>> former; ((2) (2)) is the latter.
>> But it is the output of (prin1 (list toto toto)), isn't it?
> 
> I'm not sure what you mean (by "it" and by "the output", for instance).
> 
> During the invocation of `prin1', the `print-circle' binding is in effect,
> so (#1=(2) #1#) is what is printed (by the side effect of `prin1').
> 
> The binding is finished after the expression evaluation, and that is when
> the command loop prints the value that is returned by the expression.
> Printing of this value is thus done using the default value of
> `print-circle', nil, so you see ((2) (2)).

Yes, but the let binding is in effect when printing the second toto too, 
or? The argument to print1 is (list toto toto).

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

* RE: print-circle and describe-variable
  2007-04-10 15:33                     ` Lennart Borgman (gmail)
@ 2007-04-10 15:50                       ` Drew Adams
  2007-04-10 16:32                         ` Lennart Borgman (gmail)
  2007-04-10 16:13                       ` Chong Yidong
  1 sibling, 1 reply; 27+ messages in thread
From: Drew Adams @ 2007-04-10 15:50 UTC (permalink / raw)
  To: emacs-devel

> >>>> But the result I see is
> >>>>
> >>>>    (#1=(2) #1#)((2) (2))
> >>>>
> >>>> Why are the two printed representations of toto different?
> >>> I think you are seeing: 1) the side-effect result of `prin1' printing,
> >>> followed by 2) the returned value, printed normally. (#1=(2)
> >>> #1#) is the former; ((2) (2)) is the latter.
> >>
> >> But it is the output of (prin1 (list toto toto)), isn't it?
> >
> > I'm not sure what you mean (by "it" and by "the output", for instance).
> >
> > During the invocation of `prin1', the `print-circle' binding is
> > in effect, so (#1=(2) #1#) is what is printed (by the side effect
> > of `prin1').
> >
> > The binding is finished after the expression evaluation, and
> > that is when the command loop prints the value that is returned
> > by the expression. Printing of this value is thus done using
> > the default value of `print-circle', nil, so you see ((2) (2)).
>
> Yes, but the let binding is in effect when printing the second toto too,
> or? The argument to print1 is (list toto toto).

I probably still don't understand what you're saying. HTH:

toto = (2)
(list toto toto) = ((2) (2))

(list toto toto) is printed twice when you eval the overall `let'
expression:

* First, by `prin1', within a context where `print-circle' = t. The printout
is (#1=(2) #1#). You don't explicitly see the value of toto printed twice
here, as (2) each time, because that's how `print-circle' works: it
represents the list without showing the normal, full representation of each
list element; it uses #1 as an abbreviation (placeholder) for the first
element, and so on.

* Second, by the command loop, in a context where `print-circle' = nil. The
printout is ((2) (2)). Here, you see the value of toto printed twice
explicitly, and it is printed the same each time.

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

* Re: print-circle and describe-variable
  2007-04-10 15:33                     ` Lennart Borgman (gmail)
  2007-04-10 15:50                       ` Drew Adams
@ 2007-04-10 16:13                       ` Chong Yidong
  1 sibling, 0 replies; 27+ messages in thread
From: Chong Yidong @ 2007-04-10 16:13 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Drew Adams, emacs-devel

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

>>>> I think you are seeing: 1) the side-effect result of `prin1' printing,
>>>> followed by 2) the returned value, printed normally. (#1=(2) #1#) is the
>>>> former; ((2) (2)) is the latter.
>>> But it is the output of (prin1 (list toto toto)), isn't it?
>>
>> I'm not sure what you mean (by "it" and by "the output", for instance).
>>
>> During the invocation of `prin1', the `print-circle' binding is in effect,
>> so (#1=(2) #1#) is what is printed (by the side effect of `prin1').
>>
>> The binding is finished after the expression evaluation, and that is when
>> the command loop prints the value that is returned by the expression.
>> Printing of this value is thus done using the default value of
>> `print-circle', nil, so you see ((2) (2)).
>
> Yes, but the let binding is in effect when printing the second toto
> too, or? The argument to print1 is (list toto toto).

No, the second list is the result of the `eval-expression', and
print-circle is not in effect there.

Here is another example:

  M-: (setq toto-list (let ((toto (list 2))) (list toto toto))) RET
  M-: (insert (format "%s" (let ((print-circle t)) (prin1 toto-list)))) RET
     => ((2) (2))
  M-: (let ((print-circle t)) (insert (format "%s" (prin1 toto-list)))) RET
     => (#1=(2) #1#)

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

* Re: print-circle and describe-variable
  2007-04-10 15:50                       ` Drew Adams
@ 2007-04-10 16:32                         ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 27+ messages in thread
From: Lennart Borgman (gmail) @ 2007-04-10 16:32 UTC (permalink / raw)
  Cc: emacs-devel

Drew Adams wrote:

> toto = (2)
> (list toto toto) = ((2) (2))


Thanks Chong and Drew. I thought toto was ((2) (2)).

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

* Re: print-circle and describe-variable
  2007-04-10  2:35           ` Chong Yidong
@ 2007-04-11  4:14             ` Richard Matthew Stallman
  2007-04-11  5:16               ` Chong Yidong
  0 siblings, 1 reply; 27+ messages in thread
From: Richard Matthew Stallman @ 2007-04-11  4:14 UTC (permalink / raw)
  To: Chong Yidong; +Cc: lennart.borgman, monnier, emacs-devel

    I think only Lisp hackers will encounter/care about such complicated
    structures, and they are surely able to customize print-length and
    print-level if necessary.

Lots of users will see these variables in values shown by
describe-variable.  And even if they know how to customize,
it is pure inconvenience to require them to do so.

It would be useful for the help buffer to let RET expand the partly
hidden value, just as evaluation in the buffer does.  And the code
is already written.

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

* Re: print-circle and describe-variable
  2007-04-11  4:14             ` Richard Matthew Stallman
@ 2007-04-11  5:16               ` Chong Yidong
  2007-04-11 23:04                 ` Richard Matthew Stallman
  2007-05-11 16:33                 ` Herbert Euler
  0 siblings, 2 replies; 27+ messages in thread
From: Chong Yidong @ 2007-04-11  5:16 UTC (permalink / raw)
  To: rms; +Cc: lennart.borgman, monnier, emacs-devel

Richard Matthew Stallman <rms@gnu.org> writes:

>     I think only Lisp hackers will encounter/care about such complicated
>     structures, and they are surely able to customize print-length and
>     print-level if necessary.
>
> Lots of users will see these variables in values shown by
> describe-variable.  And even if they know how to customize,
> it is pure inconvenience to require them to do so.
>
> It would be useful for the help buffer to let RET expand the partly
> hidden value, just as evaluation in the buffer does.  And the code
> is already written.

My point is whether this is even necessary for realistic Emacs usage.
In practice, are there any significant Emacs variables containing
circular structures, that users will want to look up using
describe-variable?  I can't think of any off the top of my head.

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

* Re: print-circle and describe-variable
  2007-04-11  5:16               ` Chong Yidong
@ 2007-04-11 23:04                 ` Richard Matthew Stallman
  2007-04-12  9:29                   ` Kim F. Storm
  2007-05-11 16:33                 ` Herbert Euler
  1 sibling, 1 reply; 27+ messages in thread
From: Richard Matthew Stallman @ 2007-04-11 23:04 UTC (permalink / raw)
  To: Chong Yidong; +Cc: lennart.borgman, monnier, emacs-devel

    My point is whether this is even necessary for realistic Emacs usage.
    In practice, are there any significant Emacs variables containing
    circular structures, that users will want to look up using
    describe-variable?

We are now talking about setting print-level and print-length.
Those are useful for looking at any sort of large value.
Not only for circular values.

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

* Re: print-circle and describe-variable
  2007-04-11 23:04                 ` Richard Matthew Stallman
@ 2007-04-12  9:29                   ` Kim F. Storm
  2007-04-13  1:41                     ` Richard Stallman
  0 siblings, 1 reply; 27+ messages in thread
From: Kim F. Storm @ 2007-04-12  9:29 UTC (permalink / raw)
  To: rms; +Cc: Chong Yidong, lennart.borgman, monnier, emacs-devel

Richard Matthew Stallman <rms@gnu.org> writes:

>     My point is whether this is even necessary for realistic Emacs usage.
>     In practice, are there any significant Emacs variables containing
>     circular structures, that users will want to look up using
>     describe-variable?
>
> We are now talking about setting print-level and print-length.
> Those are useful for looking at any sort of large value.
> Not only for circular values.

Can we postpone this until after the release?

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: print-circle and describe-variable
  2007-04-12  9:29                   ` Kim F. Storm
@ 2007-04-13  1:41                     ` Richard Stallman
  0 siblings, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2007-04-13  1:41 UTC (permalink / raw)
  To: Kim F. Storm; +Cc: cyd, lennart.borgman, monnier, emacs-devel

    > We are now talking about setting print-level and print-length.
    > Those are useful for looking at any sort of large value.
    > Not only for circular values.

    Can we postpone this until after the release?

Yes, it can wait.  Long values can be hard to grasp, but people can
manage.

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

* Re: print-circle and describe-variable
  2007-04-11  5:16               ` Chong Yidong
  2007-04-11 23:04                 ` Richard Matthew Stallman
@ 2007-05-11 16:33                 ` Herbert Euler
  1 sibling, 0 replies; 27+ messages in thread
From: Herbert Euler @ 2007-05-11 16:33 UTC (permalink / raw)
  To: cyd, rms; +Cc: lennart.borgman, monnier, emacs-devel

>Richard Matthew Stallman <rms@gnu.org> writes:
>
> >     I think only Lisp hackers will encounter/care about such complicated
> >     structures, and they are surely able to customize print-length and
> >     print-level if necessary.
> >
> > Lots of users will see these variables in values shown by
> > describe-variable.  And even if they know how to customize,
> > it is pure inconvenience to require them to do so.
> >
> > It would be useful for the help buffer to let RET expand the partly
> > hidden value, just as evaluation in the buffer does.  And the code
> > is already written.
>
>My point is whether this is even necessary for realistic Emacs usage.
>In practice, are there any significant Emacs variables containing
>circular structures, that users will want to look up using
>describe-variable?  I can't think of any off the top of my head.

There is a standard, but perhaps not significant Emacs variable may
cause Emacs hanging for the sake of reasons described in this
thread: `custom-options' in any customize buffer.

Regards,
Guanpeng Xu

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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

end of thread, other threads:[~2007-05-11 16:33 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-07  0:54 print-circle and describe-variable Lennart Borgman (gmail)
2007-04-07 17:31 ` Richard Stallman
2007-04-09  0:15   ` Stefan Monnier
2007-04-09  1:00     ` Lennart Borgman (gmail)
2007-04-09  7:02       ` Eli Zaretskii
2007-04-09  9:06         ` Lennart Borgman (gmail)
2007-04-09 19:25       ` Stefan Monnier
2007-04-09 19:59         ` Lennart Borgman (gmail)
2007-04-09 23:08           ` Chong Yidong
2007-04-09 23:28             ` Lennart Borgman (gmail)
2007-04-09 23:43               ` Drew Adams
2007-04-10  0:01                 ` Lennart Borgman (gmail)
2007-04-10 15:02                   ` Drew Adams
2007-04-10 15:33                     ` Lennart Borgman (gmail)
2007-04-10 15:50                       ` Drew Adams
2007-04-10 16:32                         ` Lennart Borgman (gmail)
2007-04-10 16:13                       ` Chong Yidong
2007-04-10  1:00           ` Miles Bader
2007-04-10  2:21         ` Richard Stallman
2007-04-10  2:35           ` Chong Yidong
2007-04-11  4:14             ` Richard Matthew Stallman
2007-04-11  5:16               ` Chong Yidong
2007-04-11 23:04                 ` Richard Matthew Stallman
2007-04-12  9:29                   ` Kim F. Storm
2007-04-13  1:41                     ` Richard Stallman
2007-05-11 16:33                 ` Herbert Euler
2007-04-09 22:52     ` Richard Stallman

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).