[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket 90c38d6 121/191: A better solution to the fu
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket 90c38d6 121/191: A better solution to the funky filename problem |
Date: |
Sun, 1 Aug 2021 18:32:12 -0400 (EDT) |
branch: elpa/geiser-racket
commit 90c38d635d8ebfc005e24e236f34594b4e59dd54
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
A better solution to the funky filename problem
So, the problem was that our regexp for a Racket prompt didn't take
into account that filenames could contain white spaces: "@[^ ]*> ". A
simple solution was accepting them: "@[^>]+> " won't work because '>'
is also a valid character in filenames, so we went for "@.*> ".
The drawback is that finding the beginning of the prompt (e.g. in C-a)
fails when you're writing things like:
racket@foo bar.rkt> (> 2 3)
because here comint believes that the prompt is "racket@foo bar.rkt> (> "
And that could have side-effects elsewhere. So what i've done is
simply changing the way white-space is (not) printed in the prompt,
substituting it by underscores. That way, whe can go back to the
initial regexp, comint doesn't get confused, and users can easily
infer that "@foo_bar.rkt>" is actually referring to their
"foo bar.rkt" file.
---
geiser/user.rkt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/geiser/user.rkt b/geiser/user.rkt
index aef1862..b7519b2 100644
--- a/geiser/user.rkt
+++ b/geiser/user.rkt
@@ -1,6 +1,6 @@
;;; user.rkt -- global bindings visible to geiser users
-;; Copyright (C) 2010, 2011, 2012 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -87,8 +87,8 @@
(define geiser-prompt
(lambda ()
- (printf "racket@~a> "
- (namespace->module-name (current-namespace) (last-entered)))))
+ (let ([m (namespace->module-name (current-namespace) (last-entered))])
+ (printf "racket@~a> " (regexp-replace* " " m "_")))))
(define (geiser-prompt-read prompt)
(make-repl-reader (geiser-read prompt)))
- [nongnu] elpa/geiser-racket c5e7ea8 100/191: Little cleanups, (continued)
- [nongnu] elpa/geiser-racket c5e7ea8 100/191: Little cleanups, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7cefe7f 074/191: No more interning in the scheme reader, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket f9fc642 102/191: Racket: fix for enter!, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 5e2184b 103/191: racket: displaying images also during evaluations, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 81ecf42 118/191: More Racket for/* forms indentation from Diogo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket b924983 108/191: Autoload cookies in geiser.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a22f8e2 117/191: Indentation rule for match/values (Diogo F.S. Ramos), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 3e306cf 112/191: Racket: indentation for `local'., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket b86cf1f 116/191: Configurable keyword case sensitivity, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e4707d2 105/191: racket: autodoc for PLAI's define-type, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 90c38d6 121/191: A better solution to the funky filename problem,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket cc2b8a3 126/191: Racket: fixing help when REPL is in a module, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c897d9e 130/191: Racket: fixing error backtrace cleansing, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 3d41f16 133/191: Racket: correct font-lock for define/match, again, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e855c05 135/191: racket: , enter submodules, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 023cb2b 137/191: racket: indentation for module*, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1e62c8f 151/191: Let's make it *any* submodule, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a608b02 150/191: Racket: new commands to show and hide test submodules, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 14330b4 148/191: Racket: not loading errortrace by default, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 44740d1 152/191: Syntax error fixed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 5e0fced 161/191: Possible fix for scanning problem, Philip Kaludercic, 2021/08/01