Questions tagged [hash-tables]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 views

Helm source from a hash-table

I want to build a helm-source from a large hash-table, is there a smarter/faster way to to this, than the way described below? (setq tab #s(hash-table size 16 test equal ...
1
vote
1answer
171 views

how to implement a simple lookup table in lisp

I want to write an elisp function, when a country name is given, it returns the short code for the country. I've been reading about hash tables, but still not sure how to hashify my data set and make ...
2
votes
0answers
433 views

Get a better printed representation of a hash-table

I work with ELisp hash-table and I would like to have a better printed representation of it. I'm on Emacs version 24.5.1. When I create a hash-table (setq table (make-hash-table)) (puthash :name "...
5
votes
1answer
2k views

Accessing JSON data in elisp

JSON: { "name": "xxxxx", "job": "xxxxxx", "projects": [ { "name": "xxxxx", "date": "xxxxx", "about": "xxxxxxxxxx" }, { "name": "xxxxx", "date": "xxxxx",...
2
votes
1answer
61 views

Insert an entry into hash using put

(defvar-local hash-entries nil) (put 'hash-entries "key" "val") (message "%S" hash-entries) I try to add a key-value pair to the hash variable, hash-entries using the function put. But when i print ...
1
vote
1answer
73 views

What's the most concise way to make a hash table with data in it?

I'd like to create a hash table with data already in it. I know I can do so as follows: (let ((my-table (make-hash-table))) (puthash 'k1 'v1 my-table) (puthash 'k2 'v2 my-table) (puthash 'k3 '...
7
votes
2answers
174 views

How to speed up the loading of large hashtables?

As I understand from the manual (last paragraphs of http://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-Hash.html) and the question https://stackoverflow.com/questions/11745097/ on ...
1
vote
3answers
146 views

How to increment several numeric keys of a hash-table

Q: How to programmatically increment several numeric keys of a hash-table. Background: I am working on a modificion of speedbar to support the concept of speedbar-get-marked-files -- speedbar -- ...
0
votes
2answers
57 views

“Lisp error” when trying to append hash tables to a list

Q:  Is there a way to create one cache that consists of one cons cell and two hash tables? If so, how, please. If not, what is the best way to handle this scenario? Background: I'm working on a ...