* jsnellman [2006-11-26 19:08+0100] writes:
Log Message:
- swank-source-file-cache.lisp (buffer-first-change): Check
whether a file exists before trying load it into the source cache.
[...]
(defimplementation buffer-first-change (filename) "Load a file into the cache when the user modifies its buffer. This is a win if the user then saves the file and tries to M-. into it."
- (unless (source-cached-p filename)
- (ignore-errors (source-cache-get filename (file-write-date filename)))))
- (unless (or (source-cached-p filename)
(not (ignore-errors (probe-file filename))))
- (ignore-errors
(source-cache-get filename (file-write-date filename)))))
I don't understand this change. If the file doesn't exist then OPEN will just fail (which is already handled). And even if PROBE-FILE succeeds, OPEN can still fail, e.g. because some other process deleted the file in between.
Which problem does the patch solve?
heller@common-lisp.net wrote:
I don't understand this change. If the file doesn't exist then OPEN will just fail (which is already handled). And even if PROBE-FILE succeeds, OPEN can still fail, e.g. because some other process deleted the file in between.
Which problem does the patch solve?
The first change made to a buffer that was created using find-file on a file that didn't yet exist would cause a Slime REPL to pop up and take focus. The mode-line of the original buffer would show "(Lisp Slime|eval...)". Some features like arglist-echoing would temporarily stop working in all Slime buffers.
This only occured with fairly recent versions of Slime, with both SBCL and CMUCL. Nothing out of the ordinary in either *inferior-lisp* or *slime-events*.