diff options
author | Marc-Oliver Ihm <marc@ihm.name> | 2014-02-01 23:11:18 +0100 |
---|---|---|
committer | Marc-Oliver Ihm <marc@ihm.name> | 2014-02-01 23:11:18 +0100 |
commit | 8b1ffc717bbad83a9e0df644583c9b7945b59774 (patch) | |
tree | ac2bab1eca316598e72f98104345805915345ebe | |
parent | 8f91f657e16bf36fdbe071416618ad6316bf1681 (diff) | |
download | org-mode-8b1ffc717bbad83a9e0df644583c9b7945b59774.tar.gz |
org-index.el: Version 2.42, sorting for x-columns
-rw-r--r-- | contrib/lisp/org-index.el | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/contrib/lisp/org-index.el b/contrib/lisp/org-index.el index 8f6424b..ce53947 100644 --- a/contrib/lisp/org-index.el +++ b/contrib/lisp/org-index.el @@ -5,7 +5,7 @@ ;; Author: Marc Ihm <org-index@2484.de> ;; Keywords: outlines, hypermedia, matching ;; Requires: org -;; Version: 2.4.0 +;; Version: 2.4.2 ;; This file is not part of GNU Emacs. @@ -72,14 +72,15 @@ ;;; Change Log: -;; [2014-01-28 Tu] Version 2.4.1: +;; [2014-02-01 Sa] Version 2.4.2: ;; - Follow mode in occur-buffer +;; - Reorder for x-columns ;; ;; [2014-01-02 Th] Version 2.4.0: ;; - New command "put" to store a nodes reference in a property ;; - New functions org-index-new-line and org-index-get-line ;; offer access to org-index from other lisp programs -;; - New flags p,x1,x2 and x3 +;; - New flag p, new columns x1,x2 and x3 ;; - Major Code refactoring ;; - Regression tests with ert ;; - Lots of bugfixes @@ -1003,11 +1004,13 @@ retrieves the value of the count-column for reference 12. (if (eq what 'reorder) (setq reorder-once (intern - (concat ":" - (org-icompleting-read - "Please choose column to reorder index table once: " - (mapcar 'symbol-name '(ref count accessed)) - nil t))))) + (org-icompleting-read + "Please choose column to reorder index table once: " + (mapcar 'symbol-name + (append '(:ref :count :first :last) + (delq nil (mapcar (lambda (x) (if (> (cdr (assoc x org-index--columns)) 0) x nil)) + '(:x1 :x2 :x3))))) + nil t)))) ;; maybe ask initial question again (memq what '(reorder +))))) @@ -1297,14 +1300,14 @@ retrieves the value of the count-column for reference 12. ""))) ref)) - ((eq sort-column :accessed) + ((eq sort-column :ref) (concat count-special - (org-index--get-field :accessed) - " " ref)) - ((eq sort-column :ref) + ((memq sort-column '(:last :x1 :x2 :x3)) (concat count-special + (org-index--get-field sort-column) + " " ref)) (t (error "This is a bug: unmatched case '%s'" sort-column))))) |