Giter Club home page Giter Club logo

Comments (8)

srustamo avatar srustamo commented on August 31, 2024

This is in keys.el file.

from oremacs.

srustamo avatar srustamo commented on August 31, 2024

Calling it after manually calling whitespace-mode does not give error.

from oremacs.

abo-abo avatar abo-abo commented on August 31, 2024

Can't reproduce.

from oremacs.

srustamo avatar srustamo commented on August 31, 2024

I'm not using the config verbatim, so not surprised if it works for you.
If something jumps to your mind as to the reason, I appreciate your sharing.

Trace.

Debugger entered--Lisp error: (void-variable whitespace-mode)
(format "%s abbrev-mode: %S\n%s debug-on-error: %S\n%s auto-fill-mode: %S\n%s highlight %S\n%s truncate-lines: %S\n%s whitespace-mode: %S\n%s org link display: %S\n" #("a" 0 1 (face hydra-face-pink)) abbrev-mode #("d" 0 1 (face hydra-face-pink)) debug-on-error #("f" 0 1 (face hydra-face-pink)) auto-fill-function #("h" 0 1 (face hydra-face-pink)) highlight-nonselected-windows #("t" 0 1 (face hydra-face-pink)) truncate-lines #("w" 0 1 (face hydra-face-pink)) whitespace-mode #("l" 0 1 (face hydra-face-pink)) org-descriptive-links)
(concat (format "%s abbrev-mode: %S\n%s debug-on-error: %S\n%s auto-fill-mode: %S\n%s highlight %S\n%s truncate-lines: %S\n%s whitespace-mode: %S\n%s org link display: %S\n" #("a" 0 1 (face hydra-face-pink)) abbrev-mode #("d" 0 1 (face hydra-face-pink)) debug-on-error #("f" 0 1 (face hydra-face-pink)) auto-fill-function #("h" 0 1 (face hydra-face-pink)) highlight-nonselected-windows #("t" 0 1 (face hydra-face-pink)) truncate-lines #("w" 0 1 (face hydra-face-pink)) whitespace-mode #("l" 0 1 (face hydra-face-pink)) org-descriptive-links) #("[q]: quit." 1 2 (face hydra-face-blue)))
eval((concat (format "%s abbrev-mode: %S\n%s debug-on-error: %S\n%s auto-fill-mode: %S\n%s highlight %S\n%s truncate-lines: %S\n%s whitespace-mode: %S\n%s org link display: %S\n" #("a" 0 1 (face hydra-face-pink)) abbrev-mode #("d" 0 1 (face hydra-face-pink)) debug-on-error #("f" 0 1 (face hydra-face-pink)) auto-fill-function #("h" 0 1 (face hydra-face-pink)) highlight-nonselected-windows #("t" 0 1 (face hydra-face-pink)) truncate-lines #("w" 0 1 (face hydra-face-pink)) whitespace-mode #("l" 0 1 (face hydra-face-pink)) org-descriptive-links) #("[q]: quit." 1 2 (face hydra-face-blue))))
hydra-show-hint((concat (format "%s abbrev-mode: %S\n%s debug-on-error: %S\n%s auto-fill-mode: %S\n%s highlight %S\n%s truncate-lines: %S\n%s whitespace-mode: %S\n%s org link display: %S\n" #("a" 0 1 (face hydra-face-pink)) abbrev-mode #("d" 0 1 (face hydra-face-pink)) debug-on-error #("f" 0 1 (face hydra-face-pink)) auto-fill-function #("h" 0 1 (face hydra-face-pink)) highlight-nonselected-windows #("t" 0 1 (face hydra-face-pink)) truncate-lines #("w" 0 1 (face hydra-face-pink)) whitespace-mode #("l" 0 1 (face hydra-face-pink)) org-descriptive-links) #("[q]: quit." 1 2 (face hydra-face-blue))) hydra-toggle)
hydra-toggle/body()
funcall-interactively(hydra-toggle/body)
call-interactively(hydra-toggle/body nil nil)
command-execute(hydra-toggle/body)

from oremacs.

abo-abo avatar abo-abo commented on August 31, 2024

whitespace-mode is both a symbol and a function defined in whitespace.el.
Possibly, only the function is autoloaded, resulting in the symbol being undefined.
In any case, a simple (require 'whitespace) before defhydra should fix it.

from oremacs.

srustamo avatar srustamo commented on August 31, 2024

Thanks. I try to follow your way of reducing the use of require. I greped your repo for whitespace-mode. You only define it in keys.el.

I wonder why you don't see this error.

-- mode: ag; default-directory: "~/GitHub/abo-abo/oremacs/" --
Ag started at Tue Mar 28 19:24:20

ag --literal --nogroup --line-number --column --color --color-match 30;43 --color-path 1;32 --nogroup --skip-vcs-ignores --numbers --smart-case --follow --stats -- whitespace-mode .
keys.el:252:5:w whitespace-mode: %`whitespace-mode
keys.el:260:8: ("w" whitespace-mode)
3 matches
1 files contained matches
172 files searched
271739 bytes searched
0.012638 seconds

Ag finished at Tue Mar 28 19:24:20

from oremacs.

abo-abo avatar abo-abo commented on August 31, 2024

Thanks. I try to follow your way of reducing the use of require.

I was actually suggesting to increase it. Your error happens because the whitespace-mode symbol isn't defined.
If you use (require 'whitespace), the symbol will become defined. Just use it before defhydra, not after.

from oremacs.

srustamo avatar srustamo commented on August 31, 2024

I was actually suggesting to increase it

I meant the overall philosophy of this config - autoload/hook stuff to reduce load time.

Thanks for your help. I'm still curious why you don't see this error in your config.

from oremacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.