Questions tagged [sexp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
4answers
427 views

Correct pronunciation of 'sexp'?

I apologize if this is a dumb question, but I'm just starting out in ELisp, and I'm wondering how you pronounce the word 'sexp'. I.e., if I was talking to someone, how does one say this word?
7
votes
2answers
397 views

How can I view the full `package-alist` value (without the truncation characters “…”)?

When I do C-h v package-alist, I see something like ((PACKAGE-NAME1 [cl-struct-package-desc PACKAGE-NAME1 (VERSION1) "DESCRIPTION1" (...
7
votes
4answers
559 views

How can I find surrounding parenthesis (from emacs lisp)?

Is there a way to find out the type of the surrounding parenthesis (i.e. '(', '[' or '{') around point? For example (using | to represent point) { abc, | df } should return '{', and { abc[ | ], ...
6
votes
1answer
263 views

fill-paragraph (`M-q`) for s-expressions?

With M-q (aka fill-paragraph), it is possible to format a single line of text nicely. Is there a command or function which does a similar thing for lisps s-expressions? It should break one-liner ...
5
votes
1answer
116 views

How do I ignore comments with scan-sexps?

I have some lisp code that contains a comment: (while list ;; take the head of LIST (setq len 1)) I want to extract the positions of the sexps. I'm using scan-sexps. If I call M-: (scan-sexps 12 ...
4
votes
1answer
95 views

how to properly move forward to the next sexp

I was expecting a similar result with the two snippets below, but this is what I've got: (with-temp-buffer (insert "(a)(b)(c)") (goto-char (point-min)) (list (prog1 (cons (point) (cons (sexp-...
3
votes
1answer
264 views

Folding code between a literal “begin”/“end” block using Hideshow

A formatted input file (*.alm) often contains a large section of columned data. To fold this and improve navigation, I've tried to implement a hs-special-mode-alist entry from hideshow.el. (setq hs-...
3
votes
1answer
624 views

Pretty print s expressions from the command line

I've got a file containing an emacs s-expression and I want to pretty print it from the command line: Is there an easy way of doing this? Paranoia suggests I want to do as little parsing of this data ...
3
votes
1answer
57 views

How can I find corresponding balanced parentheses?

I have this LaTeX code: \caption{Lorem ipsum dolor sit amet: foo), bar), baz) and qux) consectetuer adipiscing elit.} I want to put a marker immediately before the first { and one immediately after ...
2
votes
4answers
542 views

A elisp function to jump between matched pair

Here is the function spec: (defun jump-to-matched (open-char closed-char) ) say the content of current buffer is "a([b]c()d)". If I move the cursor over the first "(" and run (jump-to-matched "(" ")...
2
votes
1answer
76 views

forward-comment doesn't move the point

I tried running (forward-comment -1) by eval command, when the point is actually in the middle of a comment. Like forward-word (or) forward-line, i expected it move to the beginning of the comment &...
2
votes
0answers
80 views

Marking sexp diary entries as done in org agenda

I often use sexp diary entries for events in ORG-AGENDA. Is there a way of marking them as "DONE" in agenda-view? E.g. %%(diary-float t 2 3) Send John info for Bulletin E.g. %%(diary-block 12 15 ...
2
votes
0answers
366 views

How to go to the beginning of a word/sexp?

When the point is not at the beginning of a word/sexp, backward-word / backward-sexp places the cursor at the beginning of that word/sexp. If the point is already at the beginning of a word/sexp, this ...
1
vote
1answer
110 views

Navigating lisp

I want to programmatically navigate emacs lisp (and similar "nested paren code"). Specific functions I want: Go to first child (which errors if there are no children (maybe lispy-outline-goto-child ...
1
vote
1answer
58 views

Forward, backward etc sexp not working

I want to use the forward-sexp function in Emacs, which on my Spacemacs for Mac is bound to C-M-f. Similarly for the backward-sexp. However, upon pressing C- for Control, and then the Meta key, which ...
1
vote
1answer
133 views

How can I skip 'Scan-error: “Unbalanced parentheses”…'?

I want to write a script in order to correct spaces inside section command in a LaTeX code, that's to say \section{Lorem ipsum dolor sit amet consectetuer adipiscing elit} should be \section{...
1
vote
1answer
194 views

How can I bring tex-mode's sexp navigation to AucTeX?

I generally prefer AucTeX over the built-in tex-mode, but one thing that is much better in tex-mode is navigation by s-expression. Namely, in tex-mode, forward-sexp (C-M-f) treats LaTeX environments ...
1
vote
0answers
49 views

Different summaries at different levels in org-columns

I'm trying to use org-mode for keeping track of my grades in university. My grades are all numerical from 0 to 10. I want the column view to output my average score and the final grade of each subject,...
1
vote
0answers
119 views

Sending an s-expression to another buffer

I'm currently working in Clojure with Arcadia, which is requiring me to use a REPL that doesn't have support with Cider. This has been giving me some trouble given how I usually code, so I'd like to ...
1
vote
0answers
256 views

Orgmode : exporting agenda with sexps to ics

This year, I am having classes with complex descriptions, such as "every 1st and 3rd friday between 2016-11-18 and 2017-5-19", so I chose to use org-mode agenda combined with sexps to describe them ...
0
votes
1answer
142 views

forward-sexp confusion

The following code is an excerpt from the elisp tutorial, section 14.6. (while (re-search-forward "^(defun" nil t) (setq lengths-list (cons (count-words-in-defun) lengths-list))) Placing the ...
0
votes
1answer
129 views

Unclear expectation of behavior from `scan-sexps`

The docstring of scan-sexps says: If the beginning or end is reached between groupings but before count is used up, nil is returned. Putting point (|) before the first element of a list: (|a b c) ...
0
votes
1answer
41 views

mark-sexp (Wrong number of arguments)

((foo(bar)) ...
0
votes
0answers
35 views

filtering `sexp` entries in org-agenda

I have an org entry with a sexp and a tag: * test :test_tag: %%(org-anniversary 2000 08 23) test anniversary When I open my agenda "test anniversary" shows up as it should (I'm writing ...
0
votes
0answers
17 views

forward-sexp in markdown-mode doesn't handle backquoted expressions

How do I modify the syntax table to make forward-sexp and backward-sexp correctly skip over backquoted (code) expressions? For instance, if my markdown file contains a line like The C statement is `...