You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(defun cider--file-string (file)
"Read the contents of a FILE and return as a string."
(with-current-buffer (find-file-noselect file)
(substring-no-properties (buffer-string))))
That function is called internally by cider-load-buffer.
Likely buffer-string is affected by the narrowing and we'll have to wrap this call in a widen to avoid this problem.
Wrap the (buffer-string) in cider--file-string in
a (save-restriction (widen)), so that if the current buffer is narrowed
by the user we still get the entire string during calls
to (cider-load-buffer)
Wrap the (buffer-string) in cider--file-string in
a (save-restriction (widen)), so that if the current buffer is narrowed
by the user we still get the entire string during calls
to (cider-load-buffer)
Expected behavior
M-x narrow-to-defun
(or similar narrowing command)M-x cider-load-buffer
Loads the code from the (non-narrowed) buffer
Actual behavior
Steps to reproduce the problem
My buffer has aliased namespaces and namespaced keywords using those aliases, eg:
Environment & Version information
CIDER version information
Emacs version
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.3) of 2019-02-12
Operating system
Arch Linux 5.2.0-arch2-1-ARCH
The text was updated successfully, but these errors were encountered: