all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Wrong number of arguments: setq, 1
@ 2015-12-11 19:48 Kaushal Modi
  2015-12-11 20:04 ` Kaushal Modi
  2015-12-11 21:19 ` Nick Dokos
  0 siblings, 2 replies; 5+ messages in thread
From: Kaushal Modi @ 2015-12-11 19:48 UTC (permalink / raw)
  To: emacs-org list

Hi,

I needed to make these changes locally to make any kind of org export
(text, html, latex) work.

diff --git a/lisp/ox.el b/lisp/ox.el
index 2908fed..40c51cb 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1779,7 +1779,7 @@ INFO is a plist holding export options."
  ;; If FILETAGS contains a select tag, every headline or
  ;; inlinetask is returned.
  (org-element-map data '(headline inlinetask) #'identity)
-      (letrec ((selected-trees)
+      (letrec ((selected-trees nil)
        (walk-data
  (lambda (data genealogy)
   (let ((type (org-element-type data)))
@@ -2715,7 +2715,7 @@ DATA is the parse tree to traverse.  INFO is the
plist holding
 export info.  Also set `:ignore-list' in INFO to a list of
 objects which should be ignored during export, but not removed
 from tree."
-  (letrec ((ignore)
+  (letrec ((ignore nil)
    ;; First find trees containing a select tag, if any.
    (selected (org-export--selected-trees data info))
    (walk-data
@@ -3760,8 +3760,8 @@ INFO is a plist containing export state.  By
default, as soon as
 a new footnote reference is encountered, FUNCTION is called onto
 its definition.  However, if BODY-FIRST is non-nil, this step is
 delayed until the end of the process."
-  (letrec ((definitions)
-   (seen-refs)
+  (letrec ((definitions nil)
+   (seen-refs nil)
    (search-ref
     (lambda (data delayp)
       ;; Search footnote references through DATA, filling


Without these fixes, I get an error like: Wrong number of arguments: setq, 1

I am not familiar with letrec but for let statements, if I want to set
a let-bound variable X's value to nil, I would do,

(let (X) ..)

or

(let ((X nil)) ..)

But NOT (let ((X)) ..) (Note the parentheses count).


Do the same rules not apply to letrec?

Here is my org-version:

Org-mode version 8.3.2 (release_8.3.2-380-g64aee4 @
/home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)

Here is my emacs build info (emacs-25 branch):

Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+
Version 2.24.23)
 of 2015-12-10, built using commit d75849e937af0ecbcdc7bf621aa9bcd43aa75df4.

./configure options:
  --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64 -ggdb3'

Features:
  XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF
GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT
ZLIB TOOLKIT_SCROLL_BARS GTK2 X11




--
Kaushal Modi

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

* Re: Wrong number of arguments: setq, 1
  2015-12-11 19:48 Wrong number of arguments: setq, 1 Kaushal Modi
@ 2015-12-11 20:04 ` Kaushal Modi
  2015-12-11 21:19 ` Nick Dokos
  1 sibling, 0 replies; 5+ messages in thread
From: Kaushal Modi @ 2015-12-11 20:04 UTC (permalink / raw)
  To: emacs-org list

I just found a recent conversation on this mailing list with the
title: Concerning `(letrec ((ignore)) ...)' in line 2718 of lisp/ox.el

That explains why I suddenly started seeing these errors.
My above patch fixes org exports for me while being on the latest
snapshot of emacs-25 branch.

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

* Re: Wrong number of arguments: setq, 1
  2015-12-11 19:48 Wrong number of arguments: setq, 1 Kaushal Modi
  2015-12-11 20:04 ` Kaushal Modi
@ 2015-12-11 21:19 ` Nick Dokos
  2015-12-11 21:40   ` Kyle Meyer
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2015-12-11 21:19 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> writes:

> ...
> Without these fixes, I get an error like: Wrong number of arguments: setq, 1
>

I don't. Version info:

Org-mode version 8.3.2 (release_8.3.2-380-g64aee4 @
/home/nick/elisp/org-mode/lisp/)

GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.15) of
2015-08-16 on alphaville.usersys.redhat.com

> I am not familiar with letrec but for let statements, if I want to set
> a let-bound variable X's value to nil, I would do,
>
> (let (X) ..)
>
> or
>
> (let ((X nil)) ..)
>
> But NOT (let ((X)) ..) (Note the parentheses count).
>
>
> Do the same rules not apply to letrec?

They do not: letrec takes a list, each element of which is
a list (SYMBOL VALUEFORM) - but afaik, an empty VALUEFORM
sets the SYMBOL to nil.

let takes a VARLIST, each element of which is a symbol *or* a
list (SYMBOL VALUEFORM).

See their docstrings.

>
> Here is my org-version:
>
> Org-mode version 8.3.2 (release_8.3.2-380-g64aee4 @
> /home/kmodi/usr_local/apps/6/emacs/emacs-25/share/emacs/site-lisp/org/)
>
> Here is my emacs build info (emacs-25 branch):
>
> Emacs version: GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+
> Version 2.24.23)
>  of 2015-12-10, built using commit d75849e937af0ecbcdc7bf621aa9bcd43aa75df4.
>

My org is the same as yours, but my emacs is a few months old: maybe
some recent change screwed up something.

--
Nick

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

* Re: Wrong number of arguments: setq, 1
  2015-12-11 21:19 ` Nick Dokos
@ 2015-12-11 21:40   ` Kyle Meyer
  2015-12-11 22:25     ` Nick Dokos
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2015-12-11 21:40 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Kaushal Modi <kaushal.modi@gmail.com> writes:
>
>> ...
>> Without these fixes, I get an error like: Wrong number of arguments: setq, 1
>>
>
> I don't. Version info:

Your Emacs 25 build isn't recent enough to have the issue.  See
http://permalink.gmane.org/gmane.emacs.orgmode/103558

-- 
Kyle

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

* Re: Wrong number of arguments: setq, 1
  2015-12-11 21:40   ` Kyle Meyer
@ 2015-12-11 22:25     ` Nick Dokos
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2015-12-11 22:25 UTC (permalink / raw)
  To: emacs-orgmode

Kyle Meyer <kyle@kyleam.com> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Kaushal Modi <kaushal.modi@gmail.com> writes:
>>
>>> ...
>>> Without these fixes, I get an error like: Wrong number of arguments: setq, 1
>>>
>>
>> I don't. Version info:
>
> Your Emacs 25 build isn't recent enough to have the issue.  See
> http://permalink.gmane.org/gmane.emacs.orgmode/103558

Yep - thanks.

--
Nick

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 19:48 Wrong number of arguments: setq, 1 Kaushal Modi
2015-12-11 20:04 ` Kaushal Modi
2015-12-11 21:19 ` Nick Dokos
2015-12-11 21:40   ` Kyle Meyer
2015-12-11 22:25     ` Nick Dokos

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.