From 0e5b879eff9c7d7a09cbb721c763455fc14854e1 Mon Sep 17 00:00:00 2001 From: James Harkins Date: Wed, 1 Aug 2012 21:12:01 -0400 Subject: [PATCH] Add rebuild-tag-list defcustom and implement in org-mobile-create-index-file org-mobile-rebuild-tag-list is a boolean. If true, it calls org-global-tags-completion-table to generate a complete list of tags used in agenda files, to put into index.org. If false, it uses org-tag-alist-for-agenda instead (saving time). --- lisp/org-mobile.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index 946e821..2105c5f 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -214,6 +214,18 @@ For now, it is not recommended to change this variable." :group 'org-mobile :type 'string) +(defcustom org-mobile-rebuild-tag-list t + "If non-nil, use (org-global-tags-completion-table) to populate the list +of all tags used in all agenda files. This ensures that all tags are available +on the mobile device. + +If the agenda files are very large, this could be time consuming. Set to nil +to disable the automatic generation of the list. You may then supply the tag list +manually by populating org-tag-alist-for-agenda." + :type 'boolean + :group 'org-mobile +) + (defvar org-mobile-pre-push-hook nil "Hook run before running `org-mobile-push'. This could be used to clean up `org-mobile-directory', for example to @@ -430,7 +442,10 @@ agenda view showing the flagged items." ((listp e) (if (stringp (car e)) (car e) nil)) (t nil))) - org-tag-alist-for-agenda)))) + (if org-mobile-rebuild-tag-list + (org-global-tags-completion-table) + org-tag-alist-for-agenda) + )))) (with-temp-file (if org-mobile-use-encryption org-mobile-encryption-tempfile -- 1.7.9.5