emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el
@ 2015-12-10 20:26 Zack Piper
  2015-12-11 12:44 ` Zack Piper
  0 siblings, 1 reply; 4+ messages in thread
From: Zack Piper @ 2015-12-10 20:26 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

When I attempt to export an Org document using the HTML backend (and
Org backend) I get (after the initial tangle, even a normal Org
document with the word "Example" fails):

╭────
│ Wrong number of arguments: setq, 1
╰────

So I proceed to use Edebug to find out why this is happening:

Line 2718, of `lisp/ox.el' causes it.

That line is

╭────
│ (letrec ((ignore) ...))
╰────

So I tried using `M-: (letrec ((ignore)) "test"), and get the same as before.

So my question is, why is this failing now? According to `magit-blame'
these lines haven't been touched in a while, so I'm genuinely not sure
why it does this now, and, of course, is there a fix?


Thanks!


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

* Re: Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el
  2015-12-10 20:26 Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el Zack Piper
@ 2015-12-11 12:44 ` Zack Piper
  2015-12-11 15:27   ` Kyle Meyer
  0 siblings, 1 reply; 4+ messages in thread
From: Zack Piper @ 2015-12-11 12:44 UTC (permalink / raw)
  To: Zack Piper; +Cc: emacs-orgmode


I (think) I have a recipe to reproduce this:

- Emacs 25 (emacs-25 branch from Git)
- Org mode from latest Git (make sure that there's no ELC files from
  Emacs *24*, if it uses files from Emacs 24 it works fine (bug in
  byte compiler?)).

╭────[ r.el ]
│ (add-to-list 'load-path "~/org-mode/lisp")
│ (add-to-list 'load-path "~/org-mode/contrib/lisp")
│ (require 'org)
│ 
│ (find-file "~/r.org")
│ 
│ (org-html-export-as-html)
╰────

╭────[ $ ]
│ emacs -Q -l r.el
╰────

Produces:

╭────
│ Wrong number of arguments: setq, 1
╰────

Thanks!

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

* Re: Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el
  2015-12-11 12:44 ` Zack Piper
@ 2015-12-11 15:27   ` Kyle Meyer
  2015-12-11 16:13     ` Zack Piper
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2015-12-11 15:27 UTC (permalink / raw)
  To: Zack Piper; +Cc: emacs-orgmode


Zack Piper <zack@apertron.net> writes:

> I (think) I have a recipe to reproduce this:
>
> - Emacs 25 (emacs-25 branch from Git)
> - Org mode from latest Git (make sure that there's no ELC files from
>   Emacs *24*, if it uses files from Emacs 24 it works fine (bug in
>   byte compiler?)).
>
> ╭────[ r.el ]
> │ (add-to-list 'load-path "~/org-mode/lisp")
> │ (add-to-list 'load-path "~/org-mode/contrib/lisp")
> │ (require 'org)
> │
> │ (find-file "~/r.org")
> │
> │ (org-html-export-as-html)
> ╰────
>
> ╭────[ $ ]
> │ emacs -Q -l r.el
> ╰────
>
> Produces:
>
> ╭────
> │ Wrong number of arguments: setq, 1
> ╰────

I believe this because an odd number of arguments to setq now signals an
error:

    https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02028.html

From Emacs 25 NEWS:

    ** `setq' must now be called with an even number of arguments.  The
    earlier behavior of silently supplying a nil to the last variable when
    there was an odd number of arguments has been eliminated.

The binding

  (letrec ((ignore)

results in letrec passing an odd number of arguments to setq:

  `(let ,(mapcar #'car binders)
     ,@(mapcar (lambda (binder) `(setq ,@binder)) binders)
     ,@body))
     
Changing (ignore) to (ignore nil) should fix it.  There are several
other places in ox.el that have the same problem.  However, I don't know
if letrec should handle this instead.  Nicolas?

--
Kyle

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

* Re: Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el
  2015-12-11 15:27   ` Kyle Meyer
@ 2015-12-11 16:13     ` Zack Piper
  0 siblings, 0 replies; 4+ messages in thread
From: Zack Piper @ 2015-12-11 16:13 UTC (permalink / raw)
  To: emacs-orgmode

On Fri, Dec 11, 2015 at 10:27:55AM -0500, Kyle Meyer wrote:
> 
> Zack Piper <zack@apertron.net> writes:
> 
> > I (think) I have a recipe to reproduce this:
> >
> > - Emacs 25 (emacs-25 branch from Git)
> > - Org mode from latest Git (make sure that there's no ELC files from
> >   Emacs *24*, if it uses files from Emacs 24 it works fine (bug in
> >   byte compiler?)).
> >
> > ╭────[ r.el ]
> > │ (add-to-list 'load-path "~/org-mode/lisp")
> > │ (add-to-list 'load-path "~/org-mode/contrib/lisp")
> > │ (require 'org)
> > │
> > │ (find-file "~/r.org")
> > │
> > │ (org-html-export-as-html)
> > ╰────
> >
> > ╭────[ $ ]
> > │ emacs -Q -l r.el
> > ╰────
> >
> > Produces:
> >
> > ╭────
> > │ Wrong number of arguments: setq, 1
> > ╰────
> 
> I believe this because an odd number of arguments to setq now signals an
> error:
> 
>     https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg02028.html
> 
> From Emacs 25 NEWS:
> 
>     ** `setq' must now be called with an even number of arguments.  The
>     earlier behavior of silently supplying a nil to the last variable when
>     there was an odd number of arguments has been eliminated.
> 
> The binding
> 
>   (letrec ((ignore)
> 
> results in letrec passing an odd number of arguments to setq:
> 
>   `(let ,(mapcar #'car binders)
>      ,@(mapcar (lambda (binder) `(setq ,@binder)) binders)
>      ,@body))
>      
> Changing (ignore) to (ignore nil) should fix it.  There are several
> other places in ox.el that have the same problem.  However, I don't know
> if letrec should handle this instead.  Nicolas?

I submitted a patch to the emacs-devel ML which fixes this (at least
for me).
Thanks very much for tracking down this issue, Kyle!


-- 
Zack Piper <zack@apertron.net> http://apertron.net

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

end of thread, other threads:[~2015-12-11 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 20:26 Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el Zack Piper
2015-12-11 12:44 ` Zack Piper
2015-12-11 15:27   ` Kyle Meyer
2015-12-11 16:13     ` Zack Piper

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