[-- Attachment #1: Type: text/plain, Size: 1166 bytes --] Ox.el contains the function org-export-define-backend. One of its keyword arguments is :menu-entry. The examples given include (https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox.el#L1214) '(?l "Export to LaTeX" (?p "As PDF file" org-latex-export-to-pdf) (?o "As PDF file and open" (lambda (a s v b) (if a (org-latex-export-to-pdf t s v b) (org-open-file (org-latex-export-to-pdf nil s v b)))))) This is invalid for two reasons: 1. The ?p and ?o elements should be wrapped in an extra layer of parentheses. For example, the ?p element should be ((?p "As PDF file" org-latex-export-to-pdf)). 2. There is an extra parenthesis at the end of the block. I cannot submit a patch, as my employer currently will not sign the copyright assignment. I hope someone else picks this up and fixes it. ------------------------------------------------------------------------ Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2021-07-09 Package: Org mode version 9.4.4 (release_9.4.4 @ /usr/local/share/emacs/28.0.50/lisp/org/) [-- Attachment #2: Type: text/html, Size: 1441 bytes --]
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --] Upon further testing, the third and fourth elements of the function should instead be wrapped in a single set of parentheses. There should only be three elements in the list. On Tue, Aug 3, 2021 at 12:36 AM Zachary Kanfer <zkanfer@gmail.com> wrote: > Ox.el contains the function org-export-define-backend. One of its > keyword arguments is :menu-entry. The examples given include > (https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox.el#L1214) > > '(?l "Export to LaTeX" > (?p "As PDF file" org-latex-export-to-pdf) > (?o "As PDF file and open" > (lambda (a s v b) > (if a (org-latex-export-to-pdf t s v b) > (org-open-file > (org-latex-export-to-pdf nil s v b)))))) > > This is invalid for two reasons: > > 1. The ?p and ?o elements should be wrapped in an extra layer of > parentheses. For example, the ?p element should be ((?p "As PDF file" > org-latex-export-to-pdf)). > 2. There is an extra parenthesis at the end of the block. > > I cannot submit a patch, as my employer currently will not sign the > copyright assignment. I hope someone else picks this up and fixes it. > > ------------------------------------------------------------------------ > > > Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version > 3.24.20, cairo version 1.16.0) > of 2021-07-09 > Package: Org mode version 9.4.4 (release_9.4.4 @ > /usr/local/share/emacs/28.0.50/lisp/org/) > [-- Attachment #2: Type: text/html, Size: 1989 bytes --]
Hello,
Zachary Kanfer <zkanfer@gmail.com> writes:
> Ox.el contains the function org-export-define-backend. One of its
> keyword arguments is :menu-entry. The examples given include
> (https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox.el#L1214)
>
> '(?l "Export to LaTeX"
> (?p "As PDF file" org-latex-export-to-pdf)
> (?o "As PDF file and open"
> (lambda (a s v b)
> (if a (org-latex-export-to-pdf t s v b)
> (org-open-file
> (org-latex-export-to-pdf nil s v b))))))
>
> This is invalid for two reasons:
>
> 1. The ?p and ?o elements should be wrapped in an extra layer of
> parentheses. For example, the ?p element should be ((?p "As PDF file"
> org-latex-export-to-pdf)).
> 2. There is an extra parenthesis at the end of the block.
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 1034 bytes --] Awesome, thank you! :) On Sat, Aug 7, 2021 at 4:15 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Hello, > > Zachary Kanfer <zkanfer@gmail.com> writes: > > > Ox.el contains the function org-export-define-backend. One of its > > keyword arguments is :menu-entry. The examples given include > > (https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox.el#L1214) > > > > '(?l "Export to LaTeX" > > (?p "As PDF file" org-latex-export-to-pdf) > > (?o "As PDF file and open" > > (lambda (a s v b) > > (if a (org-latex-export-to-pdf t s v b) > > (org-open-file > > (org-latex-export-to-pdf nil s v b)))))) > > > > This is invalid for two reasons: > > > > 1. The ?p and ?o elements should be wrapped in an extra layer of > > parentheses. For example, the ?p element should be ((?p "As PDF file" > > org-latex-export-to-pdf)). > > 2. There is an extra parenthesis at the end of the block. > > Fixed. Thank you. > > Regards, > -- > Nicolas Goaziou > [-- Attachment #2: Type: text/html, Size: 1726 bytes --]