* emacs ltstat,readlink on slow filesyste.
@ 2009-02-14 12:36 kenneth johansson
2009-02-14 21:38 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: kenneth johansson @ 2009-02-14 12:36 UTC (permalink / raw)
To: emacs-devel
I'm using emacs to edit files on a sshfs filesystem but have a problem
whith emacs doing lstat and readlink for files that do not exist. And on a
slow network this creates interruptions to scrolling in emacs since the lstat
and readlink is taking so long to complete.
I have been trying to figure out what in emacs is doing this but have so
far failed to find a way around it.
to see what is happening do the following.
cd /tmp
num=0; while [ $num -lt 1000 ] ;do echo "line $num" ; num=$((num +1)) ; done >test_file.c
strace -f -etrace=lstat,readlink emacs -Q test_file.c
then just move around in the file and you should see the lstats and readlink calls.
anyone know a way to configure emacs so this is not happening ???
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: emacs ltstat,readlink on slow filesyste.
2009-02-14 12:36 emacs ltstat,readlink on slow filesyste kenneth johansson
@ 2009-02-14 21:38 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2009-02-14 21:38 UTC (permalink / raw)
To: kenneth johansson; +Cc: emacs-devel
> strace -f -etrace=lstat,readlink emacs -Q test_file.c
> then just move around in the file and you should see the lstats and
> readlink calls.
The patch below should fix this problem. Thanks for reporting it.
Note that using M-x report-emacs-bug would have made it even better,
Stefan
--- jit-lock.el.~1.66.~ 2009-01-12 15:41:49.000000000 -0500
+++ jit-lock.el 2009-02-14 16:37:04.000000000 -0500
@@ -45,14 +45,16 @@
"Execute BODY in current buffer, overriding several variables.
Preserves the `buffer-modified-p' state of the current buffer."
(declare (debug t))
- `(with-buffer-unmodified
- (let ((buffer-undo-list t)
+ `(let ((buffer-undo-list t)
(inhibit-read-only t)
(inhibit-point-motion-hooks t)
(inhibit-modification-hooks t)
deactivate-mark
buffer-file-name
buffer-file-truename)
+ ;; Do reset the modification status from within the let, since
+ ;; otherwise set-buffer-modified-p may try to unlock the file.
+ (with-buffer-unmodified
,@body))))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-14 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-14 12:36 emacs ltstat,readlink on slow filesyste kenneth johansson
2009-02-14 21:38 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).