Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

org-defblock not working #47

Open
opensource-philosophy opened this issue Dec 3, 2023 · 0 comments
Open

org-defblock not working #47

opensource-philosophy opened this issue Dec 3, 2023 · 0 comments

Comments

@opensource-philosophy
Copy link

Hello there, and thanks for keeping up your work on org-special-block-extras! I have not been using it for a while since I wasn’t preparing presentations using org-beamer, but now I am at it again. Unfortunately, though, the macro org-defblock does not seem to work for me on the current version (20230721.43). Here is an example definition I use, but I found the problem with any definition:

(org-defblock satz nil (name "" label "" align "" width 0.15)
              "Custom block for the custom satz-environment in LaTeX."
              (let ((changed-name name)
                    (align-one (cond
                                ((equal align 'center) "\\begin{center}\n")
                                ((equal align 'right) "\\begin{flushright}\n")
                                (t "")))
                    (align-two (cond
                                ((equal align'center) "\n\\end{center}")
                                ((equal align 'right) "\n\\end{flushright}")
                                (t "")))
                    (width-two (- 1 width)))
                (cond
                 ((memq backend '(latex beamer))

                  (format "%s\\begin{equation}
\\label{%s}
\\tag{%s}
\\text{\\parbox{%s\\textwidth}{%s}}
\\end{equation}%s \\noindent"
                          align-one label changed-name width-two contents align-two))

                 (backend (format "\n\n      (%s)      \t%s\n" changed-name contents)))))

When using such a block, as for example

#+BEGIN_SATZ :name myname :label mylabel
Example Sentence.
#+END_SATZ

I get the error message Symbol's function definition is void: name.

I had an old version (20220326.1432) flying around so I tried it with that version and everything worked the way I intended it to work. Thus, I suppose that you made some change to some file which blows up org-defblock. Would you be willing to look into this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant