Questions tagged [property-lists]
The property-lists tag has no usage guidance.
13
questions
2
votes
1answer
91 views
Convert an org table into a tree
I have an org table and I will like to convert in into a tree.
So, from:
| 1 | 2 | 3 |
|---+---+---|
| a | b | c |
| l | m | n |
I will like to go to:
* a
:PROPERTIES:
:2: b
:3: ...
4
votes
3answers
94 views
Equivalent of let-alist for plists?
I'm curious if there's an equivalent for let-alist for plists. Namely, a macro for accessing plists in the manner that alists may be accessed as:
(let-alist alist
(if (and .title .body)
....
1
vote
1answer
313 views
How to add CSS support for the html-export in org mode for the properties drawer?
My org version is 9.1.14.
Background info:
I am trying to export my notes in org-mode to html. I would like to have my notes tagged with Category and Tags. I want to apply some CSS beautification ...
2
votes
1answer
111 views
EIEIO defclasses as plists
There is some support for defclasses as alists in EIEIO but I was wondering if there is any support to read/write a defclass as a property list (plist)?
e.g. using the example
(defclass record () ; ...
2
votes
2answers
173 views
How to modify multiple keys in a plist
I know I can do something like this:
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5)
But what If I want to change another property, say :foreground, how do I do it? I ...
1
vote
1answer
890 views
Colon in Emacs Lisp [duplicate]
I came across this example:
(setq h-data '((:num 1 :key "apple")
(:num 9 :key "berry")
(:num 2 :key "cactus")
(:num 5 :key "dog")
(:num 4 :...
1
vote
1answer
253 views
elisp - How to dump plist to property value pairs
Below example dump it as a list, but I wish to dump it in property value pairs:
#+BEGIN_SRC elisp :results output
(defun dump-plist(obj level)
(if (listp obj)
(dolist (item obj)
(dump-...
4
votes
1answer
583 views
Why does emacs use both propertly lists and association lists?
http://www.gnu.org/software/emacs/manual/html_node/elisp/Plists-and-Alists.html gives some supposed differences between plists and alists. Basically it comes down to:
Alists can be used as stacks, ...
0
votes
2answers
265 views
Why does `assoc` return nil for a plist?
I've got the following issue:
(setq testvar '(link (:type "http" :path "//pygments.org/docs" :format
bracket :raw-link "http://pygments.org/docs" :application nil)))
(setq testvar (nth 1 testvar))
(...
0
votes
5answers
144 views
Is it possible to define all keywords' function definitions as plist-get?
I really, really like Clojure-style maps:
{:keyword "value"
:keyword2 'value2}
which can be used like
(get my-map :keyword)
or, even better,
(:keyword my-map)
Can I teach Elisp how to do this?
2
votes
1answer
169 views
Read file lines into plist
I've been reading various tutorials on alist/plist access but can't figure this out. Let's say i have this file, test.txt:
oranges 1
apples 2
grapes 3
I want to iterate this file line by line, and ...
11
votes
3answers
1k views
Function to merge two property lists?
I have not found a standard Elisp library function to merge two property lists, like this:
(setq pl nil)
(setq pl (plist-put pl 'key-1 'value-1))
(setq pl (plist-put pl 'key-2 'value-2))
I could ...
4
votes
1answer
955 views
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 ...