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

search-engines doesn't take effect with multiple define-configuration #3138

Closed
Vonfry opened this issue Aug 27, 2023 · 3 comments · Fixed by #3163
Closed

search-engines doesn't take effect with multiple define-configuration #3138

Vonfry opened this issue Aug 27, 2023 · 3 comments · Fixed by #3163
Assignees

Comments

@Vonfry
Copy link

Vonfry commented Aug 27, 2023

Describe the bug
If there are many define-configuration with search-engines, only the first one is applied.

Precise recipe to reproduce the issue

  1. nyxt --no-init
  2. C-SPC, start-swank
  3. connect it with slime-connect
  4. run code block 1.
  5. switch back to nyxt and enter C-n.
  6. C-l and now search-engine a is defined.
  7. run code block 2.
  8. switch back to nyxt and enter C-n. But now C-l doesn't replace a with b.

code block 1

(define-configuration context-buffer
  ((search-engines
    (mapcar
     (lambda (engine) (apply 'make-search-engine engine))
     '(("a"
        "https://en.wikipedia.org/wiki/Special:Search?search=~a&go=Go&ns0=1"
        "https://en.wikipedia.org/"))))))

code block 2

(define-configuration context-buffer
  ((search-engines
    (mapcar
     (lambda (engine) (apply 'make-search-engine engine))
     '(("b"
        "https://en.wikipedia.org/wiki/Special:Search?search=~a&go=Go&ns0=1"
        "https://en.wikipedia.org/"))))))

Information

  • OS name+version: NixOS 23.11 (Tapir)
  • Graphics card and driver: Intel Arc A770
  • Desktop environment / Window manager name+version: XMonad 0.17.2
  • How you installed Nyxt (Guix pack, package manager, build from source): nixpkgs
  • Information from show-system-information:
Nyxt version: 3.6.0
Renderer: GI-GTK
Operating system kernel: Linux 6.4.12
Lisp implementation: SBCL 2.3.7.nixos (Dynamic space size: 3145728000)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-3.6 :NYXT-3 :NYXT-3.6.0 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS :FSET-EXT-STRINGS :NAMED-READTABLES :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CHUNGA :FLEXI-STREAMS :CL-PPCRE :WEBKIT2 :WEBKIT-2.40.5 :WEBKIT-2.40 :WEBKIT-2 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF :CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :GLOBAL-VARS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO :ASDF-SYSTEM-CONNECTIONS :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.6
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY USER-SOURCE-REGISTRY USER-SOURCE-REGISTRY-DIRECTORY DEFAULT-USER-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY-DIRECTORY DEFAULT-SYSTEM-SOURCE-REGISTRY)
Critical dependencies: (/nix/store/mqk5yzrj599bl372dgr5azmzidjsdgnp-cl-cffi-gtk-20230214-git/gtk/cl-cffi-gtk.asd /nix/store/mwj6k848ghpmim55v6jv02wl2nsz8dhb-cl-gobject-introspection-20230618-git/cl-gobject-introspection.asd /nix/store/bqh1y3rn35xihhr443wnrg2r0b6c0b0b-cl-webkit2-3.5.9/webkit2/cl-webkit2.asd)

Output when started from a shell

Nothing useful.

@aadcg
Copy link
Member

aadcg commented Aug 28, 2023

It could be a limitation of define-configuration.

Just for the sake of clarity, @hgluka, invoking C-n runs the command make-window.

@hgluka
Copy link
Contributor

hgluka commented Aug 28, 2023

Yeah, I ran into a similar issue in #3120 (for the new extend-configuration, not define-configuration specifically).

define-configuration works by adding hook handlers for customization. The only problem is that they are executed in reverse order (from last to first).

EDIT: @aadcg would fixing that count as a breaking change? It could maybe break user configs, I think.

@aadcg
Copy link
Member

aadcg commented Aug 28, 2023

EDIT: @aadcg would fixing that count as a breaking change? It could maybe break user configs, I think.

I would say that it's a bug fix, not a breaking change. We don't advertise multiple define-configuration over the same parameter as far as I know. But I'd listen to @jmercouris here too.

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

Successfully merging a pull request may close this issue.

3 participants