Linked Questions

3 votes
1 answer
2k views

Construct a list from a variable [duplicate]

'(1 2 3) gives me a list of three elements, but (setq A "apple") '(A) gives me (A). My question is how can I get the list '("apple") by referring variable A?
yi.tang.uni's user avatar
  • 1,017
2 votes
1 answer
2k views

Can I eval a value in quote? [duplicate]

I have a variable say some-var, its value is a string. I want to use its value in a quote expression. '(some-var "some string") The function who is using the above expression reports error because ...
David S.'s user avatar
  • 395
7 votes
2 answers
1k views

Creating an association list with element evaluation [duplicate]

So as far as I understand it you create association lists that look like '((rose . red) (violet . violet) (chrysanthemum . who-knows)) My question is, what do you do if you want rose, violet, etc.,...
user avatar
3 votes
1 answer
801 views

How to write a list literal that contains items conditionally? [duplicate]

Given a list literal '(1 2 3) is it possible to conditionally include parts of the list? eg: '(1 2 3 (when thing-is-true '(10 11 12))) 4 5 6) Which would result in '(1 2 3 4 5 6) or '(1 2 3 10 11 ...
ideasman42's user avatar
  • 8,846
0 votes
1 answer
424 views

Dynamic name for org-capture template file [duplicate]

I am new to org-mode (and to Emacs in general) and am trying to set up org-capture. I would like to define a todo capture item whose template is located in the file ~/.emacs.d/org-templates/todo.tmpl....
Kristian's user avatar
  • 103
2 votes
1 answer
314 views

Concat in Org Easy Templates [duplicate]

I have a variety of org easy templates. I have a new file template which includes a #+DATE header that I'd like to populate with the current date [at the time the template is called]. The ...
ch-pub's user avatar
  • 220
1 vote
1 answer
145 views

Variable not parsed inside other variable definition [duplicate]

I want to store the credentials for posting to my blog secret. Therefore I load them using EasyPG and put them in the variables blog-username and blog-password. When I show the content of those vars ...
cb0's user avatar
  • 1,077
1 vote
1 answer
179 views

How to allow a sexp within a quoted list to be evaluated? [duplicate]

(setq a 2) (setq l '(a b c)) (car l) Got a when evaluating this, and why its value not 2 ?
FaiChou's user avatar
  • 113
1 vote
1 answer
159 views

Why does :command argument of make-process not work when string passed as a variable? [duplicate]

This works fine: (make-process :name "my-proc2" :buffer " *my-proc2*" :command '("sh" "-c" "echo \"hi\"\nsleep 10\necho \"there\"") :connection-type 'pipe :...
codygman's user avatar
  • 153
0 votes
1 answer
92 views

elisp - simplify a stranger data structure [duplicate]

I wish to define a variable to replace the hardcode string below: (setq org-publish-project-alist '( ("blog" :components ("org-blog-docs" "org-blog-static")) ("org-blog-docs" ...
lucky1928's user avatar
  • 1,668
1 vote
1 answer
115 views

Use a variable's value in setq [duplicate]

In emacs.el I am using the following construct to set up an org-remember template: (setq org-remember-templates '(("Todo" ?t "* TODO %^{Brief Description} %^g\n%?\nAdded: %U" "~/GTD/newgtd.org" "...
Alexander Shcheblikin's user avatar
0 votes
1 answer
109 views

Cannot define custom latex class in org-mode [duplicate]

This is the code I tried: (after! ox-latex (add-to-list 'org-latex-classes '("deeparticle" (concat "\\documentclass[11pt]{article}\n" "\\usepackage{...
Hyperbo Lee's user avatar
0 votes
1 answer
93 views

Invalid function in font-lock-fontify-keywords-region [duplicate]

Why do I get the error: font-lock-fontify-keywords-region: Invalid function: (concat "\\\\" (regexp-opt (quote ("cs" "hepth" "hepph" "heplat" "...
Gabriele's user avatar
  • 1,642
1 vote
1 answer
85 views

What is missing to show the desktop-dirname in the frame title? [duplicate]

I tried to get the value of desktop-dirname into the title of a frame: (setq frame-title-format '("%b Desktop: " (car (last (split-string desktop-dirname "/" t))))) The (...
Markus's user avatar
  • 481
0 votes
0 answers
109 views

alist error when value created using (concat string1 string2) [duplicate]

I'm really confused with what's happening here. In my config for backups I've the line (setq backup-directory-alist '(("" . "~/.emacs.d/backup/per-save"))) and I've a defined a variable in my init....
Chakravarthy Raghunandan's user avatar

15 30 50 per page
1
2 3 4 5