unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* lexbind
@ 2008-03-02 17:25 Richard Stallman
  2008-03-02 19:27 ` lexbind Stefan Monnier
  0 siblings, 1 reply; 34+ messages in thread
From: Richard Stallman @ 2008-03-02 17:25 UTC (permalink / raw)
  To: emacs-devel

The recent bytecomp bug, fixed (mostly) by renaming some local
variables, gives an argument for installing the lexbind branch.
The main issues about it are

(1) What are good ways to declare certain variables dynamic?

(2) What packages will break?

I think we have made considerable advances in the past year in
reducing what will break.




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

* Re: lexbind
  2008-03-02 17:25 lexbind Richard Stallman
@ 2008-03-02 19:27 ` Stefan Monnier
  2008-03-03 18:26   ` lexbind Richard Stallman
  0 siblings, 1 reply; 34+ messages in thread
From: Stefan Monnier @ 2008-03-02 19:27 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

> The recent bytecomp bug, fixed (mostly) by renaming some local
> variables, gives an argument for installing the lexbind branch.
> The main issues about it are

> (1) What are good ways to declare certain variables dynamic?

`defvar' is the standard way to do that.  CL offers ways to do it inside
`declare' macro calls, but I don't think it's an important refinement.

> (2) What packages will break?

Hopefully none since the lexbind branch only uses lexical-binding when
the code asks for it.


        Stefan




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

* Re: lexbind
  2008-03-02 19:27 ` lexbind Stefan Monnier
@ 2008-03-03 18:26   ` Richard Stallman
  2008-03-03 21:43     ` lexbind Stefan Monnier
  0 siblings, 1 reply; 34+ messages in thread
From: Richard Stallman @ 2008-03-03 18:26 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

    > (1) What are good ways to declare certain variables dynamic?

    `defvar' is the standard way to do that.  CL offers ways to do it inside
    `declare' macro calls, but I don't think it's an important refinement.

I am not sure `defvar' is enough.  The reason is that using it to fix
existing packages may require renaming.

    > (2) What packages will break?

    Hopefully none since the lexbind branch only uses lexical-binding when
    the code asks for it.

I did not realize that.  In that case, installing it won't break
anything.





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

* Re: lexbind
  2008-03-03 18:26   ` lexbind Richard Stallman
@ 2008-03-03 21:43     ` Stefan Monnier
  2008-03-03 22:07       ` lexbind David Kastrup
                         ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Stefan Monnier @ 2008-03-03 21:43 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

>> (1) What are good ways to declare certain variables dynamic?
>     `defvar' is the standard way to do that.  CL offers ways to do it inside
>     `declare' macro calls, but I don't think it's an important refinement.

> I am not sure `defvar' is enough.  The reason is that using it to fix
> existing packages may require renaming.

Yes, it may require renaming.  It's usually not a big deal, tho.

>> (2) What packages will break?

>     Hopefully none since the lexbind branch only uses lexical-binding when
>     the code asks for it.

> I did not realize that.  In that case, installing it won't break
> anything.

Modulo bugs, of course,


        Stefan




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

* Re: lexbind
  2008-03-03 21:43     ` lexbind Stefan Monnier
@ 2008-03-03 22:07       ` David Kastrup
  2008-03-03 22:43         ` lexbind Stefan Monnier
  2008-03-03 22:18       ` lexbind paul r
  2008-03-04 23:03       ` lexbind Richard Stallman
  2 siblings, 1 reply; 34+ messages in thread
From: David Kastrup @ 2008-03-03 22:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rms, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> (1) What are good ways to declare certain variables dynamic?
>>     `defvar' is the standard way to do that.  CL offers ways to do it inside
>>     `declare' macro calls, but I don't think it's an important refinement.
>
>> I am not sure `defvar' is enough.  The reason is that using it to fix
>> existing packages may require renaming.
>
> Yes, it may require renaming.  It's usually not a big deal, tho.
>
>>> (2) What packages will break?
>
>>     Hopefully none since the lexbind branch only uses lexical-binding when
>>     the code asks for it.
>
>> I did not realize that.  In that case, installing it won't break
>> anything.
>
> Modulo bugs, of course,

Could you list the advantages and the principal difference, and the kind
of breakage to expect?  If most developers can agree this is something
worth having in the long run, then we should make a plan when to
integrate it.  I don't have a feeling yet for the 23.1 time/feature
frame our maintainers are aiming for, namely how early we are in the
feature admission phase.

I certainly would like to have a replacement for the ugly (and
non-byte-compiled)

`(lambda (...) ... ',value )

constructs necessary at various places.  Would lexbind help?  How?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




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

* Re: lexbind
  2008-03-03 21:43     ` lexbind Stefan Monnier
  2008-03-03 22:07       ` lexbind David Kastrup
@ 2008-03-03 22:18       ` paul r
  2008-03-03 22:45         ` lexbind Stefan Monnier
  2008-03-03 22:49         ` lexbind David De La Harpe Golden
  2008-03-04 23:03       ` lexbind Richard Stallman
  2 siblings, 2 replies; 34+ messages in thread
From: paul r @ 2008-03-03 22:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rms, emacs-devel

>
>  >     Hopefully none since the lexbind branch only uses lexical-binding when
>  >     the code asks for it.

will this allow lexical binding for defun ? Currently defun binds
function to symbol globaly, so it can not be used as a local-only
function helper, for instance in a tail-recursion.




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

* Re: lexbind
  2008-03-03 22:07       ` lexbind David Kastrup
@ 2008-03-03 22:43         ` Stefan Monnier
  2008-03-03 23:09           ` lexbind David Kastrup
  0 siblings, 1 reply; 34+ messages in thread
From: Stefan Monnier @ 2008-03-03 22:43 UTC (permalink / raw)
  To: David Kastrup; +Cc: rms, emacs-devel

> I certainly would like to have a replacement for the ugly (and
> non-byte-compiled)

> `(lambda (...) ... ',value )

You can already use `lexical-let' for that.  In a certain sense, the
`lexbind' branch makes let-binding behave like lexical-let by default.


        Stefan




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

* Re: lexbind
  2008-03-03 22:18       ` lexbind paul r
@ 2008-03-03 22:45         ` Stefan Monnier
  2008-03-04 10:12           ` lexbind paul r
  2008-03-03 22:49         ` lexbind David De La Harpe Golden
  1 sibling, 1 reply; 34+ messages in thread
From: Stefan Monnier @ 2008-03-03 22:45 UTC (permalink / raw)
  To: paul r; +Cc: rms, emacs-devel

>> >     Hopefully none since the lexbind branch only uses lexical-binding when
>> >     the code asks for it.

> will this allow lexical binding for defun ?

No.  Just like there's no dynamically-scoped binding for functions,
I don't know of any plans to have lexically-scoped bindings
for functions.

> Currently defun binds function to symbol globaly, so it can not be
> used as a local-only function helper, for instance in
> a tail-recursion.

You can use

  (let ((loop (lambda (arg) body)))
    ... (funcall foo exp) ...)


-- Stefan




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

* Re: lexbind
  2008-03-03 22:18       ` lexbind paul r
  2008-03-03 22:45         ` lexbind Stefan Monnier
@ 2008-03-03 22:49         ` David De La Harpe Golden
  1 sibling, 0 replies; 34+ messages in thread
From: David De La Harpe Golden @ 2008-03-03 22:49 UTC (permalink / raw)
  To: paul r; +Cc: emacs-devel, Stefan Monnier, rms

paul r wrote:
>>  >     Hopefully none since the lexbind branch only uses lexical-binding when
>>  >     the code asks for it.
> 
> will this allow lexical binding for defun ? Currently defun binds
> function to symbol globaly, so it can not be used as a local-only
> function helper, for instance in a tail-recursion.
> 
> 

DEFUN doesn't establish local lexically scoped function bindings in
common lisp either, you use FLET or LABELS to establish local functions.
 (Yes I have noticed emacs lisp isn't common lisp, I'm just saying.)











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

* Re: lexbind
  2008-03-03 22:43         ` lexbind Stefan Monnier
@ 2008-03-03 23:09           ` David Kastrup
  2008-03-03 23:31             ` lexbind Miles Bader
  0 siblings, 1 reply; 34+ messages in thread
From: David Kastrup @ 2008-03-03 23:09 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rms, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I certainly would like to have a replacement for the ugly (and
>> non-byte-compiled)
>
>> `(lambda (...) ... ',value )
>
> You can already use `lexical-let' for that.  In a certain sense, the
> `lexbind' branch makes let-binding behave like lexical-let by default.

It does not look pretty in the source.  Are function parameters let or
lexical-let to their values in lexbind?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




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

* Re: lexbind
  2008-03-03 23:09           ` lexbind David Kastrup
@ 2008-03-03 23:31             ` Miles Bader
  0 siblings, 0 replies; 34+ messages in thread
From: Miles Bader @ 2008-03-03 23:31 UTC (permalink / raw)
  To: David Kastrup; +Cc: emacs-devel, Stefan Monnier, rms

David Kastrup <dak@gnu.org> writes:
> It does not look pretty in the source.  Are function parameters let or
> lexical-let to their values in lexbind?

lexically-bound (presuming the source file is tagged "lexically-bound").

-Miles

-- 
Accord, n. Harmony.




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

* Re: lexbind
  2008-03-03 22:45         ` lexbind Stefan Monnier
@ 2008-03-04 10:12           ` paul r
  2008-03-04 15:36             ` lexbind Miles Bader
  0 siblings, 1 reply; 34+ messages in thread
From: paul r @ 2008-03-04 10:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: rms, emacs-devel

> You can use
>
>   (let ((loop (lambda (arg) body)))
>     ... (funcall foo exp) ...)
>

yes, that's what I do when needed. I was just wondering about this
point because I like the lexical scope of (define (fct ...) ...) in
Scheme. On the other hand, emacs lisp in not scheme, and I'm sure
there good reasons for globaly binding with (defun ...).
Thanks

-- paul




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

* Re: lexbind
  2008-03-04 10:12           ` lexbind paul r
@ 2008-03-04 15:36             ` Miles Bader
  2008-03-04 16:29               ` lexbind paul r
  0 siblings, 1 reply; 34+ messages in thread
From: Miles Bader @ 2008-03-04 15:36 UTC (permalink / raw)
  To: paul r; +Cc: emacs-devel, Stefan Monnier, rms

"paul r" <paul.r.ml@gmail.com> writes:
> On the other hand, emacs lisp in not scheme, and I'm sure
> there good reasons for globaly binding with (defun ...).

Well there's the occasional desire to have other files use your
functions...

-miles

-- 
Genealogy, n. An account of one's descent from an ancestor who did not
particularly care to trace his own.




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

* Re: lexbind
  2008-03-04 15:36             ` lexbind Miles Bader
@ 2008-03-04 16:29               ` paul r
  2008-03-04 23:04                 ` lexbind Stephen J. Turnbull
  0 siblings, 1 reply; 34+ messages in thread
From: paul r @ 2008-03-04 16:29 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel, Stefan Monnier, rms

>
> Well there's the occasional desire to have other files use your
>  functions...
>
>  -miles
>
>
for sure you have never seen one of *my* functions, or you would not
believe any other file want to refer to it !
more seriously, there is this obvious case showing globaly bound
functions are required.
 On the other hand, some others functions will never be use out of
lexical scope, so the developper has to choose between :
 - manipulate symbols bound to lambda definitions as proposed above,
which is a working solution but far less pleasant to manipulate than
normaly "defun-ed" functions
 - do a regular (defun ...), which ends up being noisy.

In the current CVS, I can count more than 7600 fonctions in the "M-x
describe-function" completion buffer. A quick look at them make me
think a lot of them are not designed to work out of lexical scope, or
at least they are designed by a mode, for its own use only, and could
therefore be in the lexical scope.

In the spirit of the (lexical-let ...), a possible improvement could
be to have a (lexical-defun ...), don't you think ? It would not break
anything and would make at least one person happy, maybe more. Just an
idea, be sure I appreciate you know this topic several orders of
magnitude better than I will ever do.

-- paul




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

* Re: lexbind
  2008-03-03 21:43     ` lexbind Stefan Monnier
  2008-03-03 22:07       ` lexbind David Kastrup
  2008-03-03 22:18       ` lexbind paul r
@ 2008-03-04 23:03       ` Richard Stallman
  2008-03-04 23:18         ` lexbind Miles Bader
  2 siblings, 1 reply; 34+ messages in thread
From: Richard Stallman @ 2008-03-04 23:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

    > I am not sure `defvar' is enough.  The reason is that using it to fix
    > existing packages may require renaming.

    Yes, it may require renaming.  It's usually not a big deal, tho.

I think we would be better off also having other mechanisms
for doing this, which do not require renaming.





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

* Re: lexbind
  2008-03-04 16:29               ` lexbind paul r
@ 2008-03-04 23:04                 ` Stephen J. Turnbull
  2008-03-05  2:38                   ` lexbind Miles Bader
  0 siblings, 1 reply; 34+ messages in thread
From: Stephen J. Turnbull @ 2008-03-04 23:04 UTC (permalink / raw)
  To: paul r; +Cc: emacs-devel, Stefan Monnier, rms, Miles Bader

paul r writes:

 > In the spirit of the (lexical-let ...), a possible improvement could
 > be to have a (lexical-defun ...),

What improvement is this over

    (require 'cl-macs)
    (flet ((...)))

I guess it requires two less levels of parentheses, and one less level
of indentation.  Anything else?




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

* Re: lexbind
  2008-03-04 23:03       ` lexbind Richard Stallman
@ 2008-03-04 23:18         ` Miles Bader
  2008-03-05 21:33           ` lexbind Richard Stallman
  0 siblings, 1 reply; 34+ messages in thread
From: Miles Bader @ 2008-03-04 23:18 UTC (permalink / raw)
  To: rms; +Cc: Stefan Monnier, emacs-devel

Richard Stallman <rms@gnu.org> writes:
>     > I am not sure `defvar' is enough.  The reason is that using it to fix
>     > existing packages may require renaming.
>
>     Yes, it may require renaming.  It's usually not a big deal, tho.
>
> I think we would be better off also having other mechanisms
> for doing this, which do not require renaming.

Could you give a concrete example of what you're talking about?

-Miles

-- 
Occam's razor split hairs so well, I bought the whole argument!




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

* Re: lexbind
  2008-03-04 23:04                 ` lexbind Stephen J. Turnbull
@ 2008-03-05  2:38                   ` Miles Bader
  2008-03-05  5:08                     ` lexbind Dan Nicolaescu
  2008-03-05  5:58                     ` lexbind Stephen J. Turnbull
  0 siblings, 2 replies; 34+ messages in thread
From: Miles Bader @ 2008-03-05  2:38 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: paul r, Stefan Monnier, rms, emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:
>  > In the spirit of the (lexical-let ...), a possible improvement could
>  > be to have a (lexical-defun ...),
>
> What improvement is this over
>
>     (require 'cl-macs)
>     (flet ((...)))
>
> I guess it requires two less levels of parentheses, and one less level
> of indentation.  Anything else?

Well, practically speaking, a slight problem is that it doesn't work
with cl's implementation of flet (which besides being very ugly, doesn't
actually implement lexical binding anyway).

Of course in conjunction with lexical binding, it would be good to have
a real implementation of flet.

Still, if you were using it for an entire file full of functions, issues
like the extra indentation (which is actually fairly large) and parens
could indeed be annoying.

-Miles

-- 
Dictionary, n.  A malevolent literary device for cramping the growth of
a language and making it hard and inelastic. This dictionary, however,
is a most useful work.




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

* Re: lexbind
  2008-03-05  2:38                   ` lexbind Miles Bader
@ 2008-03-05  5:08                     ` Dan Nicolaescu
  2008-03-05  5:58                     ` lexbind Stephen J. Turnbull
  1 sibling, 0 replies; 34+ messages in thread
From: Dan Nicolaescu @ 2008-03-05  5:08 UTC (permalink / raw)
  To: Miles Bader; +Cc: Stephen J. Turnbull, paul r, emacs-devel, Stefan Monnier, rms

Miles Bader <miles.bader@necel.com> writes:

  > "Stephen J. Turnbull" <stephen@xemacs.org> writes:
  > >  > In the spirit of the (lexical-let ...), a possible improvement could
  > >  > be to have a (lexical-defun ...),
  > >
  > > What improvement is this over
  > >
  > >     (require 'cl-macs)
  > >     (flet ((...)))
  > >
  > > I guess it requires two less levels of parentheses, and one less level
  > > of indentation.  Anything else?
  > 
  > Well, practically speaking, a slight problem is that it doesn't work
  > with cl's implementation of flet (which besides being very ugly, doesn't
  > actually implement lexical binding anyway).
  > 
  > Of course in conjunction with lexical binding, it would be good to have
  > a real implementation of flet.
  > 
  > Still, if you were using it for an entire file full of functions, issues
  > like the extra indentation (which is actually fairly large) and parens
  > could indeed be annoying.

Strange that nobody has asked this yet: what about performance?  I there
already  a noticeable improvement? 




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

* Re: lexbind
  2008-03-05  2:38                   ` lexbind Miles Bader
  2008-03-05  5:08                     ` lexbind Dan Nicolaescu
@ 2008-03-05  5:58                     ` Stephen J. Turnbull
  2008-03-14 17:03                       ` lexbind paul r
  1 sibling, 1 reply; 34+ messages in thread
From: Stephen J. Turnbull @ 2008-03-05  5:58 UTC (permalink / raw)
  To: Miles Bader; +Cc: paul r, emacs-devel, Stefan Monnier, rms

Miles Bader writes:

 > "Stephen J. Turnbull" <stephen@xemacs.org> writes:
 > >  > In the spirit of the (lexical-let ...), a possible improvement could
 > >  > be to have a (lexical-defun ...),
 > >
 > > What improvement is this over
 > >
 > >     (require 'cl-macs)
 > >     (flet ((...)))
 > >
 > > I guess it requires two less levels of parentheses, and one less level
 > > of indentation.  Anything else?
 > 
 > Well, practically speaking, a slight problem is that it doesn't work
 > with cl's implementation of flet (which besides being very ugly, doesn't
 > actually implement lexical binding anyway).

Sorry, I meant `labels', which does claim to do so.

Remember, the OP already mentioned `labels'.  I'm not asking that we
keep the cl-macs implementation (although the `labels' implementation
isn't all that ugly, IMO), just why use a different name?  Is there a
difference in behavior intended?





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

* Re: lexbind
  2008-03-04 23:18         ` lexbind Miles Bader
@ 2008-03-05 21:33           ` Richard Stallman
  0 siblings, 0 replies; 34+ messages in thread
From: Richard Stallman @ 2008-03-05 21:33 UTC (permalink / raw)
  To: Miles Bader; +Cc: monnier, emacs-devel

    >     Yes, it may require renaming.  It's usually not a big deal, tho.
    >
    > I think we would be better off also having other mechanisms
    > for doing this, which do not require renaming.

    Could you give a concrete example of what you're talking about?

One mechanism that has been used is (declare (special foo)).
That is one possible choice now.




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

* Re: lexbind
  2008-03-05  5:58                     ` lexbind Stephen J. Turnbull
@ 2008-03-14 17:03                       ` paul r
  2008-03-14 19:00                         ` lexbind Stefan Monnier
  2008-03-14 22:10                         ` lexbind Stephen J. Turnbull
  0 siblings, 2 replies; 34+ messages in thread
From: paul r @ 2008-03-14 17:03 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: emacs-devel, Stefan Monnier, rms, Miles Bader

> Sorry, I meant `labels', which does claim to do so.
>

At the end, what is the "officially recommended" way of defining a
local function ?
    -   (labels ...) , a macro  coming from cl-macs ?
or - (let ((fct (lambda ...))) .) which is not a macro, but is
syntaxly less convenient to manipulate?
Thanks for your light.

-- Paul




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

* Re: lexbind
  2008-03-14 17:03                       ` lexbind paul r
@ 2008-03-14 19:00                         ` Stefan Monnier
  2008-03-14 22:10                         ` lexbind Stephen J. Turnbull
  1 sibling, 0 replies; 34+ messages in thread
From: Stefan Monnier @ 2008-03-14 19:00 UTC (permalink / raw)
  To: paul r; +Cc: Stephen J. Turnbull, emacs-devel, rms, Miles Bader

> At the end, what is the "officially recommended" way of defining a
> local function ?
>     -   (labels ...) , a macro  coming from cl-macs ?
> or - (let ((fct (lambda ...))) .) which is not a macro, but is
> syntaxly less convenient to manipulate?
> Thanks for your light.

Either way is fine,


        Stefan




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

* Re: lexbind
  2008-03-14 17:03                       ` lexbind paul r
  2008-03-14 19:00                         ` lexbind Stefan Monnier
@ 2008-03-14 22:10                         ` Stephen J. Turnbull
  1 sibling, 0 replies; 34+ messages in thread
From: Stephen J. Turnbull @ 2008-03-14 22:10 UTC (permalink / raw)
  To: paul r; +Cc: Miles Bader, Stefan Monnier, emacs-devel

paul r writes:

 > At the end, what is the "officially recommended" way of defining a
 > local function ?
 >     -   (labels ...) , a macro  coming from cl-macs ?
 > or - (let ((fct (lambda ...))) .) which is not a macro, but is
 > syntaxly less convenient to manipulate?
 > Thanks for your light.

It depends on where you are working.  If you're doing something deep
in the core, then you do not want to require cl-macs (there are ways
to avoid pulling it into the build, but they're fragile and ugly), and
the (let ((fct ...)) ... (funcall fct ...)) idiom may be preferred.

Otherwise, it's a matter of style, and since Stefan says both are OK,
it's up to you.  I've not tried the latter (I usually just use flet
which is a bad habit from my early days, labels is usually more
appropriate for my use), but the `(funcall fct ...)' idiom might be
useful to remind the programmer later that `fct' is local, not global.

Of course if the function is so big that you forget that while reading
it, maybe something else is wrong with the code. :-)





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

* lexbind
@ 2011-02-17 22:10 Stefan Monnier
  2011-02-18  3:54 ` lexbind Daniel Colascione
  2011-02-20 18:39 ` lexbind Tom Tromey
  0 siblings, 2 replies; 34+ messages in thread
From: Stefan Monnier @ 2011-02-17 22:10 UTC (permalink / raw)
  To: emacs-devel

Just a heads up that the lexbind-new branch is moving forward.

It's not yet ready for inclusion (still a few things to clean up and
a few more to change), but I finally got it to run mpc.el (compiled
using lexical-binding).


        Stefan



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

* Re: lexbind
  2011-02-17 22:10 lexbind Stefan Monnier
@ 2011-02-18  3:54 ` Daniel Colascione
  2011-02-18  3:57   ` lexbind Daniel Colascione
  2011-02-20 18:39 ` lexbind Tom Tromey
  1 sibling, 1 reply; 34+ messages in thread
From: Daniel Colascione @ 2011-02-18  3:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

On 2/17/11 2:10 PM, Stefan Monnier wrote:
> Just a heads up that the lexbind-new branch is moving forward.
> 
> It's not yet ready for inclusion (still a few things to clean up and
> a few more to change), but I finally got it to run mpc.el (compiled
> using lexical-binding).

That's great news. Thanks.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: lexbind
  2011-02-18  3:54 ` lexbind Daniel Colascione
@ 2011-02-18  3:57   ` Daniel Colascione
  2011-02-18  4:48     ` lexbind Stefan Monnier
  0 siblings, 1 reply; 34+ messages in thread
From: Daniel Colascione @ 2011-02-18  3:57 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

On 2/17/11 7:54 PM, Daniel Colascione wrote:
> On 2/17/11 2:10 PM, Stefan Monnier wrote:
>> Just a heads up that the lexbind-new branch is moving forward.
>>
>> It's not yet ready for inclusion (still a few things to clean up and
>> a few more to change), but I finally got it to run mpc.el (compiled
>> using lexical-binding).
> 
> That's great news. Thanks.

Err, I forgot to add --- what about mpc.el makes it a milestone?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: lexbind
  2011-02-18  3:57   ` lexbind Daniel Colascione
@ 2011-02-18  4:48     ` Stefan Monnier
  0 siblings, 0 replies; 34+ messages in thread
From: Stefan Monnier @ 2011-02-18  4:48 UTC (permalink / raw)
  To: Daniel Colascione; +Cc: emacs-devel

>>> Just a heads up that the lexbind-new branch is moving forward.
>>> It's not yet ready for inclusion (still a few things to clean up and
>>> a few more to change), but I finally got it to run mpc.el (compiled
>>> using lexical-binding).
>> That's great news. Thanks.
> Err, I forgot to add --- what about mpc.el makes it a milestone?

Well, the author of the closure conversion code (cconv.el) picked a few
files and "made them use lexbind" (mostly set lexical-binding to t and
replace lexical-let by let), among them pcase and mpc.  Since compiling
uses pcase (via macroexpand-all), running the compiled mpc code is
a good test (also the mpc code used lexical-let to build closures).

I.e. running mpc.el was my first "non-toy test" and it bumped into
a good number of bugs.  So, while I'm sure there are still bugs lurking,
I expect that most codes should be compiled correctly now.


        Stefan



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

* Re: lexbind
  2011-02-17 22:10 lexbind Stefan Monnier
  2011-02-18  3:54 ` lexbind Daniel Colascione
@ 2011-02-20 18:39 ` Tom Tromey
  2011-02-21 22:01   ` lexbind Stefan Monnier
  1 sibling, 1 reply; 34+ messages in thread
From: Tom Tromey @ 2011-02-20 18:39 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan> Just a heads up that the lexbind-new branch is moving forward.

Very cool.

Stefan> It's not yet ready for inclusion (still a few things to clean up and
Stefan> a few more to change), but I finally got it to run mpc.el (compiled
Stefan> using lexical-binding).

I checked it out and did a make bootstrap.
It failed as appended.

Tom

Compiling /space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el
Debugger entered--Lisp error: (wrong-type-argument listp "Forgot to expand macro eieio-object-p")
  error-message-string("Forgot to expand macro eieio-object-p")
  byte-compile-report-error("Forgot to expand macro eieio-object-p")
  byte-compile-form((eieio-object-p (car local-args)))
  byte-compile-one-arg((not (eieio-object-p (car local-args))))
  byte-compile-form((not (eieio-object-p (car local-args))))
  byte-compile-if((if (not (eieio-object-p (car local-args))) (signal (quote no-method-definition) (list (quote shared-initialize) local-args)) (let ((scoped-class (quote eieio-default-superclass)) (eieio-generic-call-next-method-list nil) (eieio-generic-call-key method-primary) (eieio-generic-call-methodname (quote shared-initialize)) (eieio-generic-call-arglst local-args)) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ((scoped-class ...)) (while slots (let ... ...) (setq slots ...))))) local-args))))
  byte-compile-form((if (not (eieio-object-p (car local-args))) (signal (quote no-method-definition) (list (quote shared-initialize) local-args)) (let ((scoped-class (quote eieio-default-superclass)) (eieio-generic-call-next-method-list nil) (eieio-generic-call-key method-primary) (eieio-generic-call-methodname (quote shared-initialize)) (eieio-generic-call-arglst local-args)) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ((scoped-class ...)) (while slots (let ... ...) (setq slots ...))))) local-args))) nil)
  byte-compile-top-level((progn (if (not (eieio-object-p (car local-args))) (signal (quote no-method-definition) (list (quote shared-initialize) local-args)) (if nil (apply (quote no-applicable-method) (car local-args) (quote shared-initialize) local-args) (let ((scoped-class (quote eieio-default-superclass)) (eieio-generic-call-next-method-list nil) (eieio-generic-call-key method-primary) (eieio-generic-call-methodname (quote shared-initialize)) (eieio-generic-call-arglst local-args)) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ... ...))) local-args))))) nil lambda)
  byte-compile-lambda((lambda (&rest local-args) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (if (not (eieio-object-p (car local-args))) (signal (quote no-method-definition) (list (quote shared-initialize) local-args)) (if nil (apply (quote no-applicable-method) (car local-args) (quote shared-initialize) local-args) (let ((scoped-class (quote eieio-default-superclass)) (eieio-generic-call-next-method-list nil) (eieio-generic-call-key method-primary) (eieio-generic-call-methodname (quote shared-initialize)) (eieio-generic-call-arglst local-args)) (apply (quote (lambda (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ... ...))) local-args))))))
  (let ((byte-compile-free-references nil) (byte-compile-warnings nil)) (byte-compile-lambda (\` (lambda (&rest local-args) (\, doc-string) (if (not (eieio-object-p (car local-args))) (signal (quote no-method-definition) (list (\, ...) local-args)) (if (\, (if ... nil ...)) (apply (quote no-applicable-method) (car local-args) (\, ...) local-args) (let (... ... ... ... ...) (apply ... local-args))))))))
  eieio-defgeneric-form-primary-only-one(shared-initialize "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." eieio-default-superclass (lambda (obj slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ((scoped-class (aref obj object-class))) (while slots (let ((rn (eieio-initarg-to-attribute (object-class-fast obj) (car slots)))) (if (not rn) (slot-missing obj (car slots) (quote oset) (car (cdr slots))) (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (cdr slots)))))))
  (fset method (eieio-defgeneric-form-primary-only-one method doc-string (car entry) (cdr entry)))
  (let* ((doc-string (documentation method)) (M (get method (quote eieio-method-tree))) (entry (car (aref M method-primary)))) (fset method (eieio-defgeneric-form-primary-only-one method doc-string (car entry) (cdr entry))))
  eieio-defgeneric-reset-generic-form-primary-only-one(shared-initialize)
  (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generic-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-primary-only method))
  (if (generic-primary-only-p method) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generic-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-primary-only method)) (eieio-defgeneric-reset-generic-form method))
  (progn (if (generic-primary-only-p method) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generic-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-primary-only method)) (eieio-defgeneric-reset-generic-form method)))
  (if eieio-optimize-primary-methods-flag (progn (if (generic-primary-only-p method) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generic-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-primary-only method)) (eieio-defgeneric-reset-generic-form method))))
  (when eieio-optimize-primary-methods-flag (if (generic-primary-only-p method) (if (generic-primary-only-one-p method) (eieio-defgeneric-reset-generic-form-primary-only-one method) (eieio-defgeneric-reset-generic-form-primary-only method)) (eieio-defgeneric-reset-generic-form method)))
  eieio-defmethod(shared-initialize (((obj eieio-default-superclass) slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ((scoped-class (aref obj object-class))) (while slots (let ((rn (eieio-initarg-to-attribute (object-class-fast obj) (car slots)))) (if (not rn) (slot-missing obj (car slots) (quote oset) (car (cdr slots))) (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (cdr slots)))))))
  (defmethod shared-initialize ((obj eieio-default-superclass) slots) "Set slots of OBJ with SLOTS which is a list of name/value pairs.\nCalled from the constructor routine." (let ((scoped-class (aref obj object-class))) (while slots (let ((rn (eieio-initarg-to-attribute (object-class-fast obj) (car slots)))) (if (not rn) (slot-missing obj (car slots) (quote oset) (car (cdr slots))) (eieio-oset obj rn (car (cdr slots))))) (setq slots (cdr (cdr slots))))))
  (progn (if (fboundp (quote compiled-function-arglist)) (defalias (quote eieio-compiled-function-arglist) (quote compiled-function-arglist)) (defun eieio-compiled-function-arglist (func) "Return the argument list for the compiled function FUNC." (aref func 0))) (defvar eieio-hook nil "*This hook is executed, then cleared each time `defclass' is called.") (defvar eieio-error-unsupported-class-tags nil "Non-nil to throw an error if an encountered tag is unsupported.\nThis may prevent classes from CLOS applications from being used with EIEIO\nsince EIEIO does not support all CLOS tags.") (defvar eieio-skip-typecheck nil "*If non-nil, skip all slot typechecking.\nSet this to t permanently if a program is functioning well to get a\nsmall speed increase.  This variable is also used internally to handle\ndefault setting for optimization purposes.") (defvar eieio-optimize-primary-methods-flag t "Non-nil means to optimize the method dispatch on primary methods.") (defvar this nil "Inside a method, this variable is the object in question.\nDO NOT SET THIS YOURSELF unless you are trying to simulate friendly slots.\n\nNote: Embedded methods are no longer supported.  The variable THIS is\nstill set for CLOS methods for the sake of routines like\n`call-next-method'.") (defvar scoped-class nil "This is set to a class when a method is running.\nThis is so we know we are allowed to check private parts or how to\nexecute a `call-next-method'.  DO NOT SET THIS YOURSELF!") (defvar eieio-initializing-object nil "Set to non-nil while initializing an object.") (defconst eieio-unbound (if (and (boundp (quote eieio-unbound)) (symbolp eieio-unbound)) eieio-unbound (make-symbol "unbound")) "Uninterned symbol representing an unbound slot in an object.") (defvar eieio-default-superclass nil) (defconst class-symbol 1 "Class's symbol (self-referencing.).") (defconst class-parent 2 "Class parent slot.") (defconst class-children 3 "Class children class slot.") (defconst class-symbol-obarray 4 "Obarray permitting fast access to variable position indexes.") (defconst class-public-a 5 "Class attribute index.") (defconst class-public-d 6 "Class attribute defaults index.") (defconst class-public-doc 7 "Class documentation strings for attributes.") (defconst class-public-type 8 "Class type for a slot.") (defconst class-public-custom 9 "Class custom type for a slot.") (defconst class-public-custom-label 10 "Class custom group for a slot.") (defconst class-public-custom-group 11 "Class custom group for a slot.") (defconst class-public-printer 12 "Printer for a slot.") (defconst class-protection 13 "Class protection for a slot.") (defconst class-initarg-tuples 14 "Class initarg tuples list.") (defconst class-class-allocation-a 15 "Class allocated attributes.") (defconst class-class-allocation-doc 16 "Class allocated documentation.") (defconst class-class-allocation-type 17 "Class allocated value type.") (defconst class-class-allocation-custom 18 "Class allocated custom descriptor.") (defconst class-class-allocation-custom-label 19 "Class allocated custom descriptor.") (defconst class-class-allocation-custom-group 20 "Class allocated custom group.") (defconst class-class-allocation-printer 21 "Class allocated printer for a slot.") (defconst class-class-allocation-protection 22 "Class allocated protection list.") (defconst class-class-allocation-values 23 "Class allocated value vector.") (defconst class-default-object-cache 24 "Cache index of what a newly created object would look like.\nThis will speed up instantiation time as only a `copy-sequence' will\nbe needed, instead of looping over all the values and setting them\nfrom the default.") (defconst class-options 25 "Storage location of tagged class options.\nStored outright without modifications or stripping.") (defconst class-num-slots 26 "Number of slots in the class definition object.") (defconst object-class 1 "Index in an object vector where the class is stored.") (defconst object-name 2 "Index in an object where the name is stored.") (defconst method-static 0 "Index into :static tag on a method.") (defconst method-before 1 "Index into :before tag on a method.") (defconst method-primary 2 "Index into :primary tag on a method.") (defconst method-after 3 "Index into :after tag on a method.") (defconst method-num-lists 4 "Number of indexes into methods vector in which groups of functions are kept.") (defconst method-generic-before 4 "Index into generic :before tag on a method.") (defconst method-generic-primary 5 "Index into generic :primary tag on a method.") (defconst method-generic-after 6 "Index into generic :after tag on a method.") (defconst method-num-slots 7 "Number of indexes into a method's vector.") (defsubst eieio-specialized-key-to-generic-key (key) "Convert a specialized KEY into a generic method key." (cond ((eq key method-static) 0) ((< key method-num-lists) (+ key 3)) (t key))) (autoload (quote byte-compile-file-form-defmethod) "eieio-comp" "This function is used to byte compile methods in a nice way.") ...)
  (eval-and-compile (if (fboundp (quote compiled-function-arglist)) (defalias (quote eieio-compiled-function-arglist) (quote compiled-function-arglist)) (defun eieio-compiled-function-arglist (func) "Return the argument list for the compiled function FUNC." (aref func 0))) (defvar eieio-hook nil "*This hook is executed, then cleared each time `defclass' is called.") (defvar eieio-error-unsupported-class-tags nil "Non-nil to throw an error if an encountered tag is unsupported.\nThis may prevent classes from CLOS applications from being used with EIEIO\nsince EIEIO does not support all CLOS tags.") (defvar eieio-skip-typecheck nil "*If non-nil, skip all slot typechecking.\nSet this to t permanently if a program is functioning well to get a\nsmall speed increase.  This variable is also used internally to handle\ndefault setting for optimization purposes.") (defvar eieio-optimize-primary-methods-flag t "Non-nil means to optimize the method dispatch on primary methods.") (defvar this nil "Inside a method, this variable is the object in question.\nDO NOT SET THIS YOURSELF unless you are trying to simulate friendly slots.\n\nNote: Embedded methods are no longer supported.  The variable THIS is\nstill set for CLOS methods for the sake of routines like\n`call-next-method'.") (defvar scoped-class nil "This is set to a class when a method is running.\nThis is so we know we are allowed to check private parts or how to\nexecute a `call-next-method'.  DO NOT SET THIS YOURSELF!") (defvar eieio-initializing-object nil "Set to non-nil while initializing an object.") (defconst eieio-unbound (if (and (boundp (quote eieio-unbound)) (symbolp eieio-unbound)) eieio-unbound (make-symbol "unbound")) "Uninterned symbol representing an unbound slot in an object.") (defvar eieio-default-superclass nil) (defconst class-symbol 1 "Class's symbol (self-referencing.).") (defconst class-parent 2 "Class parent slot.") (defconst class-children 3 "Class children class slot.") (defconst class-symbol-obarray 4 "Obarray permitting fast access to variable position indexes.") (defconst class-public-a 5 "Class attribute index.") (defconst class-public-d 6 "Class attribute defaults index.") (defconst class-public-doc 7 "Class documentation strings for attributes.") (defconst class-public-type 8 "Class type for a slot.") (defconst class-public-custom 9 "Class custom type for a slot.") (defconst class-public-custom-label 10 "Class custom group for a slot.") (defconst class-public-custom-group 11 "Class custom group for a slot.") (defconst class-public-printer 12 "Printer for a slot.") (defconst class-protection 13 "Class protection for a slot.") (defconst class-initarg-tuples 14 "Class initarg tuples list.") (defconst class-class-allocation-a 15 "Class allocated attributes.") (defconst class-class-allocation-doc 16 "Class allocated documentation.") (defconst class-class-allocation-type 17 "Class allocated value type.") (defconst class-class-allocation-custom 18 "Class allocated custom descriptor.") (defconst class-class-allocation-custom-label 19 "Class allocated custom descriptor.") (defconst class-class-allocation-custom-group 20 "Class allocated custom group.") (defconst class-class-allocation-printer 21 "Class allocated printer for a slot.") (defconst class-class-allocation-protection 22 "Class allocated protection list.") (defconst class-class-allocation-values 23 "Class allocated value vector.") (defconst class-default-object-cache 24 "Cache index of what a newly created object would look like.\nThis will speed up instantiation time as only a `copy-sequence' will\nbe needed, instead of looping over all the values and setting them\nfrom the default.") (defconst class-options 25 "Storage location of tagged class options.\nStored outright without modifications or stripping.") (defconst class-num-slots 26 "Number of slots in the class definition object.") (defconst object-class 1 "Index in an object vector where the class is stored.") (defconst object-name 2 "Index in an object where the name is stored.") (defconst method-static 0 "Index into :static tag on a method.") (defconst method-before 1 "Index into :before tag on a method.") (defconst method-primary 2 "Index into :primary tag on a method.") (defconst method-after 3 "Index into :after tag on a method.") (defconst method-num-lists 4 "Number of indexes into methods vector in which groups of functions are kept.") (defconst method-generic-before 4 "Index into generic :before tag on a method.") (defconst method-generic-primary 5 "Index into generic :primary tag on a method.") (defconst method-generic-after 6 "Index into generic :after tag on a method.") (defconst method-num-slots 7 "Number of indexes into a method's vector.") (defsubst eieio-specialized-key-to-generic-key (key) "Convert a specialized KEY into a generic method key." (cond ((eq key method-static) 0) ((< key method-num-lists) (+ key 3)) (t key))) (autoload (quote byte-compile-file-form-defmethod) "eieio-comp" "This function is used to byte compile methods in a nice way.") ...)
  eval-buffer(#<buffer  *load*> nil "/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/eieio.el" nil t)  ; Reading at buffer position 112490
  load-with-code-conversion("/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/eieio.el" "/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/eieio.el" nil t)
  require(eieio)
  apply(require eieio)
  byte-compile-file-form-require((require (quote eieio)))
  byte-compile-file-form((require (quote eieio)))
  #[nil "r\bq\210	\203\r\0\306	\n\"\210eb\210\307\x13\310\307w\210\311\312!\203\"\0\313y\210\202\x12\0m\204D\0`\211\x14\x15\307\x1e\x13\314\b!\x1e\x14\x0e\x13\203;\0\315\316!\210\317\x0e\x14!\210*\202\x12\0\320 \210d\x15\321 \210)	\205Y\0r\nq\210\322	!)\207" [bytecomp-inbuffer bytecomp-filename bytecomp-outbuffer byte-compile-unresolved-functions byte-compile-read-position byte-compile-last-position byte-compile-insert-header nil " 	\n\f" looking-at ";" 1 read byte-compile-warn "!! The file uses old-style backquotes !!\nThis functionality has been obsolete for more than 10 years already\nand will be removed soon.  See (elisp)Backquote in the manual." byte-compile-file-form byte-compile-flush-pending byte-compile-warn-about-unresolved-functions byte-compile-fix-header old-style-backquotes form] 4]()
  byte-compile-from-buffer(#<buffer  *Compiler Input*> "/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el")
  byte-compile-file("/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el")
  batch-byte-compile-file("/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el")
  batch-byte-compile()
  command-line-1(("--eval" "(setq max-lisp-eval-depth 1000)" "-f" "batch-byte-compile" "/space/tromey/EmacsBzr/Git/emacs/lisp/emacs-lisp/chart.el"))
  command-line()
  normal-top-level()



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

* Re: lexbind
  2011-02-20 18:39 ` lexbind Tom Tromey
@ 2011-02-21 22:01   ` Stefan Monnier
  0 siblings, 0 replies; 34+ messages in thread
From: Stefan Monnier @ 2011-02-21 22:01 UTC (permalink / raw)
  To: Tom Tromey; +Cc: emacs-devel

> I checked it out and did a make bootstrap.
> It failed as appended.

If it got to compiling eieio, then it didn't really fail ;-)
Try "make -k", and you should see that only a handful of Elisp files trigger
the above problem.
In any case I believe I've fixed the above bug earlier today.
OTOH I'm not actually sure that my fix is correct (it makes the
compilation succeed but the resulting code might not be correct).


        Stefan



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

* Re: Lexbind
  2011-03-17  1:59                   ` Juanma Barranquero
@ 2011-03-17 20:01                     ` Stefan Monnier
  2011-03-17 22:07                       ` Lexbind Wojciech Meyer
  2011-03-17 23:29                       ` Lexbind Juanma Barranquero
  0 siblings, 2 replies; 34+ messages in thread
From: Stefan Monnier @ 2011-03-17 20:01 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

> I just had one while running under GDB, so I Ctrl-C and I got the
> attached backtrace.

Hmm... the lexbind branch does not touch the redisplay code at all, so
this is perplexing.  My best guess so far is that some part of the
changed C code corrupts some part of the memory, leading to the inf-loop.


        Stefan



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

* Re: Lexbind
  2011-03-17 20:01                     ` Lexbind Stefan Monnier
@ 2011-03-17 22:07                       ` Wojciech Meyer
  2011-03-17 23:29                       ` Lexbind Juanma Barranquero
  1 sibling, 0 replies; 34+ messages in thread
From: Wojciech Meyer @ 2011-03-17 22:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> I just had one while running under GDB, so I Ctrl-C and I got the
>> attached backtrace.
>
> Hmm... the lexbind branch does not touch the redisplay code at all, so
> this is perplexing.  My best guess so far is that some part of the
> changed C code corrupts some part of the memory, leading to the inf-loop.
>
>
>         Stefan

I noticed some hang ups few days ago with a fresh update. Not only on
`lexbind' branch but on `trunk' as well. I didn't try to debug it. Now I
rebuilt it, with complete cleanup of repository, and it *seems* to be
better. The hangup was happening usually after M-x and then Emacs was
not responsive and taking significant CPU time. `pkill emacs' had seemed to
interrupt the hang, but later it was happening again and `pkill emacs'
was killing Emacs completely. I don't know if it is relevant to the
discussion. I do have similar configuration that Juanma cited.

Wojciech



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

* Re: Lexbind
  2011-03-17 20:01                     ` Lexbind Stefan Monnier
  2011-03-17 22:07                       ` Lexbind Wojciech Meyer
@ 2011-03-17 23:29                       ` Juanma Barranquero
  2011-03-18  7:39                         ` Lexbind joakim
  1 sibling, 1 reply; 34+ messages in thread
From: Juanma Barranquero @ 2011-03-17 23:29 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Thu, Mar 17, 2011 at 21:01, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> Hmm... the lexbind branch does not touch the redisplay code at all, so
> this is perplexing.

Perhaps it is just bad luck that I didn't get lockups running the
trunk, but I don't think so. It's happened at least five or six times
with lexbind-new, and I don't remember the last time I had trouble
with the trunk.

> My best guess so far is that some part of the
> changed C code corrupts some part of the memory, leading to the inf-loop.

So it's going to be difficult to catch :-(

    Juanma



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

* Re: Lexbind
  2011-03-17 23:29                       ` Lexbind Juanma Barranquero
@ 2011-03-18  7:39                         ` joakim
  0 siblings, 0 replies; 34+ messages in thread
From: joakim @ 2011-03-18  7:39 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Stefan Monnier, emacs-devel

Juanma Barranquero <lekktu@gmail.com> writes:

> On Thu, Mar 17, 2011 at 21:01, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>> Hmm... the lexbind branch does not touch the redisplay code at all, so
>> this is perplexing.
>
> Perhaps it is just bad luck that I didn't get lockups running the
> trunk, but I don't think so. It's happened at least five or six times
> with lexbind-new, and I don't remember the last time I had trouble
> with the trunk.
>
>> My best guess so far is that some part of the
>> changed C code corrupts some part of the memory, leading to the inf-loop.
>
> So it's going to be difficult to catch :-(

What's the state of running Emacs under Valgrind these days? I have a
vague memory that it might be possible with an undumped Emacs.

>     Juanma
>

-- 
Joakim Verona



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

end of thread, other threads:[~2011-03-18  7:39 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-02 17:25 lexbind Richard Stallman
2008-03-02 19:27 ` lexbind Stefan Monnier
2008-03-03 18:26   ` lexbind Richard Stallman
2008-03-03 21:43     ` lexbind Stefan Monnier
2008-03-03 22:07       ` lexbind David Kastrup
2008-03-03 22:43         ` lexbind Stefan Monnier
2008-03-03 23:09           ` lexbind David Kastrup
2008-03-03 23:31             ` lexbind Miles Bader
2008-03-03 22:18       ` lexbind paul r
2008-03-03 22:45         ` lexbind Stefan Monnier
2008-03-04 10:12           ` lexbind paul r
2008-03-04 15:36             ` lexbind Miles Bader
2008-03-04 16:29               ` lexbind paul r
2008-03-04 23:04                 ` lexbind Stephen J. Turnbull
2008-03-05  2:38                   ` lexbind Miles Bader
2008-03-05  5:08                     ` lexbind Dan Nicolaescu
2008-03-05  5:58                     ` lexbind Stephen J. Turnbull
2008-03-14 17:03                       ` lexbind paul r
2008-03-14 19:00                         ` lexbind Stefan Monnier
2008-03-14 22:10                         ` lexbind Stephen J. Turnbull
2008-03-03 22:49         ` lexbind David De La Harpe Golden
2008-03-04 23:03       ` lexbind Richard Stallman
2008-03-04 23:18         ` lexbind Miles Bader
2008-03-05 21:33           ` lexbind Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17 22:10 lexbind Stefan Monnier
2011-02-18  3:54 ` lexbind Daniel Colascione
2011-02-18  3:57   ` lexbind Daniel Colascione
2011-02-18  4:48     ` lexbind Stefan Monnier
2011-02-20 18:39 ` lexbind Tom Tromey
2011-02-21 22:01   ` lexbind Stefan Monnier
2011-03-10  5:34 Emacs 23.3 released Chong Yidong
2011-03-10 16:07 ` Stefan Monnier
2011-03-10 19:21   ` Thierry Volpiatto
2011-03-11  4:20     ` Stefan Monnier
2011-03-11  7:14       ` Thierry Volpiatto
2011-03-12  3:35         ` Stefan Monnier
2011-03-12 12:23           ` Juanma Barranquero
2011-03-14 14:10             ` Stefan Monnier
2011-03-14 14:52               ` Juanma Barranquero
2011-03-14 15:51                 ` Lexbind (was: Emacs 23.3 released) Stefan Monnier
2011-03-17  1:59                   ` Juanma Barranquero
2011-03-17 20:01                     ` Lexbind Stefan Monnier
2011-03-17 22:07                       ` Lexbind Wojciech Meyer
2011-03-17 23:29                       ` Lexbind Juanma Barranquero
2011-03-18  7:39                         ` Lexbind joakim

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