emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: C-c C-c does not handle dynamic blocks correctly [7.9.3d (release_7.9.3d-894-gfe805e)]
@ 2013-01-27 11:48 Stefan-W. Hahn
  2013-01-27 19:10 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan-W. Hahn @ 2013-01-27 11:48 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

if trying to update a dynamic clocktable with "C-c C-c", point on "#+BEGIN",
I get the error message:

"user-error: C-c C-c can do nothing useful at this location"

The clocktable looks like:

#+BEGIN: clocktable
#+END: clocktable

This is the definition describe in the manual. I tracked this down to

#+begin_src emacs-lisp

(defun org-element-dynamic-block-parser (limit affiliated)
  "Parse a dynamic block.
...

  (let ((case-fold-search t))
    (if (not (save-excursion
	       (re-search-forward "^[ \t]*#\\+END:?[ \t]*$" limit t)))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
	;; Incomplete block: parse it as a paragraph.
	(org-element-paragraph-parser limit affiliated)
      (let ((block-end-line (match-beginning 0)))
...
#+end_src

If clocktable is defined with "+END: clocktable" the parser recognizes it
as a paragraph, not a clocktable.

If I write

#+BEGIN: clocktable
#+END:

than the evaluation with "C-c C-c" will work. 

This behaviour has been changed, perhaps this is a bug.
(In the org-versin delivered with Emacs 24.2.50.1 the parser code
from org-element.el is not used; this version works like described
in the manual wwith "#+END: clocktable".)

My installation:

Emacs  : GNU Emacs 24.2.50.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2012-10-13 on cw-bkp0, modified by Debian
Package: Org-mode version 7.9.3d (release_7.9.3d-894-gfe805e)

Kind regards,
Stefan

-- 
Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.

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

* Re: Bug: C-c C-c does not handle dynamic blocks correctly [7.9.3d (release_7.9.3d-894-gfe805e)]
  2013-01-27 11:48 Bug: C-c C-c does not handle dynamic blocks correctly [7.9.3d (release_7.9.3d-894-gfe805e)] Stefan-W. Hahn
@ 2013-01-27 19:10 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2013-01-27 19:10 UTC (permalink / raw)
  To: Stefan-W. Hahn; +Cc: emacs-orgmode

Hello,

"Stefan-W. Hahn" <info@s-hahn.de> writes:

> if trying to update a dynamic clocktable with "C-c C-c", point on "#+BEGIN",
> I get the error message:
>
> "user-error: C-c C-c can do nothing useful at this location"
>
> The clocktable looks like:
>
> #+BEGIN: clocktable
> #+END: clocktable

This is incorrect syntax.

> If I write
>
> #+BEGIN: clocktable
> #+END:
>
> than the evaluation with "C-c C-c" will work. 

This is the correct syntax.

> This behaviour has been changed, perhaps this is a bug.

The syntax is just stricter with Elements. Please use the second one.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2013-01-27 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-27 11:48 Bug: C-c C-c does not handle dynamic blocks correctly [7.9.3d (release_7.9.3d-894-gfe805e)] Stefan-W. Hahn
2013-01-27 19:10 ` 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).