all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* issue using org-export-before-parsing-hook in a src-block
@ 2021-11-07 14:04 John Kitchin
  2021-11-07 14:08 ` John Kitchin
  2022-10-29  4:46 ` Ihor Radchenko
  0 siblings, 2 replies; 3+ messages in thread
From: John Kitchin @ 2021-11-07 14:04 UTC (permalink / raw)
  To: org-mode-email

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

If I run this block in an org file:

#+BEGIN_SRC emacs-lisp
(let ((org-export-before-parsing-hook '((lambda (_backend) nil))))
  (org-org-export-as-org))
#+END_SRC

I get a traceback that starts with
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  goto-char(nil)
  (if existing-result (goto-char existing-result) (goto-char
(org-element-property :end inline)) (skip-chars-backward " \11"))

that seems to originate in

  org-babel-insert-result(#<buffer *Org ORG Export*> ("value" "replace")
("emacs-lisp" "(let ((org-export-before-parsing-hook '((lambda (_..."
((:colname-names) (:rowname-names) (:result-params "value" "replace")
(:result-type . value) (:results . "value replace") (:exports . "both")
(:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no")
(:tangle . "no") (:eval . "never-export")) "" nil 1 "(ref:%s)") nil
"emacs-lisp")

If I put :results silent that doesn't happen. Is this a bug?

The org-file is empty in this case except for that block, but that doesn't
seem to matter.

John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

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

* Re: issue using org-export-before-parsing-hook in a src-block
  2021-11-07 14:04 issue using org-export-before-parsing-hook in a src-block John Kitchin
@ 2021-11-07 14:08 ` John Kitchin
  2022-10-29  4:46 ` Ihor Radchenko
  1 sibling, 0 replies; 3+ messages in thread
From: John Kitchin @ 2021-11-07 14:08 UTC (permalink / raw)
  To: org-mode-email

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

I should also add I see the same error if I just run

#+BEGIN_SRC emacs-lisp
(org-org-export-as-org)
#+END_SRC

and I see the same behavior with an emacs -q session.

John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Sun, Nov 7, 2021 at 9:04 AM John Kitchin <jkitchin@andrew.cmu.edu> wrote:

> If I run this block in an org file:
>
> #+BEGIN_SRC emacs-lisp
> (let ((org-export-before-parsing-hook '((lambda (_backend) nil))))
>   (org-org-export-as-org))
> #+END_SRC
>
> I get a traceback that starts with
> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
>   goto-char(nil)
>   (if existing-result (goto-char existing-result) (goto-char
> (org-element-property :end inline)) (skip-chars-backward " \11"))
>
> that seems to originate in
>
>   org-babel-insert-result(#<buffer *Org ORG Export*> ("value" "replace")
> ("emacs-lisp" "(let ((org-export-before-parsing-hook '((lambda (_..."
> ((:colname-names) (:rowname-names) (:result-params "value" "replace")
> (:result-type . value) (:results . "value replace") (:exports . "both")
> (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no")
> (:tangle . "no") (:eval . "never-export")) "" nil 1 "(ref:%s)") nil
> "emacs-lisp")
>
> If I put :results silent that doesn't happen. Is this a bug?
>
> The org-file is empty in this case except for that block, but that doesn't
> seem to matter.
>
> John
>
> -----------------------------------
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>

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

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

* Re: issue using org-export-before-parsing-hook in a src-block
  2021-11-07 14:04 issue using org-export-before-parsing-hook in a src-block John Kitchin
  2021-11-07 14:08 ` John Kitchin
@ 2022-10-29  4:46 ` Ihor Radchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2022-10-29  4:46 UTC (permalink / raw)
  To: John Kitchin; +Cc: org-mode-email

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> If I run this block in an org file:
>
> #+BEGIN_SRC emacs-lisp
> (let ((org-export-before-parsing-hook '((lambda (_backend) nil))))
>   (org-org-export-as-org))
> #+END_SRC
>
> I get a traceback that starts with
> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
>   goto-char(nil)
>   (if existing-result (goto-char existing-result) (goto-char
> (org-element-property :end inline)) (skip-chars-backward " \11"))
>
> that seems to originate in
>
>   org-babel-insert-result(#<buffer *Org ORG Export*> ("value" "replace")
> ("emacs-lisp" "(let ((org-export-before-parsing-hook '((lambda (_..."
> ((:colname-names) (:rowname-names) (:result-params "value" "replace")
> (:result-type . value) (:results . "value replace") (:exports . "both")
> (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no")
> (:tangle . "no") (:eval . "never-export")) "" nil 1 "(ref:%s)") nil
> "emacs-lisp")
>
> If I put :results silent that doesn't happen. Is this a bug?

Thanks for reporting, and sorry for the late reply.
Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=c70a422082eca3545adc73ba4905360bb6d371b7

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2022-10-29  5:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-07 14:04 issue using org-export-before-parsing-hook in a src-block John Kitchin
2021-11-07 14:08 ` John Kitchin
2022-10-29  4:46 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.