[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket 0be1797 122/191: A better solution to the fu
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket 0be1797 122/191: A better solution to the funky filename problem |
Date: |
Sun, 1 Aug 2021 18:32:13 -0400 (EDT) |
branch: elpa/geiser-racket
commit 0be179750132152e4f04354d28fc8376c6011f1f
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.
---
elisp/geiser-racket.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index 1c36877..24712bd 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -97,7 +97,7 @@ This function uses `geiser-racket-init-file' if it exists."
,@(and init-file (file-readable-p init-file) (list "-f" init-file))
"-f" ,(expand-file-name "geiser/startup.rkt" rackdir))))
-(defconst geiser-racket--prompt-regexp "\\(mzscheme\\|racket\\)@.*> ")
+(defconst geiser-racket--prompt-regexp "\\(mzscheme\\|racket\\)@[^ ]*> ")
(defun geiser-racket--startup (remote)
(if geiser-image-cache-dir
- [nongnu] elpa/geiser-racket 58657b4 056/191: Better EOT token for more robust communication, (continued)
- [nongnu] elpa/geiser-racket 58657b4 056/191: Better EOT token for more robust communication, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket fd14450 062/191: Support for implementation-specific font lock keywords, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 309ca6d 069/191: Racket: more information in symbol documentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a787a26 071/191: Bug fix: don't intern symbols read by scheme reader, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c4b8c1a 080/191: Racket: geiser-add-to-load-path implemented, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a9405d0 095/191: Racket: reading into elisp-land the cache dir as needed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 20cc118 083/191: Leftover code from the previous patch removed, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket ce1f555 085/191: Racket: capturing and displaying standard error during evaluation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c9008a6 091/191: [WIP] Draw images inline in the Racket REPL., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 62e2006 114/191: Indentation for Racket's struct, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 0be1797 122/191: A better solution to the funky filename problem,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket e17099e 166/191: Skip expression quote when getting a racket symbol, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 3079c3a 163/191: Racket: displaying graphics in structured objects, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c0a617f 173/191: Begin the summary lines of all elisp libraries with three semicolons, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 99acb21 175/191: Fix indentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 6bc2bc2 176/191: Fix indentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 74a223e 008/191: Racket: autodoc for struct constructors, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 4c3903a 063/191: Better module help, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1f64738 066/191: Racket: showing submodules in module help, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1f2bc48 070/191: Racket: more information in symbol documentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket cd7378b 089/191: Racket: indentation for all 'for' forms, Philip Kaludercic, 2021/08/01