emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-agenda.el: Complete multiple todo keywords
@ 2020-04-29 16:27 akater
  2020-04-30  4:04 ` Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: akater @ 2020-04-29 16:27 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]


* lisp/org-agenda.el (org-todo-list): Use completing-read-multiple instead of completing-read when selecting todo keywords to filter by in Agenda.

* lisp/org-agenda.el (org-todo-list): Fix a typo in the prompt.

There is minor UX cost to Helm users: while candidates list used to appear immediately to Helm users, now Helm users have to hit TAB to see the list.  This inconsistency is not present in vanilla Emacs completion.  The issue had been discussed with experienced Helm developer who insisted that current Helm behaviour should not change.

We opted to use custom separator that is more natural in context.  However, it is unfortunate that string patterns are strings themselves and are thus indistinguishable from strings; it would be better if crm exposed separator (the string) on its own in its interface.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Complete multiple todo keywords in org-agenda --]
[-- Type: text/x-diff, Size: 1660 bytes --]

org-agenda.el: Complete multiple todo keywords

* lisp/org-agenda.el (org-todo-list): Use completing-read-multiple instead of completing-read when selecting todo keywords to filter by in Agenda.

* lisp/org-agenda.el (org-todo-list): Fix a typo in the prompt.

There is minor UX cost to Helm users: while candidates list used to appear immediately to Helm users, now Helm users have to hit TAB to see the list.  This inconsistency is not present in vanilla Emacs completion.  The issue had been discussed with experienced Helm developer who insisted that current Helm behaviour should not change.

We opted to use custom separator that is more natural in context.  However, it is unfortunate that string patterns are strings themselves and are thus indistinguishable from strings; it would be better if crm exposed separator (the string) on its own in its interface.


--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4790,8 +4790,12 @@
                                                 (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)))
+              (mapconcat #'identity
+                         (let ((crm-separator "|"))
+                           (completing-read-multiple
+                            "Keyword (or KWD1|KWD2|...): "
+                            (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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-02  3:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 16:27 [PATCH] org-agenda.el: Complete multiple todo keywords akater
2020-04-30  4:04 ` Kyle Meyer
2020-04-30  6:50   ` akater
2020-04-30 22:19     ` Kyle Meyer
2020-05-01 20:58       ` akater
2020-05-02  3:37         ` Kyle Meyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).