emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: ob-plantuml: using @start prefix in buffer returns nil body due to nil assignments [N/A (N/A @ /nix/store/1hmx5h1kn25p7s31h31dz7g3kn1dc6qx-emacs-packages-deps/share/emacs/site-lisp/org/)]
@ 2019-11-07 23:06 Terje Larsen
  2019-11-09  8:10 ` Jarmo Hurri
  0 siblings, 1 reply; 2+ messages in thread
From: Terje Larsen @ 2019-11-07 23:06 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

I noticed that I cannot run C-c C-c to convert plantuml source blocks
since the commit (4e854974be9788f029f2d73f829c4d51d2b83faf), see changes
at:
https://code.orgmode.org/bzg/org-mode/commit/4e854974be9788f029f2d73f829c4d51d2b83faf#diff-9c9a333463276ff17be763269a5042f92a40817R73

If I have a simple source block as such as:
#+BEGIN_SRC plantuml :file output.png
@startuml
actor Foo1
actor Foo2
Foo1 -> Foo2 : Test
@enduml
#+END_SRC

When I try to run C-c C-c I receive the following error message:
org-babel-execute-src-block: Wrong type argument: char-or-string-p, nil

During my debugging I found out that assignments inside the function
org-babel-plantuml-make-body returns nil and that causes the function to
return nil which is not expected behavior. I remember this working
before, so I went looking through the history and noticed the addition
of this code. To me it looks like the logic is wrong. As the expression:
(org-babel-variable-assignments:plantuml params)

Could not possibly not return the body and without the body the content
will be invalid. I have verified that reverting this commit fixes the
issue and lets me generate PlantUML files.

Emacs  : GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.12)
Package: Org mode version N/A (N/A @ /nix/store/1hmx5h1kn25p7s31h31dz7g3kn1dc6qx-emacs-packages-deps/share/emacs/site-lisp/org/)

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

* Re: Bug: ob-plantuml: using @start prefix in buffer returns nil body due to nil assignments [N/A (N/A @ /nix/store/1hmx5h1kn25p7s31h31dz7g3kn1dc6qx-emacs-packages-deps/share/emacs/site-lisp/org/)]
  2019-11-07 23:06 Bug: ob-plantuml: using @start prefix in buffer returns nil body due to nil assignments [N/A (N/A @ /nix/store/1hmx5h1kn25p7s31h31dz7g3kn1dc6qx-emacs-packages-deps/share/emacs/site-lisp/org/)] Terje Larsen
@ 2019-11-09  8:10 ` Jarmo Hurri
  0 siblings, 0 replies; 2+ messages in thread
From: Jarmo Hurri @ 2019-11-09  8:10 UTC (permalink / raw)
  To: emacs-orgmode


Greetings Terje.

Terje Larsen <terlar@gmail.com> writes:

> I noticed that I cannot run C-c C-c to convert plantuml source blocks
> since the commit (4e854974be9788f029f2d73f829c4d51d2b83faf), see changes
> at:
> https://code.orgmode.org/bzg/org-mode/commit/4e854974be9788f029f2d73f829c4d51d2b83faf#diff-9c9a333463276ff17be763269a5042f92a40817R73
>
> If I have a simple source block as such as:
>
> #+BEGIN_SRC plantuml :file output.png
> @startuml
> actor Foo1
> actor Foo2
> Foo1 -> Foo2 : Test
> @enduml
> #+END_SRC
>
> When I try to run C-c C-c I receive the following error message:
> org-babel-execute-src-block: Wrong type argument: char-or-string-p,
> nil

I started using plantuml in org last week (and am enjoying it greatly),
so take this with a hint of salt from a beginner. Still, at least in my
installation, your source code block works fine without '@startuml' and
'@enduml':

#+BEGIN_SRC plantuml :file output.png
actor Foo1
actor Foo2
Foo1 -> Foo2 : Test
#+END_SRC

All the best,

Jarmo

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

end of thread, other threads:[~2019-11-09  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-07 23:06 Bug: ob-plantuml: using @start prefix in buffer returns nil body due to nil assignments [N/A (N/A @ /nix/store/1hmx5h1kn25p7s31h31dz7g3kn1dc6qx-emacs-packages-deps/share/emacs/site-lisp/org/)] Terje Larsen
2019-11-09  8:10 ` Jarmo Hurri

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