From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [PATCH] Don't build org-refile-cache if org-refile-use-cache is nil Date: Fri, 21 May 2010 18:14:53 -0400 Message-ID: <874oi0rj9t.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=33952 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFaXx-0002r4-OL for emacs-orgmode@gnu.org; Fri, 21 May 2010 18:18:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFaXw-0007nq-7X for emacs-orgmode@gnu.org; Fri, 21 May 2010 18:18:25 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:57208) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFaXw-0007nj-5I for emacs-orgmode@gnu.org; Fri, 21 May 2010 18:18:24 -0400 Received: from archdesk (adsl-99-181-131-10.dsl.klmzmi.sbcglobal.net [99.181.131.10]) by mail.messagingengine.com (Postfix) with ESMTPSA id 0924249AE99 for ; Fri, 21 May 2010 18:18:21 -0400 (EDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode The function org-get-refile-targets was building org-refile-cache even if org-refile-use-cache was set to nil. This caused every refile attempt to call org-refile-cache-clear and to produce the message "Refile cache has been cleared." --- lisp/org.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d21aa1f..496eceb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9661,7 +9661,8 @@ on the system \"/user@host:\"." (when (= (point) pos0) ;; verification function has not moved point (goto-char (point-at-eol)))))))) - (org-refile-cache-put tgs (buffer-file-name) descre) + (when org-refile-use-cache + (org-refile-cache-put tgs (buffer-file-name) descre)) (setq targets (append tgs targets)) )))) (message "Getting targets...done") -- 1.7.1