From 9a8674cf75988cb6f4e68595be709d495b598707 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 27 Oct 2014 11:55:24 +0100 Subject: make column-order a custom variable --- grid-engine-mode.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/grid-engine-mode.el b/grid-engine-mode.el index be29af3..eefe1d3 100644 --- a/grid-engine-mode.el +++ b/grid-engine-mode.el @@ -19,6 +19,8 @@ "The full path to the qstat executable.") (defcustom grid-engine-user nil "The grid engine user. Defaults to the logged in user's name.") +(defcustom grid-engine-column-order '(job-id time priority owner state) + "The order of job columns to be displayed. The following keys are valid: job-id, priority, name, owner, state, time, queue, slots.") (defun grid-engine-setup () (setq grid-engine-map (make-keymap)) @@ -41,8 +43,6 @@ (grid-engine-update-list-format) (tabulated-list-init-header)) - -(setq column-order '(job-id time priority owner state)) (defun grid-engine-update-list-format () (setq columns '((job-id . ("Job-ID" 10 nil)) (priority . ("Priority" 10 nil)) @@ -55,7 +55,7 @@ (setq tabulated-list-format (vconcat (mapcar (lambda (key) (cdr (assoc key columns))) - column-order)))) + grid-engine-column-order)))) (defun grid-engine--raise-buffer (&optional buffer) (when buffer @@ -101,8 +101,8 @@ (defun job-to-row (job) (let ((contents (vconcat (mapcar (lambda (key) - (field-as-text key job)) - column-order)))) + (field-as-text key job)) + grid-engine-column-order)))) (list job contents))) (defun mkjob-alist (subtree) -- cgit v1.2.3