Skip to main content

Questions tagged [variable-watchers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7 votes
4 answers

Tracking when variables get updated

I have a problem with org-mode's agenda view. While I've set org-agenda-files to '("~/org/") invariably when I finally spin up M-x org-agenda I find that org-agenda-files just points to one org-file. ...
stsquad's user avatar
  • 4,661
5 votes
1 answer

Function add-variable-watcher does not watch "last-command" variable

I have added a watcher function to watch the last-command variable. (defun my-watch (symbol newval op where) (message "Hello")) (add-variable-watcher 'last-command #'my-watch) The ...
Talespin_Kit's user avatar
1 vote
0 answers

Can I somehow hook a variable? [duplicate]

So a function is called when the variable value is changed? add-hook seems to only accept functions.
xeruf's user avatar
  • 354
0 votes
1 answer

Redirect change made to a variable to another variable

I have variables foo and bar. I have a function that modifies foo and I can't change that function. How can I redirect the change made to foo so it applies to bar instead? EDIT : I want this ...
Virgil's user avatar
  • 3