summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-01-26 10:57:47 +0100
committerBastien Guerry <bzg@altern.org>2013-01-26 10:57:47 +0100
commit36dba0cf6e0f3d958aaff4e9df5a6977ee0953fa (patch)
tree77bdd745050e4965b7a5e65d1b83a0bceb5b41b8
parent582cca58060f92bf6acd19bd6139dd991aae170c (diff)
downloadorg-mode-36dba0cf6e0f3d958aaff4e9df5a6977ee0953fa.tar.gz
org.el (org-agenda-inhibit-startup-visibility-cycling): New option
* org.el (org-agenda-inhibit-startup-visibility-cycling): New option. (org-agenda-prepare-buffers): Use it to speed up the agenda generation. This change will boost agenda creation *a lot*, especially for people using many agenda files. See the docstring of the new option for details.
-rw-r--r--lisp/org.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el
index afc2b7a..7467db7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16662,6 +16662,20 @@ effort string \"2hours\" is equivalent to 120 minutes."
:type '(alist :key-type (string :tag "Modifier")
:value-type (number :tag "Minutes")))
+(defcustom org-agenda-inhibit-startup-visibility-cycling t
+ "Turn off visibility cycling when preparing agenda buffers.
+
+When preparing agenda buffers, Org visits agenda files. When
+this variable is `t' (the default), the visited buffers for
+agenda files will not honor `org-startup-folded' or any
+#+STARTUP: fold option. Turning this option off may slow down
+the generation of agenda, both because folding takes time and
+because finding entries in folded buffers takes longer than
+finding entries in unfolded ones."
+ :type 'boolean
+ :version "24.3"
+ :group 'org-agenda)
+
(defun org-duration-string-to-minutes (s &optional output-to-string)
"Convert a duration string S to minutes.
@@ -17001,6 +17015,8 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
(pc '(:org-comment t))
(pall '(:org-archived t :org-comment t))
(inhibit-read-only t)
+ (org-inhibit-startup-visibility-stuff
+ org-agenda-inhibit-startup-visibility-cycling)
(rea (concat ":" org-archive-tag ":"))
bmp file re)
(save-excursion