summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-22 19:58:25 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-22 19:58:25 +0100
commit2097f5488b479e928b70bffcaa9957e1bf7690af (patch)
tree6693f029b5863b31af03dad46ee28e5e27e6a2b3
parent9eddf47059370a02f22900d5560f7acbbd83bf99 (diff)
parent029cf66f01b0bf6eb868a1f33d1e1279f2d250bb (diff)
downloadorg-mode-2097f5488b479e928b70bffcaa9957e1bf7690af.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-agenda.el47
-rw-r--r--lisp/org.el4
2 files changed, 26 insertions, 25 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2765718..ccc9517 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3027,19 +3027,18 @@ s Search for keywords M Like m, but only TODO entries
(symbol-name type)
"Lambda expression"))
(t "???"))))
- (if org-agenda-menu-show-matcher
- (setq line
- (concat line ": "
- (cond
- ((stringp match)
- (setq match (copy-sequence match))
- (org-add-props match nil 'face 'org-warning))
- ((listp type)
- (format "set of %d commands" (length type))))))
- (when (org-string-nw-p match)
- (add-text-properties
- 0 (length line) (list 'help-echo
- (concat "Matcher: " match)) line)))
+ (cond
+ ((not (org-string-nw-p match)) nil)
+ (org-agenda-menu-show-matcher
+ (setq line
+ (concat line ": "
+ (cond
+ ((stringp match)
+ (propertize match nil 'face 'org-warning))
+ ((listp type)
+ (format "set of %d commands" (length type)))))))
+ (t
+ (org-add-props line nil 'help-echo (concat "Matcher: " match))))
(push line lines)))
(setq lines (nreverse lines))
(when prefixes
@@ -4673,18 +4672,8 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
(when (and (stringp arg) (not (string-match "\\S-" arg))) (setq arg nil))
(let* ((today (org-today))
(date (calendar-gregorian-from-absolute today))
- (kwds org-todo-keywords-for-agenda)
(completion-ignore-case t)
- (org-select-this-todo-keyword
- (if (stringp arg) arg
- (and arg (integerp arg) (> arg 0)
- (nth (1- arg) kwds))))
- rtn rtnall files file pos)
- (when (equal arg '(4))
- (setq org-select-this-todo-keyword
- (completing-read "Keyword (or KWD1|K2D2|...): "
- (mapcar #'list kwds) nil nil)))
- (and (equal 0 arg) (setq org-select-this-todo-keyword nil))
+ kwds org-select-this-todo-keyword rtn rtnall files file pos)
(catch 'exit
(when org-agenda-sticky
(setq org-agenda-buffer-name
@@ -4693,6 +4682,16 @@ for a keyword. A numeric prefix directly selects the Nth keyword in
org-select-this-todo-keyword)
(format "*Org Agenda(%s)*" (or org-keys "t")))))
(org-agenda-prepare "TODO")
+ (setq kwds org-todo-keywords-for-agenda
+ org-select-this-todo-keyword (if (stringp arg) arg
+ (and (integerp arg)
+ (> arg 0)
+ (nth (1- arg) kwds))))
+ (when (equal arg '(4))
+ (setq org-select-this-todo-keyword
+ (completing-read "Keyword (or KWD1|K2D2|...): "
+ (mapcar #'list kwds) nil nil)))
+ (and (equal 0 arg) (setq org-select-this-todo-keyword nil))
(org-compile-prefix-format 'todo)
(org-set-sorting-strategy 'todo)
(setq org-agenda-redo-command
diff --git a/lisp/org.el b/lisp/org.el
index f65f2c0..9f33c9e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12573,7 +12573,9 @@ Returns the new TODO keyword, or nil if no state change should occur."
(when (and (= cnt 0) (not ingroup)) (insert " "))
(insert "[" c "] " tg (make-string
(- fwidth 4 (length tg)) ?\ ))
- (when (= (setq cnt (1+ cnt)) ncol)
+ (when (and (= (setq cnt (1+ cnt)) ncol)
+ ;; Avoid lines with just a closing delimiter.
+ (not (equal (car tbl) '(:endgroup))))
(insert "\n")
(when ingroup (insert " "))
(setq cnt 0)))))