emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgstuct++ does not lurk silently in the shadow
@ 2012-03-08  7:08 Christopher Schmidt
  2012-03-08 13:38 ` orgstruct++ does not lurk silently in the shadow (was: orgstuct++ does not lurk silently in the shadow) Christopher Schmidt
  2012-04-25  7:44 ` orgstuct++ does not lurk silently in the shadow Eric Fraga
  0 siblings, 2 replies; 30+ messages in thread
From: Christopher Schmidt @ 2012-03-08  7:08 UTC (permalink / raw)
  To: emacs-orgmode

Hi gurus,

I have a problem with Org-mode version 7.8.03
(release_7.8.03.351.g47eb3) on GNU Emacs 24.0.94.1
(x86_64-unknown-linux-gnu, GTK+ Version 2.24.9) of 2012-03-08.

(info "(org)Orgstruct mode") says that one is allowed to use orgtbl-mode
in message-mode.  Unfortunately this does not work as expected.

Recipe:

emacs -q
C-x m
M-q # fill-paragraph ignores the message header
eval: (add-hook 'message-mode-hook 'turn-on-orgstruct++)
C-x m
M-q # fill-paragraph does ignore the message header

The bug is caused by fill-paragraph-function not being set back to
message-fill-paragraph when orgstruct-hijacker-command-22 falls back to
fill-paragraph.

        Christopher

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

* orgstruct++ does not lurk silently in the shadow (was: orgstuct++ does not lurk silently in the shadow)
  2012-03-08  7:08 orgstuct++ does not lurk silently in the shadow Christopher Schmidt
@ 2012-03-08 13:38 ` Christopher Schmidt
  2012-04-25  7:44 ` orgstuct++ does not lurk silently in the shadow Eric Fraga
  1 sibling, 0 replies; 30+ messages in thread
From: Christopher Schmidt @ 2012-03-08 13:38 UTC (permalink / raw)
  To: emacs-orgmode

Christopher Schmidt <christopher@ch.ristopher.com> writes:

[...]
> (info "(org)Orgstruct mode") says that one is allowed to use
> orgtbl-mode in message-mode.  Unfortunately this does not work as
> expected.

Typo - I meant orgstruct-mode of course.

        Christopher

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-03-08  7:08 orgstuct++ does not lurk silently in the shadow Christopher Schmidt
  2012-03-08 13:38 ` orgstruct++ does not lurk silently in the shadow (was: orgstuct++ does not lurk silently in the shadow) Christopher Schmidt
@ 2012-04-25  7:44 ` Eric Fraga
  2012-04-26 10:42   ` Bastien
  1 sibling, 1 reply; 30+ messages in thread
From: Eric Fraga @ 2012-04-25  7:44 UTC (permalink / raw)
  To: emacs-orgmode

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> Hi gurus,
>
> I have a problem with Org-mode version 7.8.03
> (release_7.8.03.351.g47eb3) on GNU Emacs 24.0.94.1
> (x86_64-unknown-linux-gnu, GTK+ Version 2.24.9) of 2012-03-08.
>
> (info "(org)Orgstruct mode") says that one is allowed to use orgtbl-mode
> in message-mode.  Unfortunately this does not work as expected.
>
> Recipe:
>
> emacs -q
> C-x m
> M-q # fill-paragraph ignores the message header
> eval: (add-hook 'message-mode-hook 'turn-on-orgstruct++)
> C-x m
> M-q # fill-paragraph does ignore the message header
>
> The bug is caused by fill-paragraph-function not being set back to
> message-fill-paragraph when orgstruct-hijacker-command-22 falls back to
> fill-paragraph.
>
>         Christopher

Thanks for this.  This behaviour has annoyed me for years now.  I've
never gotten around to figuring out why I got this behaviour because I
get caught up with writing the email and forget by the time I finish...

I hope somebody can indeed fix this as it sounds quite straightforward
(for better elisp programmers than I...).

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org-mode version 7.8.06 (release_7.8.06.181.g67694.dirty)

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-25  7:44 ` orgstuct++ does not lurk silently in the shadow Eric Fraga
@ 2012-04-26 10:42   ` Bastien
  2012-04-29  6:40     ` Eric Fraga
  2012-04-29 11:05     ` Christopher Schmidt
  0 siblings, 2 replies; 30+ messages in thread
From: Bastien @ 2012-04-26 10:42 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

Eric Fraga <e.fraga@ucl.ac.uk> writes:

> Thanks for this.  This behaviour has annoyed me for years now.  

Me too...

> I've
> never gotten around to figuring out why I got this behaviour because I
> get caught up with writing the email and forget by the time I finish...
>
> I hope somebody can indeed fix this as it sounds quite straightforward
> (for better elisp programmers than I...).

This should be fixed now in master.

Can you confirm?

There is one remaining use-case I didn't fix: the case where you use M-q
on the first line of the message (things are messed up then.)  I don't
know how to fix this, but this is a rather border-line case, as simply
typing and using auto-fill does the right thing.

Thanks for insisting on this!

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-26 10:42   ` Bastien
@ 2012-04-29  6:40     ` Eric Fraga
  2012-04-29  6:48       ` Eric Fraga
  2012-04-29  8:38       ` Bastien
  2012-04-29 11:05     ` Christopher Schmidt
  1 sibling, 2 replies; 30+ messages in thread
From: Eric Fraga @ 2012-04-29  6:40 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric Fraga <e.fraga@ucl.ac.uk> writes:
>
>> Thanks for this.  This behaviour has annoyed me for years now.  
>
> Me too...
>
>> I've
>> never gotten around to figuring out why I got this behaviour because I
>> get caught up with writing the email and forget by the time I finish...
>>
>> I hope somebody can indeed fix this as it sounds quite straightforward
>> (for better elisp programmers than I...).
>
> This should be fixed now in master.
>
> Can you confirm?
>
> There is one remaining use-case I didn't fix: the case where you use M-q
> on the first line of the message (things are messed up then.)  I don't
> know how to fix this, but this is a rather border-line case, as simply
> typing and using auto-fill does the right thing.
>
> Thanks for insisting on this!

Bastian,

Filling seems to work much better now but I don't know whether any of
this is org or gnus.  However, I am not sure what is happening
here.  With the following line in my configuration:

(add-hook 'message-setup-hook 'turn-on-orgstruct++)

all my emails end up indented strangely.  Specifically, if this email
had been composed with that hook entry, all my lines would have been
indented 2 spaces.  See my previous message to this list if you can find
such easily...

I commented out that line in my configuration and restarted Emacs to
compose this reply.  No indenting is happening (which is a good thing).

Very strange.  I do not understand why turning on orgstuct++ would cause
a default indentation of all text.

I am happy to explore this further if you give me some hint as to what
to try.

I am using gnus and org up to date as of yesterday (Australia time).  I
haven't updated today yet.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-29  6:40     ` Eric Fraga
@ 2012-04-29  6:48       ` Eric Fraga
  2012-04-29  8:38       ` Bastien
  1 sibling, 0 replies; 30+ messages in thread
From: Eric Fraga @ 2012-04-29  6:48 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


Eric Fraga <e.fraga@ucl.ac.uk> writes:


[...]

> Bastian,
>
> Filling seems to work much better now but I don't know whether any of
> this is org or gnus.  

Actually, I just noticed from my modeline that OrgTbl is
active.  However, I have searched everything in my configuration and
cannot see where I turn this on!  I am perturbed :(

The point being that orgstruct++-mode does cause problems with
indentation and filling in email messages but without it, but with
OrgTbl maybe, filling is working very nicely now.

Thanks again,
eric


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-29  6:40     ` Eric Fraga
  2012-04-29  6:48       ` Eric Fraga
@ 2012-04-29  8:38       ` Bastien
  1 sibling, 0 replies; 30+ messages in thread
From: Bastien @ 2012-04-29  8:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

Eric Fraga <e.fraga@ucl.ac.uk> writes:

> (add-hook 'message-setup-hook 'turn-on-orgstruct++)

Try this instead, as advertized in the manual:

(add-hook 'message-mode-hook 'turn-on-orgstruct++)
                   ^^^^

HTH,

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-26 10:42   ` Bastien
  2012-04-29  6:40     ` Eric Fraga
@ 2012-04-29 11:05     ` Christopher Schmidt
  2012-04-29 12:27       ` Christopher Schmidt
  2012-05-01 17:43       ` Bastien
  1 sibling, 2 replies; 30+ messages in thread
From: Christopher Schmidt @ 2012-04-29 11:05 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> This should be fixed now in master.

Thank you so much for fixing this.

There is still one major issue, though.  Consider this text:

,--------
| >> rms
| >> foo
| >>
| >> org-mode
`--------

Place the point somewhere in the first or second line and do a M-q.
Vanilla message-mode correctly recognises the paragraph prefix whereas
an use of Org's enhancements breaks this.

Other than that, disabling orgstruct++-mode after enabling it breaks
everything.  I get tons of "Lisp nesting exceeds `max-lisp-eval-depth'",
even when doing simple things like moving around the buffer or trying to
execute and extended command.

For the record, I use Gnus and Org master (b5f4b52).  This is how my
integration is set up:

#+begin_src emacs-lisp
(add-hook 'gnus-message-setup-hook
      (lambda ()
        (turn-on-orgtbl)
        (turn-on-orgstruct++)
        (set (make-local-variable 'org-footnote-auto-label) 'plain)
        (set
         (make-local-variable 'org-footnote-tag-for-non-org-mode-files)
         nil)))

(define-key message-mode-map (kbd "C-c f")
  (lambda ()
    (interactive)
    (save-restriction
      (my-message-narrow-to-body)
      (org-footnote-action))))

(add-hook 'message-send-hook
      (lambda ()
        (save-restriction
          (my-message-narrow-to-body)
          (org-footnote-normalize))))
#+end-src

        Christopher

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-29 11:05     ` Christopher Schmidt
@ 2012-04-29 12:27       ` Christopher Schmidt
  2012-05-01 17:43       ` Bastien
  1 sibling, 0 replies; 30+ messages in thread
From: Christopher Schmidt @ 2012-04-29 12:27 UTC (permalink / raw)
  To: emacs-orgmode

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> There is still one major issue, though.  Consider this text:
>
> ,--------
> | >> rms
> | >> foo
> | >>
> | >> org-mode
> `--------
>
> Place the point somewhere in the first or second line and do a M-q.
> Vanilla message-mode correctly recognises the paragraph prefix whereas
> an use of Org's enhancements breaks this.

It all boils down to orgstruct++-mode setting non-org-vars like
paragraph-start or paragraph-separate to the org values.  This is fine,
even the doc string says so.

,----[ C-h f orgstruct++-mode RET ]
| Toggle `orgstruct-mode', the enhanced version of it.
| In addition to setting orgstruct-mode, this also exports all indentation
| and autofilling variables from org-mode into the buffer.  It will also
| recognize item context in multiline items.
`----

This does not work with message-mode and any other mode that imposes a
special document structure, though.  I think the docstring and the
manual should note that explicitly, and the line promoting the use of
turn-on-orgstruct++ in message-mode-hook in (info "(org)Orgstruct mode")
should be removed.

        Christopher

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-04-29 11:05     ` Christopher Schmidt
  2012-04-29 12:27       ` Christopher Schmidt
@ 2012-05-01 17:43       ` Bastien
  2012-05-03  9:56         ` Eric Fraga
  1 sibling, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-01 17:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi Christopher,

I've now fixed orgstuct++-mode so that you can turn it on and off
safely.  Some Org filling functions fall back on the major-mode 
filling functions through a new defmacro.

Please test and report any problem.

Thanks!

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-01 17:43       ` Bastien
@ 2012-05-03  9:56         ` Eric Fraga
  2012-05-03 12:28           ` Bastien
  0 siblings, 1 reply; 30+ messages in thread
From: Eric Fraga @ 2012-05-03  9:56 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Hi Christopher,
>
> I've now fixed orgstuct++-mode so that you can turn it on and off
> safely.  Some Org filling functions fall back on the major-mode
> filling functions through a new defmacro.
>
> Please test and report any problem.
>
> Thanks!

Ummm, doesn't work well for me at all.  If I try to fill your main
paragraph above, the whole quoted text is filled into one
mess.  Without orgstuct++-mode, it works.

Further, with orgstuct++-mode, trying to add a new line (i.e. my
response), I get the following error message:

,----
| org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 times]
`----

with the following backtrace:

,----
| Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
|   org-indent-line-function()
|   org-indent-line-function()
|   org-indent-line-function()
|   ... repeated ad infinitum ...
`----

thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-482-gf47915

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03  9:56         ` Eric Fraga
@ 2012-05-03 12:28           ` Bastien
  2012-05-03 12:58             ` Nicolas Goaziou
  0 siblings, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-03 12:28 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

Eric Fraga <e.fraga@ucl.ac.uk> writes:

> Ummm, doesn't work well for me at all.  If I try to fill your main
> paragraph above, the whole quoted text is filled into one
> mess.  Without orgstuct++-mode, it works.
>
> Further, with orgstuct++-mode, trying to add a new line (i.e. my
> response), I get the following error message:
>
> ,----
> | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 times]
> `----
>
> with the following backtrace:
>
> ,----
> | Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
> |   org-indent-line-function()
> |   org-indent-line-function()
> |   org-indent-line-function()
> |   ... repeated ad infinitum ...
> `----

Mh.. do you confirm this is from latest git?  More precisely,
please make sure you have this commit in your git log:

  http://orgmode.org/w/?p=org-mode.git;a=commit;h=a8c312

I don't see how the Emacs version could interfere here, but
please give it too -- along with the way you call orgstuct++-mode
for messages.  I do this:

(add-hook 'message-mode-hook 'turn-on-orgstruct++)

It works fine here.

Best,

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03 12:28           ` Bastien
@ 2012-05-03 12:58             ` Nicolas Goaziou
  2012-05-03 13:12               ` Bastien
  2012-05-05 13:46               ` Bastien
  0 siblings, 2 replies; 30+ messages in thread
From: Nicolas Goaziou @ 2012-05-03 12:58 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hello,

>  Eric Fraga <e.fraga@ucl.ac.uk> writes:

>> Further, with orgstuct++-mode, trying to add a new line (i.e. my
>> response), I get the following error message:
>>
>> ,----
>> | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 times]
>> `----

I confirm the problem with latest Org (Org-mode version 7.8.09
(release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.

I also use orgstruct++-mode.


Regards,

-- 
Nicolas Goaziou

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03 12:58             ` Nicolas Goaziou
@ 2012-05-03 13:12               ` Bastien
  2012-05-03 13:17                 ` Nicolas Goaziou
  2012-05-05 13:46               ` Bastien
  1 sibling, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-03 13:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> I confirm the problem with latest Org (Org-mode version 7.8.09
> (release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.
>
> I also use orgstruct++-mode.

I can reproduce the problem with 

  (add-hook 'message-setup-hook 'turn-on-orgstruct++)

I cannot reproduce it with

  (add-hook 'message-mode-hook 'turn-on-orgstruct++)

Can you confirm this is the same for you?

(The manual advertizes using `message-mode-hook'.)

Thanks,

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03 13:12               ` Bastien
@ 2012-05-03 13:17                 ` Nicolas Goaziou
  2012-05-03 13:45                   ` Bastien
  0 siblings, 1 reply; 30+ messages in thread
From: Nicolas Goaziou @ 2012-05-03 13:17 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hello,

Bastien <bzg@altern.org> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
> I can reproduce the problem with 
>
>   (add-hook 'message-setup-hook 'turn-on-orgstruct++)
>
> I cannot reproduce it with
>
>   (add-hook 'message-mode-hook 'turn-on-orgstruct++)
>
> Can you confirm this is the same for you?

No, it happens with `message-mode-hook'. Here is the relevant part of my
configuration:

#+begin_src elisp
(defun ngz-message-mode-hook-handler ()
  (turn-on-flyspell)
  (turn-on-orgtbl)
  (turn-on-orgstruct++)
  (set (make-local-variable 'org-footnote-tag-for-non-org-mode-files) nil)
  (local-set-key (kbd "C-c C-x f") 'org-footnote-action))

(add-hook 'message-mode-hook 'ngz-message-mode-hook-handler)
#+end_src


Regards,

-- 
Nicolas Goaziou

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03 13:17                 ` Nicolas Goaziou
@ 2012-05-03 13:45                   ` Bastien
  2012-05-03 15:53                     ` Nicolas Goaziou
  0 siblings, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-03 13:45 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> No, it happens with `message-mode-hook'. Here is the relevant part of my
> configuration:

I can't reproduce this with a bare emacs-24.0.94 -Q (this is the oldest
Emacs I can test with.)

Can you detail the steps to reproduce?  

Sorry this is boring, but I don't want to let such a serious but in the
wild. 

Thanks!

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03 13:45                   ` Bastien
@ 2012-05-03 15:53                     ` Nicolas Goaziou
  0 siblings, 0 replies; 30+ messages in thread
From: Nicolas Goaziou @ 2012-05-03 15:53 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@altern.org> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> No, it happens with `message-mode-hook'. Here is the relevant part of my
>> configuration:
>
> I can't reproduce this with a bare emacs-24.0.94 -Q (this is the oldest
> Emacs I can test with.)
>
> Can you detail the steps to reproduce?  

I cannot reproduce it with -Q (though indentation is strange at the
beginning).

I'm not sure where it comes from, though. It looks like an eisenbug to
me. Debugging `org-indent-line-function' didn't help.


Regards,

-- 
Nicolas Goaziou

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-03 12:58             ` Nicolas Goaziou
  2012-05-03 13:12               ` Bastien
@ 2012-05-05 13:46               ` Bastien
  2012-05-05 15:51                 ` Nicolas Goaziou
  1 sibling, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-05 13:46 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>>> Further, with orgstuct++-mode, trying to add a new line (i.e. my
>>> response), I get the following error message:
>>>
>>> ,----
>>> | org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth' [3 times]
>>> `----
>
> I confirm the problem with latest Org (Org-mode version 7.8.09
> (release_7.8.09-483-g01d83d)) and GNU Emacs 24.0.95.1.

I pushed a fix -- can you test and confirm?

Thanks,

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-05 13:46               ` Bastien
@ 2012-05-05 15:51                 ` Nicolas Goaziou
  2012-05-05 16:18                   ` Bastien
  2012-05-05 16:22                   ` Bastien
  0 siblings, 2 replies; 30+ messages in thread
From: Nicolas Goaziou @ 2012-05-05 15:51 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hello,

Bastien <bzg@gnu.org> writes:

> I pushed a fix -- can you test and confirm?

I get the following error every time I try to indent:

  "org-between-regexps-p: Variable binding depth exceeds max-specpdl-size"


Regards,

-- 
Nicolas Goaziou

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-05 15:51                 ` Nicolas Goaziou
@ 2012-05-05 16:18                   ` Bastien
  2012-05-05 16:19                     ` Nicolas Goaziou
  2012-05-05 16:22                   ` Bastien
  1 sibling, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-05 16:18 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> I pushed a fix -- can you test and confirm?
>
> I get the following error every time I try to indent:

In org-mode or in message-mode?

>   "org-between-regexps-p: Variable binding depth exceeds
>   max-specpdl-size"

Does (setq max-specpdl-size 10000) help in any way?

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-05 16:18                   ` Bastien
@ 2012-05-05 16:19                     ` Nicolas Goaziou
  0 siblings, 0 replies; 30+ messages in thread
From: Nicolas Goaziou @ 2012-05-05 16:19 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> I get the following error every time I try to indent:
>
> In org-mode or in message-mode?

I meant in Message mode.

>>   "org-between-regexps-p: Variable binding depth exceeds
>>   max-specpdl-size"
>
> Does (setq max-specpdl-size 10000) help in any way?

Not at all.

After increasing `max-specpdl-size', I have to increase
`max-lisp-eval-depth' and it still fails. I just have to wait longer.


Regards,

-- 
Nicolas Goaziou

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-05 15:51                 ` Nicolas Goaziou
  2012-05-05 16:18                   ` Bastien
@ 2012-05-05 16:22                   ` Bastien
  2012-05-05 16:30                     ` Nicolas Goaziou
  1 sibling, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-05 16:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Bastien <bzg@gnu.org> writes:
>
>> I pushed a fix -- can you test and confirm?
>
> I get the following error every time I try to indent:
>
>   "org-between-regexps-p: Variable binding depth exceeds
>   max-specpdl-size"

If you are in message-mode, please also provide the value of
`org-fb-vars' and try to debug `org-indent-line-function' to make sure
it stops at the first call of `org-between-regexps-p' (not at the ones
that may be called inside the `orgstruct++-with-major-mode-filling'
macro...)

Thanks!

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-05 16:22                   ` Bastien
@ 2012-05-05 16:30                     ` Nicolas Goaziou
  2012-05-06  8:07                       ` Bastien
  0 siblings, 1 reply; 30+ messages in thread
From: Nicolas Goaziou @ 2012-05-05 16:30 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@gnu.org> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Bastien <bzg@gnu.org> writes:
>>
>>> I pushed a fix -- can you test and confirm?
>>
>> I get the following error every time I try to indent:
>>
>>   "org-between-regexps-p: Variable binding depth exceeds
>>   max-specpdl-size"
>

> If you are in message-mode, please also provide the value of
> `org-fb-vars'

((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([ 	]*[_.[:word:]]+>+\|[ 	]*[]>|]\)+\)[ 	]*\|[ 	]*\([-–!|#%;>*·•‣⁃◦]+[ 	]*\)*)) (fill-paragraph-function (quote message-fill-paragraph)) (paragraph-separate (quote --text follows this line--$\|[ 	]*$\|-- $\|---+$\|^\f$\|.*wrote:$\|\(\([ 	]*[_.[:word:]]+>+\|[ 	]*[]>|]\)+\)[ 	]*$\|<#!*/?\(multipart\|part\|external\|mml\|secure\))) (auto-fill-inhibit-regexp (quote [ 	]*\(|\|#\+\(tblfm\|orgtbl\|tblname\):\))) (paragraph-start (quote --text follows this line--$\|[ 	]*$\|-- $\|---+$\|^\f$\|.*wrote:$\|\(\([ 	]*[_.[:word:]]+>+\|[ 	]*[]>|]\)+\)[ 	]*$\|<#!*/?\(multipart\|part\|external\|mml\|secure\))) (indent-line-function (quote indent-relative)) (auto-fill-function (quote message-do-auto-fill)))

> and try to debug `org-indent-line-function' to make sure
> it stops at the first call of `org-between-regexps-p' (not at the ones
> that may be called inside the `orgstruct++-with-major-mode-filling'
> macro...)

It's the same as the previous bug: when I try to debug
`org-indent-line-function', the problem disappears.


Regards,

-- 
Nicolas Goaziou

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-05 16:30                     ` Nicolas Goaziou
@ 2012-05-06  8:07                       ` Bastien
  2012-05-06 14:09                         ` Eric Fraga
  0 siblings, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-06  8:07 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> ((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([

[...]

This looks good.

> It's the same as the previous bug: when I try to debug
> `org-indent-line-function', the problem disappears.

I pushed another fix: I now rely on the existing org-let
function, which safely evaluate let constructs.

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-06  8:07                       ` Bastien
@ 2012-05-06 14:09                         ` Eric Fraga
  2012-05-06 14:27                           ` Thorsten Jolitz
  2012-05-06 15:47                           ` Bastien
  0 siblings, 2 replies; 30+ messages in thread
From: Eric Fraga @ 2012-05-06 14:09 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Nicolas Goaziou

Bastien <bzg@gnu.org> writes:

> Hi Nicolas,
>
> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> ((adaptive-fill-function (quote nil)) (adaptive-fill-regexp (quote \(\([
>
> [...]
>
> This looks good.
>
>> It's the same as the previous bug: when I try to debug
>> `org-indent-line-function', the problem disappears.
>
> I pushed another fix: I now rely on the existing org-let
> function, which safely evaluate let constructs.

Bastien,

unfortunately, I still have problems.  I am using org completely up to
date (a few minutes ago).  I do not turn orgstruct++-mode on
automatically at all any more but instead turn it on manually by

  M-x orgstruct++-mode RET

once I'm in a Message buffer.

I tried it just now, replying to your email as my test.  Turned on the
mode, tried to fill the quoted text and it all got mixed up.  Undid
that.  Then went to the bottom and tried to insert a new line and got:

  org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth'

Turned off orgstruct++-mode (by M-x ... RET again) and filling of quoted
text works fine as does normal writing.

I will try (tomorrow) to isolate this with emacs -Q but my problem is
that my gnus configuration is really really messy and difficult to
isolate.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-489-g541288

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-06 14:09                         ` Eric Fraga
@ 2012-05-06 14:27                           ` Thorsten Jolitz
  2012-05-06 15:47                           ` Bastien
  1 sibling, 0 replies; 30+ messages in thread
From: Thorsten Jolitz @ 2012-05-06 14:27 UTC (permalink / raw)
  To: emacs-orgmode


Eric Fraga <e.fraga@ucl.ac.uk> writes:

> unfortunately, I still have problems.  I am using org completely up to
> date (a few minutes ago). 

me too, I just posted on the gnus.user list ... 
-- 
cheers,
Thorsten

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-06 14:09                         ` Eric Fraga
  2012-05-06 14:27                           ` Thorsten Jolitz
@ 2012-05-06 15:47                           ` Bastien
  2012-05-07  4:23                             ` Eric S Fraga
  1 sibling, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-06 15:47 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

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

Hi Eric,

Eric Fraga <e.fraga@ucl.ac.uk> writes:

> unfortunately, I still have problems.  I am using org completely up to
> date (a few minutes ago).  I do not turn orgstruct++-mode on
> automatically at all any more but instead turn it on manually by
>
>   M-x orgstruct++-mode RET
>
> once I'm in a Message buffer.
>
> I tried it just now, replying to your email as my test.  Turned on the
> mode, tried to fill the quoted text and it all got mixed up.  

You are using the exact same version of Gnus and Emacs than I do.
Unless you forgot to reload the correct (uncompiled?) version of
Org -- I barely dare suggesting this :) -- then this comes from 
something in your configuration.

But no matter where it comes from, we should fix it!

> Undid that.  Then went to the bottom and tried to insert a new line
> and got:
>
>   org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth'

If you're certain you're loading Org correctly, please try the attached
patch and just tell me if the error disappears.

One possibility I can think of is that perhaps you turn on both
orgstruct-mode and orgstruct++-mode. In that case when orgstruct++-mode
will save the fill*/indent* variables from the _previous_ mode, it will
suppose they are the ones from message-mode, which will not be true and
will perhaps cause a loop.  The attached patch prevents such a loop.

> Turned off orgstruct++-mode (by M-x ... RET again) and filling of quoted
> text works fine as does normal writing.

This is already a progress against orgstruct++-mode as it worked before
... somewhat recomforting.

> I will try (tomorrow) to isolate this with emacs -Q but my problem is
> that my gnus configuration is really really messy and difficult to
> isolate.

We just need this:

C-x C-f ~/.gnus.el
M-x occur RET message*hook

Also check in your Emacs customization file.

HTH,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix-org-indent-line-function.patch --]
[-- Type: text/x-patch, Size: 492 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index e7c42db..17a5bc2 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20534,7 +20534,8 @@ If point is in an inline task, mark that task instead."
     (org-move-to-column column)
     (when (and orgstruct-is-++ (eq pos (point)))
       (org-let org-fb-vars
-	'(indent-according-to-mode)))))
+	'(or (eq indent-line-function 'org-indent-line-function)
+	     (indent-according-to-mode))))))
 
 (defun org-indent-drawer ()
   "Indent the drawer at point."

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-06 15:47                           ` Bastien
@ 2012-05-07  4:23                             ` Eric S Fraga
  2012-05-08 12:31                               ` Bastien
  0 siblings, 1 reply; 30+ messages in thread
From: Eric S Fraga @ 2012-05-07  4:23 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Nicolas Goaziou

Bastien <bzg@gnu.org> writes:

> Hi Eric,

Hello Bastien!

[...]

> You are using the exact same version of Gnus and Emacs than I do.
> Unless you forgot to reload the correct (uncompiled?) version of
> Org -- I barely dare suggesting this :) -- then this comes from 
> something in your configuration.

Definitely using the latest org!  And don't worry about asking: I have
done sillier things in the past :-(

>> Undid that.  Then went to the bottom and tried to insert a new line
>> and got:
>>
>>   org-indent-line-function: Lisp nesting exceeds `max-lisp-eval-depth'
>
> If you're certain you're loading Org correctly, please try the attached
> patch and just tell me if the error disappears.

The patch works!

I have manually make orgstruct++-mode active: filling of paragraphs,
including quoted ones, seems to work and there is no longer any infinite
recursion.

[...]

> We just need this:
>
> C-x C-f ~/.gnus.el
> M-x occur RET message*hook

For completeness, I have no version of orgstruct++-mode or
orgstruct-mode automatically turned on by any hook!

Thanks again,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-529-g035ab3.dirty

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-07  4:23                             ` Eric S Fraga
@ 2012-05-08 12:31                               ` Bastien
  2012-05-08 23:54                                 ` Eric S Fraga
  0 siblings, 1 reply; 30+ messages in thread
From: Bastien @ 2012-05-08 12:31 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

>> If you're certain you're loading Org correctly, please try the attached
>> patch and just tell me if the error disappears.
>
> The patch works!

I'm still resisting applying this patch, because I don't understand why
the infinite recursion occurs.

Can you help me again by trying to give me a minimal setup where this
infinite recursion occurs with latest Org?

We're nearly there...  thanks a lot!

-- 
 Bastien

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

* Re: orgstuct++ does not lurk silently in the shadow
  2012-05-08 12:31                               ` Bastien
@ 2012-05-08 23:54                                 ` Eric S Fraga
  0 siblings, 0 replies; 30+ messages in thread
From: Eric S Fraga @ 2012-05-08 23:54 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, Nicolas Goaziou

Bastien <bzg@gnu.org> writes:

> Hi Eric,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>>> If you're certain you're loading Org correctly, please try the
>>> attached patch and just tell me if the error disappears.
>>
>> The patch works!
>
> I'm still resisting applying this patch, because I don't understand why
> the infinite recursion occurs.
>
> Can you help me again by trying to give me a minimal setup where this
> infinite recursion occurs with latest Org?
>
> We're nearly there...  thanks a lot!

Strange.  With orgstruct++-mode now enabled (manually, not through a
hook), without your patch and without most of my org customisations, I
cannot seem to get the infinite recursion happening.

This is with org from git as of a few minutes ago.  However, I cannot
guarantee that some bits of org as shipped with emacs 24.1.50.1 haven't
been loaded before I manually load the latest version.  The problem is
that I cannot get gnus to startup properly with "emacs -Q".  My gnus
configuration is just too confused... :(

Argghhhh.

In any case, given that it seems to work just fine without my
customisations, there is something in my normal configuration (and
Nicolas's, I guess) that would seem to be triggering the infinite
recursion.  I will start bisecting my org configuration to track this
down but this could take some time!

I would definitely suggest not applying that patch as it doesn't appear
necessary in normal circumstances.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-544-g505cc7

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

end of thread, other threads:[~2012-05-08 23:54 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08  7:08 orgstuct++ does not lurk silently in the shadow Christopher Schmidt
2012-03-08 13:38 ` orgstruct++ does not lurk silently in the shadow (was: orgstuct++ does not lurk silently in the shadow) Christopher Schmidt
2012-04-25  7:44 ` orgstuct++ does not lurk silently in the shadow Eric Fraga
2012-04-26 10:42   ` Bastien
2012-04-29  6:40     ` Eric Fraga
2012-04-29  6:48       ` Eric Fraga
2012-04-29  8:38       ` Bastien
2012-04-29 11:05     ` Christopher Schmidt
2012-04-29 12:27       ` Christopher Schmidt
2012-05-01 17:43       ` Bastien
2012-05-03  9:56         ` Eric Fraga
2012-05-03 12:28           ` Bastien
2012-05-03 12:58             ` Nicolas Goaziou
2012-05-03 13:12               ` Bastien
2012-05-03 13:17                 ` Nicolas Goaziou
2012-05-03 13:45                   ` Bastien
2012-05-03 15:53                     ` Nicolas Goaziou
2012-05-05 13:46               ` Bastien
2012-05-05 15:51                 ` Nicolas Goaziou
2012-05-05 16:18                   ` Bastien
2012-05-05 16:19                     ` Nicolas Goaziou
2012-05-05 16:22                   ` Bastien
2012-05-05 16:30                     ` Nicolas Goaziou
2012-05-06  8:07                       ` Bastien
2012-05-06 14:09                         ` Eric Fraga
2012-05-06 14:27                           ` Thorsten Jolitz
2012-05-06 15:47                           ` Bastien
2012-05-07  4:23                             ` Eric S Fraga
2012-05-08 12:31                               ` Bastien
2012-05-08 23:54                                 ` Eric S Fraga

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).