unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#69686: Geiser is slow when running with geiser-guile-load-init-file set to t
@ 2024-03-10  1:13 Tomas Volf
  0 siblings, 0 replies; only message in thread
From: Tomas Volf @ 2024-03-10  1:13 UTC (permalink / raw)
  To: 69686

[-- Attachment #1: Type: text/plain, Size: 3123 bytes --]

Hello,

I discovered that when I run Geiser with geiser-guile-load-init-file set to t,
it results in horrible experience, when the REPL seems to technically work, but
anything takes a long time (completion is on order of seconds).

I found out that it is caused by the readline activation.  I am unsure how to
solve this properly.  For me the workaround was to move the readline check
inside the (unless (getenv "INSIDE_EMACS") ...), since I do not need it there.
I was contemplating sending a patch doing just so, but I realized that also
disables readline in any shell mode.  I personally do not care about that (I
only interact with guile from Emacs using Geiser, at least for now), but someone
else might care.

Ignoring the fact that disabling the colors for ansi-term (and other modes?)
might not be necessary neither, I am not sure how to write more robust check.

The patch I was considering is at the end of the email, feel free to use it if
the trade-off would be acceptable.

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index d9f13271d8..fcd1d76c18 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -215,24 +215,26 @@ (define %default-nanorc

 (define %default-dotguile
   (plain-file "dot-guile"
-              "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
-       =>
-       (lambda (module)
-         ;; Enable completion and input history at the REPL.
-         ((module-ref module 'activate-readline))))
-      (else
-       (display \"Consider installing the 'guile-readline' package for
-convenient interactive line editing and input history.\\n\\n\")))
+              ";;; -*- mode: scheme -*-

-      (unless (getenv \"INSIDE_EMACS\")
-        (cond ((false-if-exception (resolve-interface '(ice-9 colorized)))
-               =>
-               (lambda (module)
-                 ;; Enable completion and input history at the REPL.
-                 ((module-ref module 'activate-colorized))))
-              (else
-               (display \"Consider installing the 'guile-colorized' package
-for a colorful Guile experience.\\n\\n\"))))\n"))
+(unless (getenv \"INSIDE_EMACS\")
+  (cond ((false-if-exception (resolve-interface '(ice-9 readline)))
+         =>
+         (lambda (module)
+           ;; Enable completion and input history at the REPL.
+           ((module-ref module 'activate-readline))))
+        (else
+         (display \"Consider installing the 'guile-readline' package for
+convenient interactive line editing and input history.\n\n\")))
+
+  (cond ((false-if-exception (resolve-interface '(ice-9 colorized)))
+         =>
+         (lambda (module)
+           ;; Enable completion and input history at the REPL.
+           ((module-ref module 'activate-colorized))))
+        (else
+         (display \"Consider installing the 'guile-colorized' package
+for a colorful Guile experience.\n\n\"))))\n"))

 (define %default-skeleton-home-config
   (plain-file "default-home-config" "\


Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-10  1:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-10  1:13 bug#69686: Geiser is slow when running with geiser-guile-load-init-file set to t Tomas Volf

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).