Browse Source

Introduce maxlevel for org-goto using refile interface.

This is just a new option, `org-goto-max-level'.  The smaller this
number is, the faster the org-goto interface will become.
Carsten Dominik 17 years ago
parent
commit
33675c3b0c
2 changed files with 8 additions and 1 deletions
  1. 2 0
      lisp/ChangeLog
  2. 6 1
      lisp/org.el

+ 2 - 0
lisp/ChangeLog

@@ -7,6 +7,8 @@
 	this is possible because the entire hierarchy is scanned anyway.
 	this is possible because the entire hierarchy is scanned anyway.
 	(org-refile-get-location): Don't compare the truenames of files,
 	(org-refile-get-location): Don't compare the truenames of files,
 	this is too slow.
 	this is too slow.
+	(org-goto-max-level): New option.
+	(org-goto): Use `org-goto-max-level'.
 
 
 2008-12-12  Tassilo Horn  <tassilo@member.fsf.org>
 2008-12-12  Tassilo Horn  <tassilo@member.fsf.org>
 
 

+ 6 - 1
lisp/org.el

@@ -1317,6 +1317,11 @@ outline-path-completion  Headlines in the current buffer are offered via
 	  (const :tag "Outline" outline)
 	  (const :tag "Outline" outline)
 	  (const :tag "Outline-path-completion" outline-path-completion)))
 	  (const :tag "Outline-path-completion" outline-path-completion)))
 
 
+(defcustom org-goto-max-level 5
+  "Maximum level to be considered when running org-goto with refile interface."
+  :group 'org-refile
+  :type 'number)
+
 (defcustom org-reverse-note-order nil
 (defcustom org-reverse-note-order nil
   "Non-nil means, store new notes at the beginning of a file or entry.
   "Non-nil means, store new notes at the beginning of a file or entry.
 When nil, new notes will be filed to the end of a file or entry.
 When nil, new notes will be filed to the end of a file or entry.
@@ -4547,7 +4552,7 @@ which the visibility is still unchanged.  After RET is will also jump to
 the location selected in the indirect buffer and expose the
 the location selected in the indirect buffer and expose the
 the headline hierarchy above."
 the headline hierarchy above."
   (interactive "P")
   (interactive "P")
-  (let* ((org-refile-targets '((nil . (:maxlevel . 10))))
+  (let* ((org-refile-targets `((nil . (:maxlevel . ,org-goto-max-level))))
 	 (org-refile-use-outline-path t)
 	 (org-refile-use-outline-path t)
 	 (interface
 	 (interface
 	  (if (not alternative-interface)
 	  (if (not alternative-interface)