Hi Eli, The attachment is a patch for fixing the error message "Invalid function: with-connection-local-variables" when run the grep in emacs 27. The issue can be reproduced in current version (530067463bffc982f02dcc4f2805d389704575b4) with follow steps, 1. echo -e "hello1\nhello2\nhello3" > /tmp/a 2. "M-x grep" then try  the "... -e hello /tmp/a" to grep the string Emacs 27 will emit the error message and the grep buffer also look strange. Please review the patch in attachment. Thank you.