emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with org-indent-block
@ 2014-09-12  6:50 Fabrice Popineau
  2014-09-12  7:53 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Popineau @ 2014-09-12  6:50 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

Hi,

Recently, I started to get problems with org-indent-block returning errors
"Not at a block".
Unfortunately, this is happening while restarting emacs, and I have no idea
about how to debug it.
It would be nice if somehow this function could give the file and the point
in the file where the error is happening.
Any idea on how to achieve this?

To make it clearer, it seems that this user-error stops the loading of my
prelude based configuration. Nothing is loaded after reporting it, and
especially not my own Org configuration file.

Thanks for any hint,

Fabrice

[-- Attachment #2: Type: text/html, Size: 744 bytes --]

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

* Re: Problem with org-indent-block
  2014-09-12  6:50 Problem with org-indent-block Fabrice Popineau
@ 2014-09-12  7:53 ` Nicolas Goaziou
  2014-09-12 12:39   ` Fabrice Popineau
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2014-09-12  7:53 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

Hello,

Fabrice Popineau <fabrice.popineau@gmail.com> writes:

> Recently, I started to get problems with org-indent-block returning errors
> "Not at a block".
> Unfortunately, this is happening while restarting emacs, and I have no idea
> about how to debug it.

AFAICT, nothing in the code base calls `org-indent-block' automatically.
Out of curiosity, is there something in your setup doing this?

> It would be nice if somehow this function could give the file and the point
> in the file where the error is happening.
> Any idea on how to achieve this?

It is an interactive function, so the user is expected to know where he
called it. Anyway, you could modify function in "org.el" to use:

  (user-error "Not at a block in %s, line %s" (buffer-name) (org-current-line))

It will probably help understanding the issue.


Regards,

-- 
Nicolas Goaziou

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

* Re: Problem with org-indent-block
  2014-09-12  7:53 ` Nicolas Goaziou
@ 2014-09-12 12:39   ` Fabrice Popineau
  2014-09-12 18:59     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Popineau @ 2014-09-12 12:39 UTC (permalink / raw)
  To: Fabrice Popineau, emacs-orgmode@gnu.org

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

Thanks for your hint.
The problem was not in in org.el:org-indent-block but in
org.el:org-hide-block-toggle.
This function should toggle special-block blocks too, else it barfs on them.
In my setup, when an org file is restored by desktop.el, global visibility
is set, which triggers
calls to org-hide-block-all.

Fabrice

2014-09-12 9:53 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:

> Hello,
>
> Fabrice Popineau <fabrice.popineau@gmail.com> writes:
>
> > Recently, I started to get problems with org-indent-block returning
> errors
> > "Not at a block".
> > Unfortunately, this is happening while restarting emacs, and I have no
> idea
> > about how to debug it.
>
> AFAICT, nothing in the code base calls `org-indent-block' automatically.
> Out of curiosity, is there something in your setup doing this?
>
> > It would be nice if somehow this function could give the file and the
> point
> > in the file where the error is happening.
> > Any idea on how to achieve this?
>
> It is an interactive function, so the user is expected to know where he
> called it. Anyway, you could modify function in "org.el" to use:
>
>   (user-error "Not at a block in %s, line %s" (buffer-name)
> (org-current-line))
>
> It will probably help understanding the issue.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 1960 bytes --]

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

* Re: Problem with org-indent-block
  2014-09-12 12:39   ` Fabrice Popineau
@ 2014-09-12 18:59     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2014-09-12 18:59 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org

Fabrice Popineau <fabrice.popineau@gmail.com> writes:

> The problem was not in in org.el:org-indent-block but in
> org.el:org-hide-block-toggle.
> This function should toggle special-block blocks too, else it barfs on them.
> In my setup, when an org file is restored by desktop.el, global visibility
> is set, which triggers
> calls to org-hide-block-all.

This should be fixed. Thank you for the report.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2014-09-12 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12  6:50 Problem with org-indent-block Fabrice Popineau
2014-09-12  7:53 ` Nicolas Goaziou
2014-09-12 12:39   ` Fabrice Popineau
2014-09-12 18:59     ` Nicolas Goaziou

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