Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vi mode doesn't work: undefined function: COMMON-LISP-USER::ADD-TO-DEFAULT-LIST #418

Closed
petRUShka opened this issue Sep 28, 2019 · 8 comments

Comments

@petRUShka
Copy link

Describe the bug
Next doesn't start with following line in config:

cat /home/user/.config/next/init.lisp                                                                                                                                                                  
(add-to-default-list 'vi-normal-mode 'buffer 'default-modes)

Traceback:

 <INFO> [15:54:03] next base.lisp (start) - NEXT:+VERSION+: "1.3.2" 
 <INFO> [15:54:03] next base.lisp (load-lisp-file form-fun-4) -
  Loading configuration from /home/user/.config/next/init.lisp...

; file: /home/user/.config/next/init.lisp
; in: ADD-TO-DEFAULT-LIST 'VI-NORMAL-MODE
;     (ADD-TO-DEFAULT-LIST 'VI-NORMAL-MODE 'BUFFER 'DEFAULT-MODES)
; 
; caught STYLE-WARNING:
;   undefined function: COMMON-LISP-USER::ADD-TO-DEFAULT-LIST
; 
; compilation unit finished
;   Undefined function:
;     ADD-TO-DEFAULT-LIST
;   caught 1 STYLE-WARNING condition
While evaluating the form starting at line 1, column 0
  of  <WARN> [15:54:03] next base.lisp (load-lisp-file fun1) -
  Error: we could not load the Lisp file /home/user/.config/next/init.lisp: The
                                                                                function
                                                                                COMMON-LISP-USER::ADD-TO-DEFAULT-LIST
                                                                                is
                                                                                undefined.
#P"/home/user/.config/next/init.lisp":
Unhandled SIMPLE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                    {10005E04C3}>:
  Could not load the lisp init file /home/user/.config/next/init.lisp: 
The function COMMON-LISP-USER::ADD-TO-DEFAULT-LIST is undefined.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005E04C3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SIMPLE-ERROR "Could not load the lisp init file ~a: ~&~a" {1004863F03}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SIMPLE-ERROR "Could not load the lisp init file ~a: ~&~a" {1004863F03}>)
2: (INVOKE-DEBUGGER #<SIMPLE-ERROR "Could not load the lisp init file ~a: ~&~a" {1004863F03}>)
3: (UIOP/IMAGE:HANDLE-FATAL-CONDITION #<SIMPLE-ERROR "Could not load the lisp init file ~a: ~&~a" {1004863F03}>)
4: (SB-KERNEL::%SIGNAL #<SIMPLE-ERROR "Could not load the lisp init file ~a: ~&~a" {1004863F03}>)
5: (ERROR "Could not load the lisp init file ~a: ~&~a" #P"/home/user/.config/next/init.lisp" #<UNDEFINED-FUNCTION ADD-TO-DEFAULT-LIST {1004862093}>)
6: (NEXT::LOAD-LISP-FILE #P"/home/user/.config/next/init.lisp" :INTERACTIVE T)
7: (NEXT:START)
8: (NEXT:ENTRY-POINT)
9: ((LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE))
10: (UIOP/IMAGE:CALL-WITH-FATAL-CONDITION-HANDLER #<CLOSURE (LAMBDA NIL :IN UIOP/IMAGE:RESTORE-IMAGE) {10045846DB}>)
11: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
12: ((FLET "WITHOUT-INTERRUPTS-BODY-14" :IN SAVE-LISP-AND-DIE))
13: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))

Precise recipe to reproduce the issue

Add above-mention line and start next/

Information

  • OS name+version: Arch linux
  • Kernel name+version: 4.19
  • Desktop environment / Window manager name+version: dwm
  • Next version (from =M-x next-version= or =next --version=): 1.3.2
  • How you installed Next (Guix pack, package manager, build from source): AUR
@Ambrevar
Copy link
Member

Ambrevar commented Sep 28, 2019 via email

@jmercouris
Copy link
Member

It would be like reinventing a debugger if we do that, that's what the conditions and signals are for. If we go that far we might as well add an interactive debugger on start-up for faulty inits (with the appropriate restarts selectable)

Thoughts?

@Ambrevar
Copy link
Member

Ambrevar commented Sep 28, 2019 via email

@petRUShka
Copy link
Author

petRUShka commented Sep 28, 2019

@Ambrevar, adding (in-package :next) make it work! Thanks.

Possibly that line should be mentioned in manual. Because init.lisp file is absence. And following the manual take one to the error.

So new steps to reprode:

  1. Be non familiar with lisp
  2. Be a new user of Next Browser
  3. Be a vimer
  4. Follow keybinding manual section to configure Next for vim-like
  5. Face the above-mentioned error.

So possible solutions:

  1. Add (in-package :next) to the manual
  2. Generate init.lisp with (in-package :next) on first start
  3. Check init.lisp if it has (in-package :next) on any start before loading the file

@Ambrevar
Copy link
Member

Ambrevar commented Sep 28, 2019 via email

@just1602
Copy link

just1602 commented Dec 9, 2019

The line in the documentation about setting vi keybind by default does not render correctly, it'd be nice to fix it. :)
image

@Ambrevar
Copy link
Member

Ambrevar commented Dec 10, 2019 via email

@Ambrevar
Copy link
Member

Closing this, feel free to reopen if there is anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants