Questions tagged [buffer-local]

The tag has no usage guidance.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
28 views

How to preserve buffer local variables through `recompile`?

In a compilation buffer, when I set buffer local variable like so: (setq-local foo 'bar) Doing a (recompile) will unset this variable. Is there a way to keep the buffer local value permanent ...
rgrinberg's user avatar
  • 143
1 vote
0 answers
48 views

How can I change buffer local key binding C-h, C-x, M-x in term raw mode?

I'm running a specific console application in a term window (char/raw mode). This application has no need for C-h, C-x, and M-x, so they should just do what they always do in Emacs. However, I don't ...
fred's user avatar
  • 21
1 vote
0 answers
139 views

Buffer-local exec-path?

Is there a way to make buffer-local overrides to exec-path (whose value is normally initialized with the PATH environment variable)? I tried (make-variable-buffer-local 'exec-path) and local ...
Lassi's user avatar
  • 377
1 vote
0 answers
529 views

Can I override global-hl-line-mode in a buffer/window?

I have the following line turning hl-line-mode on globally in my init file: (global-hl-line-mode) Most of the time, that's how I like it. But sometimes I want to turn it off. I'd hoped that I could ...
ivan's user avatar
  • 1,938
0 votes
0 answers
30 views

How to reliably use run-python with venv in buffer-env?

I have a python project using venv under PROJECT_FOLDER/.venv. I wrote an .envrc file there to activate the environment. buffer-env-describe seems to know about it. However, when I am in a python ...
wdkrnls's user avatar
  • 3,707
0 votes
0 answers
15 views

Select font for buffer via [Gtk] GUI font selection tool

From the menu-bar selecting: Option -> Set Default Font... pops up a (Gtk?) font selection tool: Is there a nice way to select font for the current (or specific) buffer without configuration ...
Yotam's user avatar
  • 101
0 votes
0 answers
543 views

Warning: ‘buffer-local-value’ is an obsolete generalized variable in Emacs 29

In Emacs 29.0.60, (setf (buffer-local-value 'foo (current-buffer)) 42) produces the warning above. What's the recommended way of changing a buffer-local variable in another buffer? (the above is an ...
Tamas Papp's user avatar
0 votes
0 answers
57 views

Function that gets the working value of a buffer local variable

I want to write a function that gets the working value of a buffer local variable. Customarily if a buffer local variables is not defined, it might have a default value set up.
Dilna's user avatar
  • 1
0 votes
1 answer
156 views

How to know (in Elisp) what buffer was current when a command is invoked?

I want to give an arbitrary command some buffer-local behavior without advising it. (I can do it by advising, but I want to also be able to do it without advising.) E.g., just looking at some ...
Drew's user avatar
  • 77k
0 votes
0 answers
46 views

Why won't emacs permanently save my buffer-local var?

For many files I have file-local variables which asked me once if they were safe and I could add them permanently to my "trusted" list, never to be asked again. However, I get asked every ...
Webdev Tory's user avatar
0 votes
0 answers
69 views

Highlight matching parenthesis, only in Lisp mode (and maybe a few similar modes)

is there a way to have the global minor mode show-paren-mode functionality as a buffer-local minor mode? I love its behavior but only for Lisp. Searching for a package I can see a number of close ...
q.undertow's user avatar