Questions tagged [symbols]
79 questions
18
votes
3 answers
How to create :keywords?
Q: How does one create and use :keywords?
Consider a (naive, apparently) attempt to access the following toy alist:
(setf alist '((:key-1 "Key no. 1")
(:key-2 "Key no. 2")))
(assq :key-1 alist) ; => (:key-1 "Key no.…

Dan
- 32,584
- 6
- 98
- 168
18
votes
3 answers
Exporting unicode characters to pdf using latex from org mode
Hello Good people of Emacs!
I'm having trouble exporting unicode math symbols from buffer (org-mode) to pdf file.
1. Problem Description:
Symbols are inserted to the buffer as unicode characters (via TEX input method or company-math)
Here is…

Empty_Mind
- 1,341
- 12
- 27
14
votes
4 answers
What does `symbol-value` do?
The docs made me no wiser:
This function returns the value stored in symbol's value cell. This is
where the variable's current (dynamic) value is stored. If the
variable has no local binding, this is simply its global value. If the
variable…

The Unfun Cat
- 2,393
- 16
- 32
10
votes
5 answers
How to use keyword symbols in Emacs Lisp?
According to Symbol Type
A symbol whose name starts with a colon (‘:’) is called a keyword symbol. These symbols automatically act as constants, and are normally used only by comparing an unknown symbol with a few specific alternatives. See…

Searene
- 479
- 2
- 14
10
votes
1 answer
Meaning of CRM column in buffer list from `C-x C-b`?
In the Buffer List, I wonder what the CRM column means and ., *, % and D mean in the column? For example
CRM Buffer Size Mode File
. * .emacs 3294 Emacs-Lisp ~/.emacs
% *Help* …

Tim
- 4,987
- 7
- 31
- 60
9
votes
6 answers
When is the first element in the argument list regarded as a function symbol and when not?
I'm learning elisp, and I just learned that the first element of a list is interpreted as a function symbol. I then learned how to define a function with defun. Here's the example from An Introduction to Programming in Emacs Lisp
(defun…

norio
- 191
- 4
9
votes
1 answer
Function naming with forward slash?
I see this elisp code (Bernt Hansen):
(defun bh/hide-other ()
(interactive)
(save-excursion
(org-back-to-heading 'invisible-ok)
(hide-other)
(org-cycle)
(org-cycle)
(org-cycle)))
and I wonder if the bh/hide-other name with…

147pm
- 2,907
- 1
- 18
- 39
7
votes
2 answers
When to use symbol properties?
Let's say I need to associate symbols with directories, and this will only need to be done for a small number of boundp symbols.
The way I see it, there are two easy ways to do that:
Store this association in a separate variable (alist or a hash…

Malabarba
- 22,878
- 6
- 78
- 163
7
votes
1 answer
What does “:” mean in elisp?
Does the : have a special meaning in Elisp?
(define-minor-mode dap-mode
"Global minor mode for DAP mode."
:init-value nil
:group 'dap-mode
:global t
:require 'dap-mode
:lighter (:eval…

David
- 291
- 1
- 9
7
votes
2 answers
How can I get list of all things supported by thing-at-point?
I want a complete list of things that works with thing-at-point. The documentation states:
Possibilities include `symbol`, `list`, `sexp`, `defun`,
`filename`, `url`, `email`, `word`, `sentence`, `whitespace`,
`line`, and `page`.
See the file…

user1002146
- 79
- 1
7
votes
1 answer
Understanding uninterned symbols and macro expansion?
I want to demonstrate my lack of knowledge with an example.
Using the following two macro defintions,
(defmacro for (var from init to final do &rest body)
"Execute a simple for loop: (for i from 1 to 10 do (print i))."
(let ((tempvar 'max))
…

clemera
- 3,401
- 13
- 40
7
votes
1 answer
Use of keyword symbols in property lists
According to the Emacs Lisp manual http://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Type.html
A symbol whose name starts with a colon (‘:’) is called a keyword
symbol. These symbols automatically act as constants, and are normally
…

Håkon Hægland
- 3,608
- 1
- 20
- 51
6
votes
2 answers
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-quotes?

lordnik22
- 121
- 7
6
votes
2 answers
Naming convention for variable and function names
When programming in Emacs Lisp, should variable and function names always be lower case? According to The Emacs Lisp Style Guide they should use "lisp-case", but what is that? In Emacs Lisp manual the case of symbols is not mentioned.
The motivation…

Håkon Hægland
- 3,608
- 1
- 20
- 51
4
votes
1 answer
Emacs elisp debugger: How do i make the debugger jump to source when i press s?
The builtin elisp debugger (i.e. the regular one, debug, not edebug) has a default binding of s to command backtrace-goto-source.
When I try to use it, it says: Source code location not known
You can see what I mean by doing this:
Set contents of…

nate
- 63
- 5