0

Emacs 26.1, I try to use function subscr

Example:

subscr({a,b,c,d,e,f,h},{1,2,3})

But I get error:

eval: Symbol’s function definition is void: {a

closed as unclear what you're asking by phils, DoMiNeLa10 Sep 5 at 22:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

What language are you trying to use, and where/how are you trying to use it?

If you are trying to evaluate subscr({a,b,c,d,e,f,h},{1,2,3}) as Lisp (which it seems you are) then there are a few things wrong.

  • First, subscr is evaluated as a variable, not a function. If it's not bound as a Lisp variable then you should get an error saying that.

  • Second, the list ({a,b,c,d,e,f,h},{1,2,3}) is evaluated as an application of function {a to a list of arguments. You should get an error saying that {a is not a defined function (which is the error you saw).

  • Third, the rest of that function application - the list of arguments - is illegal Lisp, starting with the use of commas.

In short, this is not Lisp. It's not clear what you're trying to do or in what context you tried to use this text, but it seems that you tried to evaluate at least some of it as Lisp.

A guess is that you wanted to apply a Lisp function called subscr (not a predefined function - where is it defined?) to a string. That would be done like this in Lisp:

(subscr "{a,b,c,d,e,f,h},{1,2,3}")

Or perhaps you wanted to apply subscr to a list of two strings:

(subscr '("{a,b,c,d,e,f,h}" "{1,2,3}"))

In any case, again, function subscr needs to be defined.

  • 1
    I added tag org-mode for you. Your question is quite unclear. I answered it as it was posed. But if you have a questionabout using TBLFM in Org mode, you should pose that separately. Put all of the relevant information in your (new, other) question. Describe the context and just what you've done and what you're trying to do. – Drew Sep 5 at 15:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.