Questions tagged [read]
The read tag has no usage guidance.
15
questions
0
votes
1answer
87 views
helm-mu on macOS throws Invalid read syntax: (")
Hej guys,
I get an error when searching through my mails with helm-mu.
Messages gives
Invalid face reference: helm-grep-finish [96 times]
error in process filter: helm-mu-candidate-parser: End of ...
1
vote
1answer
58 views
Filter the content read from file
(This follows the answer to the question: Completion of sentences stored in a file.)
Suppose I have a file, the content of which being organized thanks to org-mode:
* Dreams ≠ reality
Please, don'...
4
votes
1answer
225 views
Read first N lines of file into list
The general way this seems to be done using Elisp is to first read the entire file using something like insert-file-contents-literally or find-file-no-select, using split-string on a newline, and then ...
0
votes
1answer
45 views
How set default number (1) in the interactive custom function
here custom function:
(defun increment-number-at-point(number)
(interactive "nInput increment number:")
(skip-chars-backward "0-9")
(or (looking-at "[0-9]+")
(error "No number at point"))
...
2
votes
1answer
318 views
What does hash s indicate in lisp
This is the result of
M-: (elfeed-search-selected :ignore-region)
#s(elfeed-entry
("www.cbc.com.com" . "https://www.cbc.com.com/defg/Polyglot-programming_%7E017e364530a5359046?source=rss")
...
1
vote
0answers
37 views
What methods are available for complex user input?
I am experimenting with writing a plugin which requires quite a bit of user input, its a front end to an api.
A typical request will have 4 required inputs and many optional inputs, obviously I can ...
4
votes
2answers
711 views
How to read elisp file into s-expression?
I have a file of elisp code, say foo.el. I want to turn the content into a s-expression, so that I can play with it. Right now, I use the following method:
Read foo.el into a string.
Turn the string ...
2
votes
1answer
229 views
How should you read a Lisp file as Lisp for processing without condition-case?
To help catch predictable errors, I've written my own linting tasks that read the code and report any inconsistencies it finds. One of the hackier pieces to this right now is the following function:
...
1
vote
1answer
374 views
Read input char without pressing RET
I want to perform the same task as in the function below, but without having to press ENTER every time I select an option.
(defun my-fun ()
(interactive)
(setq something (read-string "Options:\n [...
1
vote
0answers
51 views
How do I read and parse other Lisps in Emacs
I am playing with LFE language and I try to improve documentation lookup. Some of my efforts can be seen on my Github repo
I have a function sexp-at-point which return a string enclosed by round ...
12
votes
1answer
1k views
Meaning of period in (. 123)
I learnt . /path/to/file in bash is used to execute a file. Just out of curiosity, I eval something like the following in Emacs
(. 123)
⇒ 123
(read "(. 123)")
⇒ 123
It looks like Emacs ...
2
votes
1answer
673 views
Read a config file and get some value into elisp variable
I'm trying to read a value of variable context from the config file. I use something like this (but have got an error..):
(with-current-buffer
(insert-file-contents "/home/user/liquibase.properties")
...
22
votes
2answers
3k views
How to evaluate Elisp code contained in a string?
The question pretty much says it all: I have a string containing the source code for a valid Elisp expression, and I would like to evaluate it.
(In Python, for example, the expression eval("1 - 2 + 3"...
3
votes
1answer
589 views
How to handle end of file during parsing errors while reading a string?
I was trying to read and eval Lisp forms from a string using a loop, instead of just putting the string into a buffer and using eval-buffer to load everything in the string. That method was mentioned ...
2
votes
1answer
63 views
How to add-to-list to read-in file contents
When I do this (setq v (f-read-text "s.el")) where s.el is of this form
((thing1 . thing2) (thing3 . thing4))
I get v back as one long string. And (setq v (append (f-read-text "s.el"))) doesn't seem ...