unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: 69686@debbugs.gnu.org
Subject: bug#69686: Geiser is slow when running with geiser-guile-load-init-file set to t
Date: Sun, 10 Mar 2024 02:13:04 +0100	[thread overview]
Message-ID: <Ze0JIBx09sBwpPKD@ws> (raw)

[-- 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 --]

                 reply	other threads:[~2024-03-10  1:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ze0JIBx09sBwpPKD@ws \
    --to=~@wolfsden.cz \
    --cc=69686@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).