Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [equality]

The tag has no usage guidance.

0
votes
1answer
73 views

Function that returns the name of a Greek vowel

I'm trying to write a function that will return the name of a Greek vowel: alpha or epsilon etc. I was hoping this could be done by extracting it from the second group in the following regexp (in a ...
6
votes
2answers
164 views

How to make (make-symbol “foo”) (make-symbol “foo”) equal?

I'm curious why: (equal (make-symbol "foo") (make-symbol "foo")) ends up beeing nil. While (equal 'foo 'foo) is t. Do i have a misconception of symbols? Aren't they just strings without double-...
3
votes
3answers
151 views

Why are there multiple ways to test for equality in elisp?

In Logic there is one and only one unambiguously(*) defined notion of equality: two things are equal if and only if they are the same thing. Programming languages of course try to emulate this ...
0
votes
1answer
41 views

Idiomatic boolean comparators

Are there idiomatic boolean comparators in emacs lisp? Something like: (my/bool< nil t) => t (my/bool< 1 2) => nil For example, a comparator that returns t if the first argument is ...
1
vote
1answer
101 views

Check if buffername is equal to file name

I'm trying to autoexport a file from orgmode to html, so I decided to make a function to check the major mode of the buffer and check if the buffer has open the file that I want to export but when I ...
1
vote
1answer
42 views

Comparison of quoted symbols fails using equal

I'm trying to compare (quote foo) with 'foo using equal, but the equality is failing. Here is a trace of what is happening with my code. I don't understand why the comparison fails -- does it have ...
6
votes
1answer
77 views

More than two variable for equality predicates?

I see that = is great for "comparing" more than two (numerical) arguments, e.g., (= 1 1 1). But then eq, eql, and equal all only allow two arguments. And nesting is nonsense, i.e., the inner eq ...