help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to inspect hook variables with byte compilation


From: Robert Pluim
Subject: Re: How to inspect hook variables with byte compilation
Date: Wed, 04 Oct 2023 16:25:10 +0200

>>>>> On Thu, 28 Sep 2023 08:43:47 -0700, Ross Vandegrift <ross@kallisti.us> 
>>>>> said:

    Ross> Hi Robert,
    Ross> On Thu, Sep 28, 2023 at 10:02:21AM +0200, Robert Pluim wrote:
    Ross> Output:
    >> 
    Ross> org-mode-hook is a variable defined in ‘org.el’.
    >> 
    Ross> Its value is shown below.
    >> 
    Ross> Mode hook for Org mode, run after the mode was turned on.
    >> 
    Ross> This variable may be risky if used as a file-local variable.
    Ross> You can customize this variable.
    >> 
    Ross> Value:
    Ross> (#f(compiled-function
    Ross> ()
    Ross> #<bytecode -0x1356c8e47eb756a0>)
    Ross> #f(compiled-function
    Ross> ()
    Ross> #<bytecode -0x1356c8e6dc1bfaa0>)
    Ross> org-babel-result-hide-spec org-babel-hide-all-hashes)
    Ross> Original value was nil
    >> 
    >> Find out which file is setting the org-mode-hook, and temporarily move
    >> its .elc version out of the way.

    Ross> That's a bit of a puzzler too - the only place my config modifies it 
is
    Ross> in ~/.emacs.d/init.el.  AFAIK, init.el isn't byte-compiled?  At least 
I
    Ross> can't find any init elc files:

    Ross>   $ find ~/.emacs.d -name 'init*.elc'
    Ross>   $

    Ross> I tried moving all of the binary eln files which matched 
`org-mode-hook`
    Ross> out of the way, but it didn't help.

Then thereʼs something in org thatʼs setting it. Try

(add-variable-watcher 'org-mode-hook (lambda (s n o w)
                                        (debug)))

which will give you a backtrace when something changes it.

Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]