atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.91k stars 413 forks source link

Temporary history doesn't work with custom profile #2943

Open ghost opened 1 year ago

ghost commented 1 year ago

Describe the bug Following the example provided in nyxt:manual#data-paths-and-data-profiles, I tried to assemble a custom profile to allow for a temporary history file like this.

(define-class tmp-profile (nyxt-profile)
  ((files:name :initform "nyxt-tmp"))
  (:documentation "Temporary profile."))

(defmethod files:resolve ((profile tmp-profile)
                          (file history-file))
  "Store history in a temporary directory."
  (sera:path-join
   (files:expand
    (make-instance 'nyxt-temporary-directory))
   (uiop:relativize-pathname-directory
    (call-next-method))))

(define-configuration web-buffer
    ((profile (make-instance
               (or (find-profile-class
                    (getf *options* :profile))
                   'tmp-profile)))))

However, the default Nyxt history file at ~/.local/share/nyxt/history/default.lisp keeps being populated. I'd appreciate if you could pinpoint what part of my configuration is wrong.

Precise recipe to reproduce the issue

For website-specific issues: Can you reproduce this issue with Epiphany / GNOME Web (https://wiki.gnome.org/Apps/Web)?

Information

Nyxt version: 3 Renderer: GI-GTK Operating system kernel: Linux 6.2.10 Lisp implementation: SBCL 2.3.2 (Dynamic space size: 3221225472) Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-3 :CLIPBOARD-CONTENT-METHOD :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS :FSET-EXT-STRINGS :NAMED-READTABLES :NJSON :GLOBAL-VARS :SWANK :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CL-PPCRE :CHUNGA :FLEXI-STREAMS :WEBKIT2 :WEBKIT2-2.38 :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 :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.5 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: (/gnu/store/p6qw3ssd783k0cjkc67mhzmngkc7z57n-sbcl-cl-cffi-gtk-0.11.2-2.e9a46df/share/common-lisp/sbcl/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /gnu/store/vqi35c495jrfvzrx8ckcyd9ywp76051p-sbcl-cl-gobject-introspection-0.3-1.d0136c8/share/common-lisp/sbcl/cl-gobject-introspection/cl-gobject-introspection.asd /gnu/store/8z5nyp2ys1i728m0nl387hiaf637gfhl-sbcl-cl-webkit-3.5.7/share/common-lisp/sbcl/cl-webkit/webkit2/cl-webkit2.asd)

If you can't run show-system-information, try nyxt --system-information from a shell. It this still does not work, please provide the following:

Output when started from a shell

aartaka commented 1 year ago

Hmmmmm. I'm clueless as to what exactly goes wrong. @Ambrevar is the best person to give a qualified answer, I guess.

ghost commented 1 year ago

@Ambrevar Sorry to ping you again, but I can't find the culprit of this issue. Any hints?

Ambrevar commented 1 year ago

Will get back to it Very Soon©, stay tuned :)

dcunited001 commented 6 months ago

did y'all ever figure this out?

I'm hoping to set up some site-specific browser profiles using nyxt by