Hi Eric,

Eric Fraga <e.fr...@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,

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."
-- 
 Bastien

Reply via email to