From 322754077c488cd96a9479ae95c7e5cae2b06b7f Mon Sep 17 00:00:00 2001 From: Andreas Seltenreich Date: Wed, 20 Oct 2010 10:34:13 +0200 Subject: [PATCH 1/1] Don't unnecessarily run file-truename on remote files when checking drafts. * gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily run file-truename on remote files. This can be expensive and even prevent one from editing drafts if some unrelated buffer has a stale connection. --- lisp/ChangeLog | 7 +++++++ lisp/gnus-draft.el | 2 ++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a798cec6..e9096cfc9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2010-10-20 Andreas Seltenreich + + * gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily + run file-truename on remote files. This can be expensive and even + prevent one from editing drafts if some unrelated buffer has a stale + connection. + 2010-10-20 Katsumi Yamaoka * shr.el (shr-find-fill-point): Shorten line if the preceding char is diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el index d53873045..e397a701d 100644 --- a/lisp/gnus-draft.el +++ b/lisp/gnus-draft.el @@ -310,6 +310,8 @@ Obeys the standard process/prefix convention." (while buffs (set-buffer (setq buff (pop buffs))) (if (and buffer-file-name + (equal (file-remote-p file) + (file-remote-p buffer-file-name)) (string-equal (file-truename buffer-file-name) (file-truename file)) (buffer-modified-p)) -- 2.25.1