Skip to main content

Questions tagged [variables]

for variables in Emacs Lisp, which are symbols with values. The symbol’s name is also called the variable name. Most variable names, by convention, consist of lowercase, ordinary words separated by hyphens.

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

When trying to modify a face through M-x customize-face, I got this error Symbol’s value as variable is void: tool-bar-map and the buffer shows nothing. I retried with all the contents of my .emacs ...
nougako's user avatar
  • 137
0 votes
0 answers
28 views

Every time I start up spacemacs, some variables are not defined. I get: "Symbols function definition is void: nil" However, when I refresh the configuration (SPC f e R), everything works ...
kai90's user avatar
  • 113
3 votes
0 answers
30 views

Is there an Emacs tool that show the dependencies for every file from a project? I have undeclared errors at an Emacs project. If the variable or the function/macro into file is not declare yet, Emacs ...
Mitu Gabriel's user avatar
0 votes
1 answer
111 views

I'm attempting to centralize my key-binds in my org-literate Emacs config, that expands out to a series of use-package declarations. The issue I'm having is with the passing of keys as variables into ...
Alex Stragies's user avatar
0 votes
3 answers
92 views

Consider the following code (defun somefunc (text) (message "hello, somefunc called with %s" text) ) (defun func-caller (func) (func "some string") ) (func-caller 'somefunc) ...
Harald's user avatar
  • 404
0 votes
0 answers
26 views

Version: GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) I have an emacs configuration file which has followed me around through numerous different versions. ...
Alasdair McAndrew's user avatar
1 vote
0 answers
24 views

I have this code: (defun my-test (type) (org-roam-ql-nodes-files '(and (properties "TYPE" (format "%s" type))))) (my-test "wiki") It throws a type error ...
lyndhurst's user avatar
  • 123
0 votes
2 answers
93 views

I'm using the built in use-package macro of GNU Emacs 29.4. When I do (use-package magit :bind ("C-x g" . magit)) magit does not get loaded on emacs startup, as expected. But when I use ...
bird-dancer's user avatar
0 votes
0 answers
36 views

As an aid, let me show you a video: https://streamable.com/c2bnko, though it's not needed to follow this question. I'm going to edebug org-id-alist-to-hash (0:13 in video). First I verify that the ...
meedstrom's user avatar
  • 189
0 votes
1 answer
58 views

How can I tell emacs/e-lisp to check if a user defined variable is a full path to a file or just a folder name? Currently, for one particular mode, user can just define variable for a sqlite database ...
kakk11's user avatar
  • 103
0 votes
1 answer
108 views

I'm getting back in to emacs after a few years away, and my old init.el is throwing up warnings like this: ⛔ Warning (comp): init.el:114:7: Warning: assignment to free variable ‘c-basic-offset’ ⛔ ...
Dan's user avatar
  • 279
0 votes
0 answers
57 views

I'm using emacs29 on linux. At present, if I load a file with the extension '.tsx', and then do 'M-x lsp-mode' I get an error: 'Symbol’s value as variable is void: lsp-ada-project-file' I assume that ...
bob.dobbs's user avatar
  • 111
0 votes
1 answer
129 views

I love using cape in text mode, but I cannot figure out how to stop it from activating in programming modes. Is it possible to either only enable it in certain modes or to disable it in specific modes?...
J. Mini's user avatar
  • 265
3 votes
1 answer
90 views

Dealing with a one-file elisp package, I wonder if there is a nice way to see unused functions and variables after some major refactoring. I can go through the code and do xref-find-references. But ...
Harald's user avatar
  • 404
3 votes
1 answer
143 views

When I run the following three lines with eval-region (defcustom custom-var "some-custom-value" "for testing only") (setq indirectRef (make-symbol "custom-var")) (message ...
Harald's user avatar
  • 404
1 vote
1 answer
64 views

If I modify the isearch-filter-predicate variable with add-function and I do: (message "%s" isearch-filter-predicate) I get: "#[128 \304\300"\205\0\304\301"\207 [skip-...
Gabriele's user avatar
  • 1,720
0 votes
1 answer
47 views

I have to remap a lot of keys in existing maps while still remembering the old value of the map. To do that, I wrote some functions that go through lists of keys and lists of keymaps: (defun Daselt/...
Alexander Praehauser's user avatar
0 votes
1 answer
89 views

I'm working on a plugin that allows avy to act from a distance and immediately return to its starting position, which mostly works. However, there is a problem in that an action, such as the deletion ...
Alexander Praehauser's user avatar
0 votes
2 answers
53 views

I have a package that changes its behavior based on several custom variables, and I want to set up scenarios based on those settings. Here is a step I wrote, but it doesn't seem to have any effect: (...
Daniel Doherty's user avatar
1 vote
2 answers
603 views

I have to back up and restore a bunch of variables in Emacs and thought I'd be clever about it, put the variable names into a list, then create a function that defines for each item in the list a new ...
Alexander Praehauser's user avatar
1 vote
0 answers
105 views

I'm trying to find a way to run a function whenever a specific variable is accessed or read in Emacs Lisp. I want to know which functions are using this variable, but I don't know them beforehand. I'm ...
HappyFace's user avatar
  • 930
1 vote
1 answer
72 views

What options are there for enhancing static analysis of emacs lisp code? Either via builtin flags or third party packages? I'm mainly referring to unused packages/modules and requires. I'm aware of ...
Nordlöw's user avatar
  • 577
0 votes
1 answer
289 views

I use registers (such as C-x r s 0) as a multi-valued clipboard that can save different contents (copy-to-register). Then I can "paste" the value using C-x r i 0. This is really convenient, ...
tinlyx's user avatar
  • 1,454
1 vote
1 answer
146 views

I keep all my commonly used latex packages in one custom package, including the referencing package cleveref. However, reftex is configured to only provide insertion of cleveref referencing commands ...
Alexander Praehauser's user avatar
0 votes
1 answer
246 views

Is there any buffer in emacs' gdb that can print selected variables (e.g. print *display) on each change (step, next, finish etc.)? It would be useful as opposed to typing print variable each time.
Daniel Krajnik's user avatar
11 votes
1 answer
4k views

I'm a bit uncertain about which method to use for setting a variable: setq, customize-set-variable, or setopt. I did some research online, and it seems that opinions on this matter are quite varied. ...
Zoli's user avatar
  • 539
0 votes
2 answers
131 views

I'm trying to define a buffer-local variable inside a function using setq-local in a function here is the function definition: (defun set-buffer-local-variable () (with-current-buffer (get-buffer-...
ntriisii's user avatar
3 votes
2 answers
463 views

Emacs 29.1 introduced new functions to install packages directly from source. Configuring it to download from the latest commit works fine, but I can't find how to download from a specific commit ...
Balto's user avatar
  • 31
1 vote
1 answer
296 views

The compiler will issue a warning message Warning: assignment to free variable -/var if you evaluate the following forms: ;;; -*- lexical-binding: t; -*- (defvar -/var) (byte-compile (let (_) ...
shynur's user avatar
  • 6,200
1 vote
1 answer
105 views

Whenever I call (describe-variable) , there is no history of what variables I've recently viewed. Is there a way to enable it to have some kind of history?;)
Jason Hunter's user avatar
  • 1,236
0 votes
1 answer
168 views

(eval-after-load "dired" '(progn (define-key dired-mode-map "c" 'dired-create-empty-file) (define-key dired-mode-map "r" 'dired-do-compress-to))) Why is the ...
user129393192's user avatar
0 votes
0 answers
66 views

I'm having an issue setting custom Emacs variables. When I try to set the variable pressing STATE I run into this error: (wrong-type-argument stringp custom-variable-set) This is the full debugger ...
Enrico Pirani's user avatar
0 votes
1 answer
55 views

How can I store the selected value in a let variable when using completing-read ? (let ( (selc '("Lower-Skeleton" "Upper-Skeleton")) ) (completing-read "Vista: " selc ...
Dilna's user avatar
  • 1,473
1 vote
1 answer
150 views

I was working on a mode, setq'ed them with my functions and... emacs broke (really) For some reason these variable are global. I made them buffer-local, but is there a good reason for having them ...
Lorenzo Marcantonio's user avatar
1 vote
1 answer
125 views

I cannot call emacs-lisp-docstring-fill-column mentioned here or url-link mentioned here. Neither using M-x nor in code. I use Emacs 28.2. Are these commands provided by a package ? As far as I read, ...
Tristan's user avatar
  • 459
2 votes
2 answers
248 views

Following this answer, I put the following lines in a .dir-locals.el file: ((latex-mode (TeX-engine . default) (mode . latex ) (TeX-master . "main") (ispell-buffer-session-localwords ...
tigerjack's user avatar
  • 175
1 vote
1 answer
158 views

I want to create an Emacs lisp function which composes a path of a diary file which has the format <some directory>/t<timestamp>.org and determines whether or not such file exists. I ...
Linus Torvalds is a Nazi's user avatar
0 votes
0 answers
63 views

I occasionally get this warning while running eshell: Warning (comp): tramp-loaddefs.el.gz:745:2478: Warning: reference to free variable ‘tramp-remote-path’ and was wondering how to fix it. According ...
user129393192's user avatar
2 votes
0 answers
227 views

I'm using Emacs 29.0.60 If I open emacs -q, open a Emacs Lisp buffer with FlyMake enabled and type this: ;;; init.el --- summary ;;; Commentary: ;;; Code: (setq var1 2) (customize-set-variable var2 ...
cidra's user avatar
  • 113
0 votes
2 answers
254 views

I need to retrieve a local, lexical, runtime variable from a function, but I'm unable to modify the function to return it because it is from an external library. The variable I'm unable to reach is ...
sextrism's user avatar
0 votes
2 answers
203 views

EDIT: Changed "load" to "visit" I want to set a variable when a specific file is visited, for example "package.json". Note I don't want to set a variable when any json ...
Daniel Pérez's user avatar
0 votes
1 answer
144 views

Is there a way to link to an orgmode variable's value? Or at least export it? I can get a link to jump to the variable definition, but not display its value or export. for example the text in ...
stayfrostypeople's user avatar
1 vote
1 answer
70 views

I'm figuring out complex algebraic calculation in gnu-calc. Suppose: after many long calculation I got following algebraic expression: -8 * a - 2 * b + 2 * b * i - 40 * i - 8 and I want the imaginary ...
Garid's user avatar
  • 864
4 votes
0 answers
275 views

The GNU Emacs Lisp Reference Manual, 12.5 Defining Global Variables: If you use a defconst or defvar special form while the variable has a local binding (made with let, or a function argument), it ...
shynur's user avatar
  • 6,200
0 votes
3 answers
63 views

I have the following defvar that declares a variable and gives it a string value. Notice, I used the word "gives" but I was wondering if "bind" would be the proper one to use. (...
Zoli's user avatar
  • 539
0 votes
2 answers
311 views

I want to do this. (let ((myvar "my/variable") (myval "Some Value")) (setq myvar myval)) The manual method is: (setq "my/variable" "Some Value") Here ...
ritchie's user avatar
  • 169
1 vote
1 answer
141 views

I know this may sound silly but what does defvar do in the code below? Does it define a variable that hold a capture template? or we say that the template is bound to the variable capture-template-...
Zoli's user avatar
  • 539
0 votes
0 answers
48 views

Pressing C-h v I can see the value of this variable. In my init.el I've commented out this variable assignment: ;;(setq org-agenda-files '( "~/org/*.org")), and restarted Emacs. But if I ...
RenatoP's user avatar
  • 129
1 vote
1 answer
71 views

Why does (set-auto-mode) remove the local variable binding and how I can keep the local binding around? (defvar-local test-var nil) (setq test-var t) (message "%s" test-var) ;; t (set-auto-...
breatheoutbreathein's user avatar
2 votes
2 answers
123 views

I want to do simple replacements in a LaTeX source using something like that: ;; test-1 (query-replace-regexp (regexp-quote FOO) (concat "Foo " ...
Onner Irotsab's user avatar

1
2 3 4 5