emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] * org-publish.el (org-publish-find-date): optimization
@ 2011-04-19 15:41 Manuel Giraud
  2011-04-19 16:12 ` Bernt Hansen
  2011-05-02  9:13 ` [Accepted] " Carsten Dominik
  0 siblings, 2 replies; 4+ messages in thread
From: Manuel Giraud @ 2011-04-19 15:41 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Manuel Giraud

Hi,

elp reports important speed gain with this patch to find an org file date.

---
 lisp/org-publish.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index e944eea..7470ee2 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -852,7 +852,7 @@ system's modification time.
 It returns time in `current-time' format."
   (let ((visiting (find-buffer-visiting file)))
     (save-excursion
-      (switch-to-buffer (or visiting (find-file file)))
+      (switch-to-buffer (or visiting (find-file-noselect file nil t)))
       (let* ((plist (org-infile-export-plist))
 	     (date (plist-get plist :date)))
 	(unless visiting
-- 
1.7.3.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-02  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19 15:41 [PATCH] * org-publish.el (org-publish-find-date): optimization Manuel Giraud
2011-04-19 16:12 ` Bernt Hansen
2011-04-19 16:27   ` Manuel Giraud
2011-05-02  9:13 ` [Accepted] " Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).