all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35628: Keep track of what file sets variables... through init-file processing
@ 2019-05-08  6:37 積丹尼 Dan Jacobson
  2019-05-08 11:00 ` Noam Postavsky
  0 siblings, 1 reply; 2+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-05-08  6:37 UTC (permalink / raw)
  To: 35628

C-h v runs the command describe-variable.

Its output looks like

   ............. is a variable defined in ‘.......el’.
   Its value is t
   Original value was nil

So describe-variable knows several things including
- the original value of a variable.
- the file where that value was set.

- the current value of a variable.
- the file where that value was set <---- ALAS... it would know that
but that part of its record keeping quits before ~/.emacs is processed!

Try this: put (setq xxxx 2222) in ~/.emacs; restart emacs, and do
describe-variable xxxx.

You might say "Well we only remember one filename. If we remember
.emacs, then we will forget the original file."

Then I would say "You remember two values, then you should remember two files."

P.S., this has nothing to do with
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=910021





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#35628: Keep track of what file sets variables... through init-file processing
  2019-05-08  6:37 bug#35628: Keep track of what file sets variables... through init-file processing 積丹尼 Dan Jacobson
@ 2019-05-08 11:00 ` Noam Postavsky
  0 siblings, 0 replies; 2+ messages in thread
From: Noam Postavsky @ 2019-05-08 11:00 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 35628

forcemerge 29495 35628
quit

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> C-h v runs the command describe-variable.
>
> Its output looks like
>
>    ............. is a variable defined in ‘.......el’.
>    Its value is t
>    Original value was nil

> Try this: put (setq xxxx 2222) in ~/.emacs; restart emacs, and do
> describe-variable xxxx.
>
> You might say "Well we only remember one filename. If we remember
> .emacs, then we will forget the original file."

Only defvar, defcustom, or defconst record a variable definition
filename; setq records nothing (technically, it doesn't "define" a
variable, just changes it).  Maybe something could be hacked with
add-variable-watcher (not sure if it's a good idea though).






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-08 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-08  6:37 bug#35628: Keep track of what file sets variables... through init-file processing 積丹尼 Dan Jacobson
2019-05-08 11:00 ` Noam Postavsky

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.