emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Bug] test-org-export/before-parsing-hook
@ 2013-01-27 13:09 Achim Gratz
  2013-01-30 10:21 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2013-01-27 13:09 UTC (permalink / raw)
  To: emacs-orgmode


Testing current Org fails with this backtrace (the culprit seems to be
calling looking-at with an argument of nil):

Test test-org-export/before-parsing-hook backtrace:
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let* ((i 6) (fram
  (block nil (let* ((i 6) (frame nil) (--cl-var-- nil)) (while (progn 
  (loop for i from 6 for frame = (backtrace-frame i) while frame colle
  ert--record-backtrace()
  (let* ((condition (first more-debugger-args)) (type (case (car condi
  (cond ((member* first-debugger-arg (quote (lambda debug t exit nil))
  (case first-debugger-arg ((lambda debug t exit nil) (apply (ert--tes
  (ecase first-debugger-arg ((lambda debug t exit nil) (apply (ert--te
  (let* ((more-debugger-args debugger-args) (first-debugger-arg (if mo
  (progn (let* ((more-debugger-args debugger-args) (first-debugger-arg
  (destructuring-bind (first-debugger-arg &rest more-debugger-args) de
  ert--run-test-debugger([cl-struct-ert--test-execution-info [cl-struc
  (lambda (G37863 &rest debugger-args) (ert--run-test-debugger (symbol
  apply((lambda (G37863 &rest debugger-args) (ert--run-test-debugger (
  (lambda (&rest --cl-rest--) (apply (quote (lambda (G37863 &rest debu
  looking-at(nil)
  org-agenda-skip()
…
  call-interactively(org-test-run-batch-tests nil nil)
  command-execute(org-test-run-batch-tests)
  command-line-1(("--eval" "(add-to-list 'load-path \"testing/ert\")" 
  command-line()
  normal-top-level()
Test test-org-export/before-parsing-hook condition:
    (wrong-type-argument stringp nil)
   FAILED  286/423  test-org-export/before-parsing-hook



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: [Bug] test-org-export/before-parsing-hook
  2013-01-27 13:09 [Bug] test-org-export/before-parsing-hook Achim Gratz
@ 2013-01-30 10:21 ` Bastien
  2013-01-30 19:29   ` Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2013-01-30 10:21 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim,

Achim Gratz <Stromeko@nexgo.de> writes:

> Testing current Org fails with this backtrace (the culprit seems to be
> calling looking-at with an argument of nil):

FWIW I cannot reproduce the problem.  Can you?  

-- 
 Bastien

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

* Re: [Bug] test-org-export/before-parsing-hook
  2013-01-30 10:21 ` Bastien
@ 2013-01-30 19:29   ` Achim Gratz
  2013-01-30 19:44     ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2013-01-30 19:29 UTC (permalink / raw)
  To: emacs-orgmode

Bastien writes:
>> Testing current Org fails with this backtrace (the culprit seems to be
>> calling looking-at with an argument of nil):
>
> FWIW I cannot reproduce the problem.  Can you?  

Aside from the fact that Eric's last commit broke compilation of all of
Org and I had to back it out, yes I can.  Here's my config (in other
words the new exporter is active, otherwise that test may not even be
run):

========= Additional files from contrib/lisp
org-man.el org-export.el org-e-icalendar.el org-e-latex.el org-e-groff.el org-e-man.el org-e-html.el org-e-texinfo.el org-e-publish.el org-e-beamer.el org-e-odt.el org-e-confluence.el org-e-ascii.el
========= Org version
make:  Org-mode version 7.9.3d (release_7.9.3d-913-gff2d37 => /usr/local/share/emacs/site-lisp/org)



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: [Bug] test-org-export/before-parsing-hook
  2013-01-30 19:29   ` Achim Gratz
@ 2013-01-30 19:44     ` Nicolas Goaziou
  2013-01-30 20:16       ` Achim Gratz
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2013-01-30 19:44 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hello,

Achim Gratz <Stromeko@nexgo.de> writes:

> Aside from the fact that Eric's last commit broke compilation of all of
> Org and I had to back it out, yes I can.  Here's my config (in other
> words the new exporter is active, otherwise that test may not even be
> run):
>
> ========= Additional files from contrib/lisp
> org-man.el org-export.el org-e-icalendar.el org-e-latex.el org-e-groff.el org-e-man.el org-e-html.el org-e-texinfo.el org-e-publish.el org-e-beamer.el org-e-odt.el org-e-confluence.el org-e-ascii.el
> ========= Org version
> make:  Org-mode version 7.9.3d (release_7.9.3d-913-gff2d37 =>
> /usr/local/share/emacs/site-lisp/org)

Could you try this test instead? I don't trust `org-map-entries'.

#+begin_src emacs-lisp
(ert-deftest test-org-export/before-parsing-hook ()
  "Test `org-export-before-parsing-hook'."
  (should
   (equal "Body 1\nBody 2\n"
	  (org-test-with-backend test
            (org-test-with-temp-text "* Headline 1\nBody 1\n* Headline 2\nBody 2"
              (let ((org-export-before-parsing-hook
                     '((lambda (backend)
                         (goto-char (point-min))
                         (while (re-search-forward org-outline-regexp-bol nil t)
                           (delete-region
                            (point-at-bol) (progn (forward-line) (point))))))))
                (org-export-as 'test)))))))
#+end_src


Regards,

-- 
Nicolas Goaziou

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

* Re: [Bug] test-org-export/before-parsing-hook
  2013-01-30 19:44     ` Nicolas Goaziou
@ 2013-01-30 20:16       ` Achim Gratz
  2013-01-30 20:29         ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Achim Gratz @ 2013-01-30 20:16 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou writes:
> Could you try this test instead? I don't trust `org-map-entries'.

This works.  Is this an indication that org-map-entries is buggy?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: [Bug] test-org-export/before-parsing-hook
  2013-01-30 20:16       ` Achim Gratz
@ 2013-01-30 20:29         ` Nicolas Goaziou
  2013-01-31 11:05           ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2013-01-30 20:29 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> Nicolas Goaziou writes:
>> Could you try this test instead? I don't trust `org-map-entries'.
>
> This works.  Is this an indication that org-map-entries is buggy?

It is more that this function does too much things behind the scenes
(like calling `org-agenda-prepare-buffers') to be reliable in a test
environment.

Thank you for reporting the problem. I commit the new test at once.


Regards,

-- 
Nicolas Goaziou

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

* Re: [Bug] test-org-export/before-parsing-hook
  2013-01-30 20:29         ` Nicolas Goaziou
@ 2013-01-31 11:05           ` Bastien
  0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2013-01-31 11:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Achim Gratz, emacs-orgmode

Hi Nicolas,

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

> It is more that this function does too much things behind the scenes
> (like calling `org-agenda-prepare-buffers') to be reliable in a test
> environment.

Agreed.  We are better off testing the behavior of `org-map-entries'
than using it for tests.

-- 
 Bastien

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

end of thread, other threads:[~2013-01-31 11:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-27 13:09 [Bug] test-org-export/before-parsing-hook Achim Gratz
2013-01-30 10:21 ` Bastien
2013-01-30 19:29   ` Achim Gratz
2013-01-30 19:44     ` Nicolas Goaziou
2013-01-30 20:16       ` Achim Gratz
2013-01-30 20:29         ` Nicolas Goaziou
2013-01-31 11:05           ` Bastien

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